Skip to content

Closes #21635: Migrate from mkdocs to Zensical#21742

Merged
pheus merged 4 commits intofeaturefrom
21635-replace-mkdocs-with-zensical
Mar 25, 2026
Merged

Closes #21635: Migrate from mkdocs to Zensical#21742
pheus merged 4 commits intofeaturefrom
21635-replace-mkdocs-with-zensical

Conversation

@jeremystretch
Copy link
Copy Markdown
Member

Closes: #21635

  • Drop mkdocs from requirements.txt and add Zensical
  • Replace mkdocs with Zensical in CI and pre-commit tasks
  • Remove .info from the docs/ build directory (obsolete)
  • Update the legacy ReadTheDocs configuration

@jeremystretch jeremystretch requested review from a team and bctiemann and removed request for a team March 24, 2026 13:06
@pheus pheus requested review from pheus and removed request for bctiemann March 24, 2026 16:50
Copy link
Copy Markdown
Contributor

@pheus pheus left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! The migration looks really good overall.

I noticed a few items that I think would be worth addressing before this is merged:

Upgrade script

upgrade.sh still builds the local docs with mkdocs build.

Could we update that as well?

Layout

Could we also update the footer/layout snippet to reflect Zensical?

<div class="md-copyright">
  {% if config.copyright %}
    <div class="md-copyright__highlight">
      {{ config.copyright }}
    </div>
  {% endif %}
  {% if not config.extra.generator == false %}
    Made with
    <a href="https://zensical.org/" target="_blank" rel="noopener">
      Zensical
    </a>
  {% endif %}
</div>
{% if not config.extra.build_public %}
  <div class="md-copyright">
    ℹ️ Documentation is being served locally
  </div>
{% endif %}

CSS update for image background

I think the image background styling should also be updated for both light and dark themes:

[data-md-color-scheme="default"] .md-content img {
    background-color: hsla(0, 0%, 95%, 1);
}

[data-md-color-scheme="slate"] .md-content img {
    background-color: hsla(0, 0%, 25%, 1);
}

instead of:

.md-content img {
    background-color: rgba(255, 255, 255, 0.64);
}

@jeremystretch jeremystretch requested a review from pheus March 24, 2026 20:14
@jeremystretch
Copy link
Copy Markdown
Member Author

@pheus good catches, thanks. I've updated upgrade.sh and removed the custom HTML footer entirely as it's no longer necessary.

Regarding the style change, are there any specific instances that this fixes? Or is it just a recommended tweak in general?

@jeremystretch jeremystretch force-pushed the 21635-replace-mkdocs-with-zensical branch from 4c43ed5 to 12c4c65 Compare March 24, 2026 20:26
Copy link
Copy Markdown
Contributor

@pheus pheus left a comment

Choose a reason for hiding this comment

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

Thanks again!

On the style change, I do think it would be worth including as part of this PR if possible.

I noticed it in docs/installation/index.md, where the current image background comes across as fairly high-contrast in dark mode now that the new theme is noticeably darker than the previous MkDocs styling. Using theme-specific background values helps the images blend in much more naturally in both light and dark mode.

So while I don’t see it as a blocker, it does feel like a migration-related visual tweak rather than unrelated cleanup, which is why I’d lean toward including it here. That said, I’d also be fine treating it as follow-up polish if you’d prefer to keep this PR scoped.

@jeremystretch
Copy link
Copy Markdown
Member Author

Yep that makes sense. I ended up just removing our custom CSS as the transparent image works in both light and dark modes naturally.

@jeremystretch jeremystretch requested a review from pheus March 25, 2026 12:08
@pheus pheus merged commit 29239ca into feature Mar 25, 2026
8 checks passed
@pheus pheus deleted the 21635-replace-mkdocs-with-zensical branch March 25, 2026 15:48
@casperklein
Copy link
Copy Markdown

mkdocs appears to have been re-added to requirements.txt: https://github.com/netbox-community/netbox/blob/v4.6.0/requirements.txt#L26

Is this intentional?

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.

3 participants