Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bachelor of Applied Data Science
Data Challenges Unit Resources
Commits
a15acd6f
Unverified
Commit
a15acd6f
authored
Jul 09, 2021
by
Simon Bowly
Browse files
Fix static site builder.
parent
30f9179a
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.md
View file @
a15acd6f
...
...
@@ -5,8 +5,9 @@ Build (approximately) the topic index in the main readme:
find . -type d -not -path "*/.ipynb_checkpoints" -not -path "*/__pycache__" | sed -En "s|(.*)\/([a-zA-Z0-9'-]*)$|* [\2](\1/\2)|p"
```
Build a static html site from all notebooks with their current outputs, using readme as an index page:
Build a static html site from all notebooks with their current outputs, using readme as an index page
(work in progress)
:
```
pandoc --from markdown --to html README.md -o static/index.html
mkdir -p static
sed "s|ipynb|html|" README.md | pandoc --from markdown --to html - -o static/index.html
find . -type f -name "*.ipynb" | xargs -I {} bash -c 'f="{}" && mkdir -p -- static/"${f%/*}" && jupyter nbconvert --to html $f && mv "${f%.*}.html" static/"${f%/*}"'
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment