calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
287 stars 93 forks source link

Add skeleton of mkdocs #526

Closed sjpfenninger closed 9 months ago

sjpfenninger commented 9 months ago

First skeleton of mkdocs

Open issues:

The idea would be to sort out any issues with the basic setup here, merge this basic setup, then revise and move over the remaining documentation step-by-step, thus also moving from the old doc to the new docs directory.

Reviewer checklist:

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (e6b7263) 94.98% compared to head (7247860) 95.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #526 +/- ## ========================================== + Coverage 94.98% 95.00% +0.01% ========================================== Files 24 24 Lines 3290 3301 +11 Branches 702 651 -51 ========================================== + Hits 3125 3136 +11 Misses 96 96 Partials 69 69 ``` | [Files](https://app.codecov.io/gh/calliope-project/calliope/pull/526?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project) | Coverage Δ | | |---|---|---| | [src/calliope/backend/latex\_backend\_model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/526?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL2JhY2tlbmQvbGF0ZXhfYmFja2VuZF9tb2RlbC5weQ==) | `96.24% <100.00%> (+0.24%)` | :arrow_up: | | [src/calliope/util/schema.py](https://app.codecov.io/gh/calliope-project/calliope/pull/526?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL3V0aWwvc2NoZW1hLnB5) | `90.32% <100.00%> (+0.49%)` | :arrow_up: |
sjpfenninger commented 9 months ago

For math to be rendered, do you just need to add the relevant config and javascript?

https://squidfunk.github.io/mkdocs-material/reference/math/

Not enough if you want the fenced blocks to work (``math ...). The easiest solution might just be to replace those with the$$...$$` block syntax.

From https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/#alternative-math-blocks I gather something like this ought to work but it doesn't so far:

  - pymdownx.arithmatex:
      generic: true
  - pymdownx.superfences:
      custom_fences:
        - name: math
          class: arithmatex
          format: !!python/name:pymdownx.arithmatex.arithmatex_fenced_format