A template for Ark-based tutorials.
-
Set up Python environment:
- Create
lib/mccole/
. - Create
lib/mccole/requirements.txt
. - Add
ark
andpymdown-extensions
tolib/mccole/requirements.txt
. - Create
requirements.txt
with-r lib/mccole/requirements.txt
. - Create conda environment
mccole
. - Install packages with
pip install -r requirements.txt
.
- Create
-
Set up minimal Ark site:
- Create
config.py
. - Define
title
,repo
, andauthor
. - Define
theme
to bemccole
. - Define
src_dir
to besrc
. - Define
out_dir
to bedocs
. - Define
extension
to be/
. - Enable Markdown extensions.
- Create empty
src/index.md
. - Create
lib/mccole/templates/node.ibis
template with nothing but{{node.html}}
.
- Create
-
Create license and code of conduct pages:
- Create
LICENSE.md
andCODE_OF_CONDUCT.md
for GitHub to display. - Create
src/license/index.md
andsrc/conduct/index.md
to generate pages indocs
. - Define
rootfile
shortcode inlib/mccole/extensions/rootfile.py
to include files from the root. - Create
lib/mccole/extensions/util.py
to hold utilities. - Add
__pycache__
to.gitignore
to stoputil.pyc
from being included in Git.
- Create
-
Create glossary.
- Add
src/glossary/index.md
with[% glossary %]
shortcode. - Add
[%g ssg "text" %]
tosrc/index.md
as test case. - Create
info/glossary.yml
with Glosario-format glossary. - Add
lang="en"
toconfig.py
to specify language. - Create
lib/mccole/extensions/glossary.py
with implementation ofglossary
andg
shortcodes. - Add test case for
g
shortcode tosrc/index.md
. - Add
markdownify
function tolib/mccole/extensions/util.py
for Markdown conversion.
- Add
-
Automation.
- Create
Makefile
that includeslib/mccole/mccole.mk
. - Create
lib/mccole/mccole.mk
with targets to rebuild and check. - Add
ruff
tolib/mccole/requirements.txt
and install it.
- Create
-
Styling pages.
- Create
lib/mccole/resources/mccole.css
with beginnings of (unresponsive) styling. - Add HTML layout to
lib/mccole/templates/node.ibis
. - Add
head.html
andfoot.html
tolib/mccole/templates
directory. - Add
lib/mccole/resources/logo.svg
for use as favicon. - Add
.nojekyll
file to prevent GitHub from re-rendering pages.
- Create
-
Add front matter to
index.md
pages with titles. -
Add cross-referencing and table of contents.
- Add
chapters
andappendices
toconfig.py
to define order. - Add
_number_contents
and_collect_titles
tolib/mccole/extensions/init.py
to gather information. - Create
lib/mccole/extensions/toc.py
for cross-references and table of contents. - Add
x
shortcode to cross-reference chapters and appendices. - Add
toc
shortcode to create table of contents. - Add
src/intro/index.md
andsrc/finale/index.md
as test cases.
- Add
-
Add bibliography.
- Modify
lib/mccole/requirements.txt
to installpybtex
package. - Add
info/bibliography.bib
(BibTeX-formatted bibliography). - Add
lib/mccole/bin/make_bibliography.py
to translate BibTeX into HTML intmp/bibliography.html
. - Modify
lib/mccole/mccole.mk
to build HTML version of bibliography. - Modify
lib/mccole/resources/mccole.mk
to display bibliography. - Add
bibliography
shortcode to include bibliography in page. - Add
b
shortcode to reference bibliography entries. - Add
src/bib/index.md
to show bibliography. - Modify
config.py
to includebib
as appendix.
- Modify
-
Add figures and tables.
- Add
lib/mccole/extensions/figure.py
with shortcodef
and figure inclusionfigure
. - Add
lib/mccole/extensions/table.py
with shortcodet
and figure inclusiontable
. - Rename
lib/mccole/extensions/init.py
tolib/mccole/extensions/batch.py
to reflect purpose. - Add startup task in
lib/mccole/extensions/batch.py
to find and number all figures and tables. - Add
copy
field toconfig.py
with globs of files to copy directly (just*.svg
for now). - Add finalization code to
lib/mccole/extensions/batch.py
to copy files. - Add examples of figures and tables (and references) to
src/intro/index.md
andsrc/finale/index.md
. - Move localization into
lib/mccole/extensions/util.py
.
- Add
-
Add navigation links and a proper title.
- Collect all metadata in
lib/mccole/extensions/batch.py
. - Add
lib/mccole/templates/title.html
to format title and prev/next navigation links. - Include
title.html
inlib/mccole/templates/node.ibis
. - Add
lib/mccole/extensions/filters.py
with various filters required by template additions. - Add flex grid to
lib/mccole/resources/mccole.css
. - Modify
src/license/index.md
andsrc/conduct/index.md
to strip inherited title of root pages.
- Collect all metadata in