Skip to content

87 add support for using zensical#92

Open
MaKaNu wants to merge 19 commits intoosprey-oss:mainfrom
MaKaNu:87-add-support-for-using-zensical
Open

87 add support for using zensical#92
MaKaNu wants to merge 19 commits intoosprey-oss:mainfrom
MaKaNu:87-add-support-for-using-zensical

Conversation

@MaKaNu
Copy link
Copy Markdown
Contributor

@MaKaNu MaKaNu commented Mar 12, 2026

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

I tried to experiment with zensical implementation.

While reading through their docs and migrating the old config, I realized a few nice things they used/implemented wit zensical.

The main goal of this PR is to recreate the current mkdocs setup with zensical.

While the changes with the logos and icons on the nav section are optional, the color scheme changes seem to be necessary, since a few quirks in the old mkdocs material have changed drastically (see de5e52a) correcting those would mean more drastic changes in the extras.css

TODOS

  • Create working config for the main project
  • Discuss color scheme and other optical changes
  • Create working config for template
  • Update github actions workflow

Effects for users:

  • Switch from mkdocs to zensical

Fixes #87

@fpgmaas
Copy link
Copy Markdown
Member

fpgmaas commented Mar 24, 2026

Hey, thanks for raising this PR. This doesn't completely solve the related issue though; that states that the cookiecutter template should give the option for mkdocs or zensical, and allow the generated project to work with either.

@MaKaNu
Copy link
Copy Markdown
Contributor Author

MaKaNu commented Mar 25, 2026

Yes, I did not touch the template yet, since I wanted to discuss the changes to the visuals first before investing into changes of the template itself. Currently, the changes only affect the project documentation. If you are fine with the current changes I am happy to complete the job for the template.

@fpgmaas
Copy link
Copy Markdown
Member

fpgmaas commented Mar 25, 2026

Yes, I did not touch the template yet, since I wanted to discuss the changes to the visuals first before investing into changes of the template itself. Currently, the changes only affect the project documentation. If you are fine with the current changes I am happy to complete the job for the template.

Ah I see! Yes, I would be open for this. Coincidentally, I wrote a blog post about the current state of MkDocs a few days ago.

Moving the docs four the project itself to Zensical is fine for me. I think the best solution for the template (for now) would be to support both MkDocs and Zensical, and provide the user the option to choose. Ideally we add a unit test for both options that verifies that the build command with strict flag passes in both cases.

Is this something you are willing to work on? If so, that'd be great. I'm happy to help with testing of course.

@MaKaNu
Copy link
Copy Markdown
Contributor Author

MaKaNu commented Mar 25, 2026

Is this something you are willing to work on? If so, that'd be great. I'm happy to help with testing of course.

yes, I am down. I start working the changes into the template.

@MaKaNu
Copy link
Copy Markdown
Contributor Author

MaKaNu commented Mar 26, 2026

Just a thing that popped up:

zensical does for reasons not support gh-deploy like mkdocs do and also switched to artifact instead of branch deployment.

I have implemented it for the project itself in 9030e92 and for the template in c508913

@fpgmaas
Copy link
Copy Markdown
Member

fpgmaas commented Mar 27, 2026

There seem to be a few merge conflicts.

@fpgmaas
Copy link
Copy Markdown
Member

fpgmaas commented Mar 27, 2026

I tried to run it locally, by running make bake-with-inputs and then selecting zensical. I got;

Using CPython 3.13.5
Creating virtual environment at: .venv
      Built example-project @ file:///Users/florian/git/cookiecutter-uv/example-project
Installed 54 packages in 236ms
[error] Failed to load configuration: TOMLDecodeError: Invalid value (at line 2, column 13)

Seems like there is still a small issue somewhere.

MaKaNu added 15 commits March 27, 2026 10:31
while evaluating the current design and options mkdocs still stays present.
The config is stripped from generated comments

The config is mostly the default except the project entries
nav is also transfered from mkdocs.yml aswell as extra_css.

Additional a few features are enabled which were not present in mkdocs.yml:

### Edit Pages

`edit_uri` was set in `mkdocs.yml` but features were not activated.
The Features are now activated

### Markdown Extensions

They don't need to be present on Zensical they are builtin.

### Theme Pallete

Migrated to toml format

### Extra Social

Migrated to toml format

### Fonts

I left the fonts uncommented/default.
The fonts changed from mkdocs to Zensical but where not configured in mkdocs
The default fontsize is a bit larger than on mkdocs.
For me the old size matched better the nav.
previous the header bg was quite dark.
with mkdocs this was not an issue, because the colors where differently distributed.
I tried to achieve similiar with the light theme in zensical, but every change effected some other element.
So I decided to brighten the header background, so that the header fg is still readable without effecting the rest of the theme.
- precise the gitignore
- use zensical in Makefile
- replace mkdocs with zensical as dependencies
THIS COMMIT is not tested!

- replace mkdocs for zensical
- replace branch pages with pages-artifacts

The second is necessary and best practice since zensical does not support gh-deploy like mkdocs: https://zensical.org/compatibility/cli/
- update docs_tool parameter
- Extend tests to test for the different config files

New Test:

- test_zensical
@MaKaNu MaKaNu force-pushed the 87-add-support-for-using-zensical branch from 42a2cba to 7cac290 Compare March 27, 2026 09:36
@MaKaNu
Copy link
Copy Markdown
Contributor Author

MaKaNu commented Mar 27, 2026

I tried to run it locally, by running make bake-with-inputs and then selecting zensical. I got;

Using CPython 3.13.5
Creating virtual environment at: .venv
      Built example-project @ file:///Users/florian/git/cookiecutter-uv/example-project
Installed 54 packages in 236ms
[error] Failed to load configuration: TOMLDecodeError: Invalid value (at line 2, column 13)

Seems like there is still a small issue somewhere.

Ah, I somehow missed that quotes as I transferred from yaml to toml in the upper half of the zensical.toml

Additional added a validity test for the zensical.toml inside the template.

Merge Conflict solved by applying the update dependencies.

@MaKaNu MaKaNu marked this pull request as ready for review March 27, 2026 09:56
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.

Add support for using Zensical for documentation instead of MkDocs

2 participants