Spaces:
Running
Running
thibaud frere
commited on
Commit
·
fa5aa90
1
Parent(s):
67fcbc2
update
Browse files
.gitattributes
CHANGED
|
@@ -1,5 +1,11 @@
|
|
| 1 |
*.png filter=lfs diff=lfs merge=lfs -text
|
| 2 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 4 |
*.csv filter=lfs diff=lfs merge=lfs -text
|
| 5 |
*.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
*.png filter=lfs diff=lfs merge=lfs -text
|
| 2 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.mov filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.avi filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 10 |
*.csv filter=lfs diff=lfs merge=lfs -text
|
| 11 |
*.json filter=lfs diff=lfs merge=lfs -text
|
app/src/components/Hero.astro
CHANGED
|
@@ -41,7 +41,7 @@ const pdfFilename = `${slugify(pdfBase)}.pdf`;
|
|
| 41 |
<div class="meta-container">
|
| 42 |
{authors.length > 0 && (
|
| 43 |
<div class="meta-container-cell">
|
| 44 |
-
<h3>
|
| 45 |
<p>{authors.join(', ')}</p>
|
| 46 |
</div>
|
| 47 |
)}
|
|
|
|
| 41 |
<div class="meta-container">
|
| 42 |
{authors.length > 0 && (
|
| 43 |
<div class="meta-container-cell">
|
| 44 |
+
<h3>Author {authors.length > 1 ? 's' : ''}</h3>
|
| 45 |
<p>{authors.join(', ')}</p>
|
| 46 |
</div>
|
| 47 |
)}
|
app/src/components/Note.astro
CHANGED
|
@@ -19,6 +19,7 @@ const hasHeader = (emoji && String(emoji).length > 0) || (title && String(title)
|
|
| 19 |
.note__emoji { font-size: 24px; line-height: 1; }
|
| 20 |
.note__title { font-size: 13px; letter-spacing: .2px; }
|
| 21 |
.note__content { color: var(--text-color); font-size: 0.95rem; }
|
| 22 |
-
|
|
|
|
| 23 |
</style>
|
| 24 |
|
|
|
|
| 19 |
.note__emoji { font-size: 24px; line-height: 1; }
|
| 20 |
.note__title { font-size: 13px; letter-spacing: .2px; }
|
| 21 |
.note__content { color: var(--text-color); font-size: 0.95rem; }
|
| 22 |
+
/* Ensure the very last slotted element has no bottom margin */
|
| 23 |
+
.note .note__content > :global(*:last-child) { margin-bottom: 0 !important; }
|
| 24 |
</style>
|
| 25 |
|
app/src/content/article.mdx
CHANGED
|
@@ -4,11 +4,9 @@ title: "Bringing paper to life:\n A modern template for\n scientific writing
|
|
| 4 |
subtitle: "A modern, MDX-first research article template with math, citations and interactive figures."
|
| 5 |
description: "A modern, MDX-first research article template with math, citations and interactive figures."
|
| 6 |
authors:
|
| 7 |
-
- "
|
| 8 |
-
- "Alice Martin"
|
| 9 |
-
- "Robert Brown"
|
| 10 |
affiliation: "Hugging Face"
|
| 11 |
-
published: "
|
| 12 |
tags:
|
| 13 |
- research
|
| 14 |
- template
|
|
@@ -70,15 +68,14 @@ import GettingStarted from "./chapters/getting-started.mdx";
|
|
| 70 |
</Sidenote>
|
| 71 |
|
| 72 |
## Introduction
|
| 73 |
-
The web
|
| 74 |
|
| 75 |
-
|
| 76 |
|
| 77 |
-
Not every contribution fits a PDF. Treat demos, visualizations, and interactive write‑ups as
|
| 78 |
|
| 79 |
This project is heavily inspired by [**Distill**](https://distill.pub) (2016–2021), which championed clear, web‑native scholarship.
|
| 80 |
|
| 81 |
-
|
| 82 |
{/* ### Notable examples of excellent scientific articles
|
| 83 |
|
| 84 |
A short, curated list of well‑designed and often interactive work:
|
|
|
|
| 4 |
subtitle: "A modern, MDX-first research article template with math, citations and interactive figures."
|
| 5 |
description: "A modern, MDX-first research article template with math, citations and interactive figures."
|
| 6 |
authors:
|
| 7 |
+
- "Thibaud Frere"
|
|
|
|
|
|
|
| 8 |
affiliation: "Hugging Face"
|
| 9 |
+
published: "Sep. 01, 2025"
|
| 10 |
tags:
|
| 11 |
- research
|
| 12 |
- template
|
|
|
|
| 68 |
</Sidenote>
|
| 69 |
|
| 70 |
## Introduction
|
| 71 |
+
The web affords explanations that static PDFs cannot: **reactive diagrams**, progressive notation, and exploratory views that reveal how ideas behave. Use **interactive fragments** so readers can hover, scrub, and inspect—building **intuition** rather than merely reading results.
|
| 72 |
|
| 73 |
+
Precise notation, thoughtful visual encodings, and small, **manipulable experiments** deepen understanding. Treat these artifacts as **first‑class** alongside text, math, and code to help readers grasp mechanisms, limits, and trade‑offs.
|
| 74 |
|
| 75 |
+
Not every contribution fits a PDF. Treat demos, visualizations, and interactive write‑ups as scholarship: cite and version them, and ship clear, inspectable examples that expose intermediate states and link to sources so readers can verify and reproduce results.
|
| 76 |
|
| 77 |
This project is heavily inspired by [**Distill**](https://distill.pub) (2016–2021), which championed clear, web‑native scholarship.
|
| 78 |
|
|
|
|
| 79 |
{/* ### Notable examples of excellent scientific articles
|
| 80 |
|
| 81 |
A short, curated list of well‑designed and often interactive work:
|
app/src/content/chapters/available-blocks.mdx
CHANGED
|
@@ -4,6 +4,7 @@ import audioDemo from '../assets/audio/audio-example.wav';
|
|
| 4 |
import HtmlEmbed from '../../components/HtmlEmbed.astro';
|
| 5 |
import Sidenote from '../../components/Sidenote.astro';
|
| 6 |
import Wide from '../../components/Wide.astro';
|
|
|
|
| 7 |
import FullWidth from '../../components/FullWidth.astro';
|
| 8 |
import Accordion from '../../components/Accordion.astro';
|
| 9 |
|
|
@@ -20,9 +21,10 @@ All the following blocks are available in the article.mdx file. You can also cre
|
|
| 20 |
<a className="button" href="#citations-and-notes">Citations & notes</a>
|
| 21 |
<a className="button" href="#placement">Placement</a>
|
| 22 |
<a className="button" href="#accordion">Accordion</a>
|
|
|
|
| 23 |
<a className="button" href="#minimal-table">Minimal table</a>
|
| 24 |
<a className="button" href="#audio">Audio</a>
|
| 25 |
-
<a className="button" href="#
|
| 26 |
</div>
|
| 27 |
|
| 28 |
### Math
|
|
@@ -283,6 +285,37 @@ greet("Astro");
|
|
| 283 |
````
|
| 284 |
|
| 285 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
### Minimal table
|
| 287 |
|
| 288 |
| Method | Score |
|
|
|
|
| 4 |
import HtmlEmbed from '../../components/HtmlEmbed.astro';
|
| 5 |
import Sidenote from '../../components/Sidenote.astro';
|
| 6 |
import Wide from '../../components/Wide.astro';
|
| 7 |
+
import Note from '../../components/Note.astro';
|
| 8 |
import FullWidth from '../../components/FullWidth.astro';
|
| 9 |
import Accordion from '../../components/Accordion.astro';
|
| 10 |
|
|
|
|
| 21 |
<a className="button" href="#citations-and-notes">Citations & notes</a>
|
| 22 |
<a className="button" href="#placement">Placement</a>
|
| 23 |
<a className="button" href="#accordion">Accordion</a>
|
| 24 |
+
<a className="button" href="#note">Note</a>
|
| 25 |
<a className="button" href="#minimal-table">Minimal table</a>
|
| 26 |
<a className="button" href="#audio">Audio</a>
|
| 27 |
+
<a className="button" href="#htmlembeds">HtmlEmbeds</a>
|
| 28 |
</div>
|
| 29 |
|
| 30 |
### Math
|
|
|
|
| 285 |
````
|
| 286 |
|
| 287 |
|
| 288 |
+
### Note
|
| 289 |
+
|
| 290 |
+
Small contextual callout for tips, caveats, or emphasis.
|
| 291 |
+
|
| 292 |
+
Props (optional)
|
| 293 |
+
- `title`: short title displayed in the header.
|
| 294 |
+
- `emoji`: emoji displayed before the title.
|
| 295 |
+
- `class`: extra classes for custom styling.
|
| 296 |
+
|
| 297 |
+
<Note title="Heads‑up" emoji="💡">
|
| 298 |
+
Use notes to surface context without breaking reading flow.
|
| 299 |
+
</Note>
|
| 300 |
+
|
| 301 |
+
<Note>
|
| 302 |
+
Plain note without header. Useful for short clarifications.
|
| 303 |
+
</Note>
|
| 304 |
+
|
| 305 |
+
<small className="muted">Example</small>
|
| 306 |
+
```mdx
|
| 307 |
+
import Note from '../../components/Note.astro'
|
| 308 |
+
|
| 309 |
+
<Note title="Heads‑up" emoji="💡">
|
| 310 |
+
Use notes to surface context without breaking reading flow.
|
| 311 |
+
</Note>
|
| 312 |
+
|
| 313 |
+
<Note>
|
| 314 |
+
Plain note without header. Useful for short clarifications.
|
| 315 |
+
</Note>
|
| 316 |
+
```
|
| 317 |
+
|
| 318 |
+
|
| 319 |
### Minimal table
|
| 320 |
|
| 321 |
| Method | Score |
|
app/src/content/chapters/getting-started.mdx
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import Sidenote from '../../components/Sidenote.astro';
|
|
|
|
| 2 |
|
| 3 |
## Getting Started
|
| 4 |
|
|
@@ -35,14 +36,15 @@ npm run build
|
|
| 35 |
|
| 36 |
### Deploy
|
| 37 |
|
| 38 |
-
The recommended way is to **duplicate this Space on Hugging Face** rather than cloning it directly:
|
| 39 |
|
| 40 |
-
1. Open the template Space: **[🤗 science-blog-template](https://huggingface.co/spaces/tfrere/science-blog-template)** and click "Duplicate this Space"
|
| 41 |
-
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
```bash
|
| 45 |
-
git clone git@hf.co:spaces/<your-username>/<your-space
|
| 46 |
cd <your-space>
|
| 47 |
# Make edits locally, then:
|
| 48 |
git add .
|
|
|
|
| 1 |
import Sidenote from '../../components/Sidenote.astro';
|
| 2 |
+
import Note from '../../components/Note.astro';
|
| 3 |
|
| 4 |
## Getting Started
|
| 5 |
|
|
|
|
| 36 |
|
| 37 |
### Deploy
|
| 38 |
|
| 39 |
+
The recommended way is to **duplicate this Space** on **Hugging Face** rather than cloning it directly:
|
| 40 |
|
| 41 |
+
1. Open the template Space: **[🤗 science-blog-template](https://huggingface.co/spaces/tfrere/science-blog-template)** and click **"Duplicate this Space"**.
|
| 42 |
+
<Note>💡 It runs on a **free** CPU basic instance.</Note>
|
| 43 |
+
2. Give it a name, choose visibility, and **keep the SDK as Docker**.
|
| 44 |
+
3. Then push your changes to your new Space repo.<br/>**Every push automatically triggers a build and deploy** on Spaces.
|
| 45 |
|
| 46 |
```bash
|
| 47 |
+
git clone git@hf.co:spaces/<your-username>/<your-space>
|
| 48 |
cd <your-space>
|
| 49 |
# Make edits locally, then:
|
| 50 |
git add .
|
app/src/content/chapters/writing-your-content.mdx
CHANGED
|
@@ -28,7 +28,7 @@ title: "This is the main title"
|
|
| 28 |
subtitle: "This will be displayed just below the banner"
|
| 29 |
description: "A modern, MDX-first research article template with math, citations, and interactive figures."
|
| 30 |
authors:
|
| 31 |
-
- "
|
| 32 |
- "Alice Martin"
|
| 33 |
- "Robert Brown"
|
| 34 |
affiliation: "Hugging Face"
|
|
|
|
| 28 |
subtitle: "This will be displayed just below the banner"
|
| 29 |
description: "A modern, MDX-first research article template with math, citations, and interactive figures."
|
| 30 |
authors:
|
| 31 |
+
- "Thibaud Frere"
|
| 32 |
- "Alice Martin"
|
| 33 |
- "Robert Brown"
|
| 34 |
affiliation: "Hugging Face"
|