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"