From f5bf5f3982ff61db037eb6679659e1eaa5be6aed Mon Sep 17 00:00:00 2001 From: Behzad Samadi Date: Thu, 1 Oct 2026 14:21:28 -0400 Subject: [PATCH] Deploy the project page and article to GitHub Pages (gh-pages) - .github/workflows/pages.yml: on every push to main, install the Quarto extensions and TinyTeX, render docs/, publish docs/_output to gh-pages. - Remove the Nerfies authors' Google Analytics tag (G-PYVRSFMDRL) from the project page, which would have sent visitors' data to their account, and the arXiv article's _publish.yml, which pointed at another person's Quarto Pub site. - The project page says it is a template demo filled with Nerfies' content. Its media is served as files: embedding made one 61 MB page (now 32 KB). - docs/_quarto.yml renders only the project page and the article; the other .md files are Sphinx sources whose MyST syntax Quarto rejects. A root index.html opens the project page. - The article's PDF builds with LuaLaTeX, which finds Latin Modern in the TeX tree (XeLaTeX failed: "Latin Modern Roman cannot be found"). - install-quarto-extensions runs without prompts, so CI doesn't hang on "Do you trust the authors of this extension?". Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AmzgbBq9swiYXP9W9tgbS2 --- .github/workflows/pages.yml | 41 ++++++++++++++++++++++++++++ docs/_quarto.yml | 7 +++++ docs/arxiv-article/_publish.yml | 4 --- docs/arxiv-article/arxiv-article.qmd | 2 ++ docs/index.html | 12 ++++++++ docs/project-page/index.md | 21 +++++++------- pyproject.toml | 8 +++--- 7 files changed, 77 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/pages.yml delete mode 100644 docs/arxiv-article/_publish.yml create mode 100644 docs/index.html diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..0ccb432 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,41 @@ +name: Pages + +# Renders the Quarto site in docs/ (the project page and the arXiv-style +# article, HTML and PDF) and publishes it to the gh-pages branch, which +# GitHub Pages serves at https://elearninghub.github.io/academic-project-template/. +on: + push: + branches: [main] + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: pages + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: prefix-dev/setup-pixi@v0.8.1 + with: + pixi-version: v0.72.2 + cache: true + + # The fontawesome, revealjs-clean and arxiv extensions, and TinyTeX for the PDF. + - name: Quarto extensions and TinyTeX + run: pixi run install-quarto-extensions + + - name: Render + run: pixi run docs + + - name: Publish to gh-pages + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_output + force_orphan: true diff --git a/docs/_quarto.yml b/docs/_quarto.yml index cc307de..568e7ed 100644 --- a/docs/_quarto.yml +++ b/docs/_quarto.yml @@ -5,6 +5,13 @@ project: title: "Docs" output-dir: "_output" + # The project page and the article. The other .md files here are Sphinx + # sources (Read the Docs) and use MyST syntax Quarto can't render. + render: + - project-page/index.md + - arxiv-article/arxiv-article.qmd + resources: + - index.html # options for all formats - suggested not to change from: markdown+raw_attribute+raw_tex diff --git a/docs/arxiv-article/_publish.yml b/docs/arxiv-article/_publish.yml deleted file mode 100644 index dc9bf87..0000000 --- a/docs/arxiv-article/_publish.yml +++ /dev/null @@ -1,4 +0,0 @@ -- source: template.qmd - quarto-pub: - - id: 376a9371-3109-4c1a-acd9-6a97a5dbfb6c - url: 'https://quartopub.org/sites/mike/quarto-arxiv-template' diff --git a/docs/arxiv-article/arxiv-article.qmd b/docs/arxiv-article/arxiv-article.qmd index 333e39e..07d3620 100644 --- a/docs/arxiv-article/arxiv-article.qmd +++ b/docs/arxiv-article/arxiv-article.qmd @@ -2,6 +2,8 @@ title: "Demo arXiv template" format: arxiv-pdf: + # LuaLaTeX finds Latin Modern in the TeX tree; XeLaTeX looks only at system fonts. + pdf-engine: lualatex keep-tex: true linenumbers: false doublespacing: false diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..b2101aa --- /dev/null +++ b/docs/index.html @@ -0,0 +1,12 @@ + + + + + Academic project template + + + + +

The project page ยท the article (PDF)

+ + diff --git a/docs/project-page/index.md b/docs/project-page/index.md index dc08037..18e2bbc 100644 --- a/docs/project-page/index.md +++ b/docs/project-page/index.md @@ -9,25 +9,26 @@ css: - https://cdn.jsdelivr.net/npm/bulma-slider@2.0.0/dist/css/bulma-slider.min.css - https://cdn.jsdelivr.net/gh/jpswalsh/academicons@1/css/academicons.min.css - ./css/index.css +# Served as separate files: embedding the 50 MB of video made one 61 MB page. +self-contained: false +embed-resources: false resources: + - css/ + - js/ + - images/ + - videos/ - interpolation/ include-in-header: - text: | - - - --- +::: {.notification .is-warning .is-light .has-text-centered} +**Template demo.** This page shows what the [academic project template](https://github.com/eLearningHub/academic-project-template) produces, filled with the content of [Nerfies](https://nerfies.github.io/) (Park et al., ICCV 2021), whose project page the template adapts. Replace it with your own paper. +::: + ::: {.hero} ::: {.hero-body} ::: {.container .is-max-desktop} diff --git a/pyproject.toml b/pyproject.toml index 3adf758..82b275e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,10 +83,10 @@ pip install pytest pytest-cov pytest-mock black isort flake8 mypy bandit safety """ install-quarto-extensions = ''' cd docs; -quarto add quarto-ext/fontawesome; -quarto install extension grantmcdermott/quarto-revealjs-clean; -quarto install extension mikemahoney218/quarto-arxiv; -quarto install tinytex; +quarto add --no-prompt quarto-ext/fontawesome; +quarto add --no-prompt grantmcdermott/quarto-revealjs-clean; +quarto add --no-prompt mikemahoney218/quarto-arxiv; +quarto install --no-prompt tinytex; ''' sdocs = "python -m pip install -e . && cd docs && python -m sphinx -b html . _build"