Skip to content

docs: migrate to markdown/ mkdocs/ material#2162

Open
lkstrp wants to merge 3 commits into
PyPSA:masterfrom
lkstrp:new-docs
Open

docs: migrate to markdown/ mkdocs/ material#2162
lkstrp wants to merge 3 commits into
PyPSA:masterfrom
lkstrp:new-docs

Conversation

@lkstrp
Copy link
Copy Markdown
Member

@lkstrp lkstrp commented May 7, 2026

Closes #2059

Changes proposed in this Pull Request

  • I still went with Material and MkDocs (same setup as in PyPSA), but once Zensical is stable we should move there. It currently does not support all features, but it will be close to a drop-in replacement for MkDocs. I cannot find the article right now, but the MkDocs and Material for MkDocs maintainers are not very aligned right now. Another migration will be much easier though, since we only need to touch plugins then. EDIT (https://fpgmaas.com/blog/collapse-of-mkdocs/ Thanks @euronion)
  • All features previously using Sphinx are moved over. For the yaml stuff I had to write a macro, and all DAGs are now read from files instead of being created during the build.
  • Should we also move this to a new URL? Either docs.pypsa.org/pypsa-eur or its own subdomain?
  • To review this, the commit after the rename should be checked. There we still get a proper diff: 5634986
  • If downstream repos changed the documentation, this will be a bit of a nightmare to pull in. It will be easiest to just apply the full downstream diff again on top of here. I think I saw separate docs for e.g. TYNDP @daniel-rdt @tgilon
  • @fneum I will do a couple more changes and also go through the full diff again, but you are already free to push whatever on here.

Run this locally with pixi run update-dags & pixi run -e doc mkdocs serve
Find the build here

This should again not be squashed. We lose the git history otherwise.

Checklist

  • Another check of everything, to find all hallucinations I missed
  • Some Design Tweaks, haven't touched that yet.

@lkstrp lkstrp requested a review from fneum May 7, 2026 14:29
@daniel-rdt
Copy link
Copy Markdown
Contributor

Thank you @lkstrp for the heads up!

@fneum
Copy link
Copy Markdown
Member

fneum commented May 11, 2026

Looks great! I would merge that ASAP and then built improvements on top. Needless to say, the documentation of PyPSA-Eur is in a shocking state.

  • YAML blocks: The YAML selection did not always work correctly (often to long, esp. with shared setting endings or duplicate keys like "enable"). Must be changed before merge.

  • Configuration: There's a mistake in how indentation levels >= 2 are treated. They are shown on the same level as the first. The "renewable" section does not look right (duplication and notes inception). Some unresolved literalinclude and jsonschema RST syntax. Must be changed before merge.

  • Release Notes: Can we get hyperlinks for PR numbers? Should be changed before merge.

  • Rules: Some unresolved .. code:: yaml and .. tip:: blocks. Should be changed before merge.

  • Data Sources: Links in table are not clickable. Can be changed before merge.

  • I have ideas for tabs Home, Design, Configuration, Rules, Contributing. To be tackled later.

Everything else, later -- I would say.

Comment thread doc/index.md

If you want to cite a specific PyPSA-Eur version, each release of PyPSA-Eur is stored on Zenodo with a release-specific DOI:

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3520874.svg)](https://doi.org/10.5281/zenodo.3520874)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously was rendered as badge.

Comment thread doc/tutorial.md
Comment on lines +71 to +73
```yaml
{{ yaml_section(start_at="solar:", end_at="cutout:", source="test/config.electricity.yaml") }}
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one did not render correctly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also enable: section in configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update docs to markdown + mkdocs

3 participants