A production-oriented Astro static site for academic blogging, research notes, paper summaries, course notes, dataset notes, and notebook rendering.
- Astro static output
- TailwindCSS
- Markdown + MDX
- Decap CMS
- Pagefind
- KaTeX
- Shiki
- Mermaid
- Giscus
- Jupyter notebook static rendering
- Plausible Analytics
- GitHub Pages deployment
npm install
npm run devThe notebook build script runs automatically before dev and build.
src/content/blogsrc/content/coursessrc/content/researchsrc/content/paperssrc/content/datasetssrc/content/pagessrc/notebooks
The admin dashboard is served at /admin.
This project is configured for Decap CMS + Netlify Identity + Git Gateway so the site can remain deployed on GitHub Pages while editing still commits into GitHub.
- Add this GitHub repository to Netlify.
- In Netlify, enable Identity.
- Under Identity > External providers, enable GitHub.
- Under Identity > Services, enable Git Gateway.
- Invite allowed editors if you want invite-only access.
- Keep
public/admin/config.ymlasgit-gateway. - Open
https://hoangthejason.github.io/admin.
Copy .env.example to .env and fill in:
PUBLIC_GISCUS_REPOPUBLIC_GISCUS_REPO_IDPUBLIC_GISCUS_CATEGORYPUBLIC_GISCUS_CATEGORY_IDPUBLIC_PLAUSIBLE_DOMAINPUBLIC_PLAUSIBLE_SCRIPT_SRC(optional)
- Enable GitHub Discussions in the repository.
- Install the giscus app on the repository.
- Get the repository ID and category ID from the giscus configuration UI.
- Add them to
.env.
The included workflow in .github/workflows/deploy.yml builds the site and deploys dist/ to GitHub Pages.
- Source: GitHub Actions
- Repository name:
hoangthejason.github.io - Branch:
main
Pagefind runs after Astro build:
npm run buildThis generates the static search bundle inside dist/pagefind.
Notebook files are stored in src/notebooks/*.ipynb.
During build, scripts/build-notebooks.mjs converts them into static JSON under src/generated/notebooks/, then Astro turns them into static notebook pages.
This project includes rehype-citation.
Example frontmatter:
---
title: Example
bibliography: ../references/references.bib
csl: apa
---
Transformers are useful for sequence models [@vaswani2017].:::note
This is a note callout.
:::
:::warning
This is a warning callout.
:::```mermaid
graph TD
A[Data] --> B[Model]
B --> C[Evaluation]
```Use Shiki meta-based highlighting:
```ts {2}
const a = 1
const b = 2
```Or notation-based highlighting:
```ts
console.log('plain')
console.log('highlighted') // [!code highlight]
```