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
-
Style 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
-
Add links to pages.
- Add
info/links.yml
with link definitions. - Add
ensure_links
function tolib/mccole/extensions/util.py
to load and format links. - Add
_append_links
function tolib/mccole/extensions/batch.py
to append link text to files. - Add
src/colophon/index.md
to display credits.
- Add
-
Add list of defined terms to pages.
- Move glossary loading to
lib/mccole/extensions/util.py
and cache. - Refactor shortcode collection in
lib/mccole/extensions/batch.py
. - Add collection of glossary keys in
lib/mccole/extensions/batch.py
. - Add filter
termdefs
inlib/mccole/extensions/filters.py
to display defined terms. - Move glossary reference test into
src/intro/index.md
. - Modify
lib/mccole/templates/node.ibis
to show defined terms.
- Move glossary loading to
-
Refactor.
- Move larger filters like
termdefs
into files of their own. - Add hooks to exclude directories and files.
- Add
copy
andexclude
keys toconfig.py
. - Add
fixme
shortcode for notes. - Add target to
lib/mccole/mccole.mk
to build zip file and to check things after unpacking it.
- Move larger filters like
-
Add features after trying it out.
- Add contributors' guide in
CONTRIBUTING.md
and page insrc/contrib/index.md
. - Add MathJax to
lib/mccole/templates/head.html
. - Add link to home page to
lib/mccole/templates/foot.html
. - Add colored sidebars to
lib/mccole/resources/mccole.css
. - Add stamp colors and Danielle Navarro to colophon.
- Add contributors' guide in
-
Add thanks.
- Add
lib/mccole/extensions/thanks.py
to read and formatinfo/thanks.yml
. - Add usage to
src/intro/index.md
to test.
- Add
-
Add index.
- Add
lib/mccole/extensions/index.py
to format index and index references. - Modify
lib/mccole/extensions/batch.py
to collect index references. - Add
src/contents/index.md
to display index (usingcontents
instead ofindex
to avoid confusion). - Modify
lib/mccole/mccole.mk
to includesrc/contents/index.md
in zip file.
- Add
-
Add linting.
- Add
lib/mccole/bin/lint.py
andlib/mccole/bin/lint_svg.py
to check project features. - Add targets to
lib/mccole/mccole.mk
to run them.
- Add
-
CSS improvements.
- Responsive layout.
- Reduce indentation of bullet lists.
- Label navigation controls with
<nav>
element. - Unify colors and borders of code inclusions.
- Syntax highlighting.
-
Add profiling.
- Add
lib/mccole/bin/run_profile.py
to profile build. - Add target to
lib/mccole/mccole.mk
to run it.
- Add
-
Improve contribution guide.