Skip to content

Commit

Permalink
chore: migrate from JB to Quarto (#2, #3)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlFontal committed Dec 14, 2022
1 parent 01c1485 commit c24ce93
Show file tree
Hide file tree
Showing 9 changed files with 280 additions and 216 deletions.
33 changes: 19 additions & 14 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.8]
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# Install dependencies
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -29,17 +29,22 @@ jobs:
- name: Copy README
run: |
cp README.md reports/index.md
# Build the book
- name: Build the book
run: |
jupyter-book build reports
- name: Clean notebook outputs for nicer HTML render
run: curl -s -S https://gist.githubusercontent.com/AlFontal/896e180f9f7772c4825067591f34c94b/raw > clean_notebook.py;
python clean_notebook.py --path reports

# Deploy the book's HTML to gh-pages branch
- name: GitHub Pages action
uses: peaceiris/actions-gh-pages@v3.6.1
# Set up Quarto
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
# Render Quarto HTML
- name: Render Quarto site
uses: quarto-dev/quarto-actions/render@v2
with:
to: html
path: reports/
# Clean up HTML outputs
- name: Process HTML outputs for nicer site render
run: curl -s -S https://gist.githubusercontent.com/AlFontal/233c9ad8afe27e68f23138fcacf2d767/raw > clean_notebook.py;
python clean_notebook.py --path reports/_site
# Deploy to Github Pages
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: reports/_build/html
publish_dir: reports/_site
63 changes: 0 additions & 63 deletions reports/_config.yml

This file was deleted.

63 changes: 63 additions & 0 deletions reports/_quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
project:
type: website
render:
- index.md
- prefecture_weighted_averages.ipynb

execute:
freeze: true # We don't want to re-execute notebooks in every build

website:
title: "Japan's Environmental Data"
favicon: assets/favicon.ico

navbar:
logo: assets/logo.png

right:

- text: Home
href: index.md

- text: Reports
menu:
- text: "Prefecture Weighted Estimates"
href: prefecture_weighted_averages.ipynb

- text: About
menu:
- text: "This Site"
href: index.qmd
- text: "ISGlobal"
href: https://www.isglobal.org/en
- text: "Climate & Health Programme"
href: https://www.isglobal.org/en/-/clima-y-salud
- text: "HELICAL ITN"
href: https://www.helical-itn.eu/
- text: "Alejandro Fontal"
href: https://alfontal.github.io

- icon: github
menu:
- text: "GitHub Repository"
href: https://github.com/AlFontal/environmental-data-japan
- text: "Raise an issue"
href: https://github.com/AlFontal/environmental-data-japan
- icon: envelope
href: mailto:alejandro.fontal.92@gmail.com
aria-label: Mail

format:
html:
number-sections: true
highlight-style: github
theme:
light: litera
css: custom.css
toc: true
toc-title: "CONTENTS"
toc-location: right
code-tools:
source: true
toggle: true
code-summary: "Show Code"
40 changes: 0 additions & 40 deletions reports/_static/custom.css

This file was deleted.

7 changes: 0 additions & 7 deletions reports/_toc.yml

This file was deleted.

File renamed without changes.
38 changes: 38 additions & 0 deletions reports/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
pre code {
font-size: 0.8em
}

.table {
font-size: 0.8em;
}

p {
text-align: justify;
}

figcaption.figure-caption {
font-size: 0.8em;
text-align: center;
}

summary {
font-size: 0.8em;
font-family: Georgia,Cambria,"Times New Roman",Times,serif
}

header {
font-family: Georgia,Cambria,"Times New Roman",Times,serif;
}

navbar {
font-family: Georgia,Cambria,"Times New Roman",Times,serif;
}

body {
font-family: Georgia,Cambria,"Times New Roman",Times,serif;
}

.lead {
font-family: Georgia,Cambria,"Times New Roman",Times,serif;
font-size: 1.275rem;
}
Binary file removed reports/images/logo.png
Binary file not shown.
Loading

0 comments on commit c24ce93

Please sign in to comment.