-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #246 from alan-turing-institute/quarto
Migrate deployment to GitHub Pages
- Loading branch information
Showing
54 changed files
with
5,453 additions
and
6,211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
on: | ||
push: | ||
branches: main | ||
|
||
name: Render and publish | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Render Quarto project | ||
uses: quarto-dev/quarto-actions/render@v2 | ||
with: | ||
to: html | ||
env: | ||
# The US election story needs an increased call stack size, not sure why | ||
QUARTO_DENO_EXTRA_OPTIONS: --v8-flags=--stack-size=2048 | ||
|
||
- name: Upload files to gh-pages branch | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs | ||
publish_branch: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,6 @@ | |
|
||
stories/data/ | ||
stories/2022-10-06-Boris-Bikes/routes/* | ||
/.quarto/ | ||
_site/ | ||
docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
[![All Contributors](https://img.shields.io/badge/all_contributors-31-orange.svg?style=flat-square)](#contributors-) | ||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
|
||
Our stories are published online via fastpages, you can check them out [here](https://alan-turing-institute.github.io/TuringDataStories-fastpages/). | ||
Our stories are published online using Quarto and GitHub Pages: you can check them out [here](https://alan-turing-institute.github.io/TuringDataStories/). | ||
Looking for how to get involved? [Click here.](https://github.com/alan-turing-institute/TuringDataStories#contributing) | ||
|
||
### Our vision | ||
|
@@ -49,19 +49,41 @@ All contributors are asked to follow our [code of conduct](CODE_OF_CONDUCT.md) a | |
|
||
### How to Read Stories | ||
|
||
Our stories are published online via fastpages. You can check them out [here](https://alan-turing-institute.github.io/TuringDataStories-fastpages/). | ||
Our stories are published online using Quarto and GitHub Pages. You can check them out [here](https://alan-turing-institute.github.io/TuringDataStories/). | ||
|
||
Alternatively, click the binder badge at the top of this README to load an interactive version of our stories. | ||
|
||
Another option is to run the notebooks locally yourself. To do this, we recommend [installing](https://docs.conda.io/projects/conda/en/latest/user-guide/install/) conda, cloning this repository, and then [setting up an environment](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file) using | ||
To build the website locally, install [Quarto](https://quarto.org/) and run from the top-level directory of this repository: | ||
```bash | ||
QUARTO_DENO_EXTRA_OPTIONS=--v8-flags=--stack-size=2048 quarto render | ||
``` | ||
git clone [email protected]:alan-turing-institute/TuringDataStories.git | ||
cd TuringDataStories | ||
Note that Quarto uses precalculated outputs for each notebook cell. | ||
|
||
Another option is to run the notebooks locally yourself. | ||
Some of the notebooks have `requirements.txt` files inside their respective subdirectories; you can set up a virtual environment to run the notebooks using | ||
|
||
```bash | ||
python -m venv tds_venv | ||
source tds_venv/bin/activate | ||
python -m pip install -r requirements.txt | ||
``` | ||
|
||
If this is not present, then you will need to instead use the `binder/environment.yml` file with [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/install/): | ||
```bash | ||
conda env create -f binder/environment.yml | ||
``` | ||
|
||
Any problems, open an issue! | ||
|
||
|
||
### Adding a new story | ||
|
||
Under the `stories` directory, create a new folder with the name `YYYY-MM-DD-<Title>` and place your notebook inside there. | ||
Make sure you have already run all the cells in your notebook. | ||
That's all! | ||
|
||
If your notebook is not ready to be published to the web, you can prefix the folder with an underscore: Quarto will then ignore it. | ||
|
||
### About the project | ||
|
||
This project was initially formed by a desire to contribute and advance to the analysis of government COVID-19 data. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
project: | ||
type: website | ||
output-dir: docs | ||
render: | ||
- "*.qmd" | ||
- "stories/*/*.ipynb" | ||
- "!stories/_*" | ||
website: | ||
title: "Turing Data Stories" | ||
navbar: | ||
right: | ||
- icon: github | ||
href: https://github.com/alan-turing-institute/turingdatastories | ||
format: | ||
html: | ||
theme: cosmo | ||
css: styles.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
listing: | ||
contents: stories | ||
sort: "date desc" | ||
type: default | ||
categories: true | ||
sort-ui: false | ||
filter-ui: false | ||
page-layout: full | ||
title-block-banner: false | ||
--- | ||
|
||
[![](logos/TDS-logo-wide.png){fig-alt="Turing Data Stories Logo"}](https://github.com/alan-turing-institute/TuringDataStories) | ||
|
||
An open community creating “Data Stories”: A mix of open data, code, narrative 💬, visuals 📊📈 and knowledge 🧠 to help understand the world around us. | ||
Want to contribute? Take a look [here](https://github.com/alan-turing-institute/TuringDataStories#contributing). | ||
|
||
# Posts |
51 changes: 37 additions & 14 deletions
51
...ies/2020-11-20-COVID-19/2020-11-20-Who_was_protected_by_the_first_COVID-19_lockdown.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.