Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial single-page docs #66

Merged
merged 4 commits into from
Aug 6, 2024
Merged

Initial single-page docs #66

merged 4 commits into from
Aug 6, 2024

Conversation

fmalita
Copy link
Member

@fmalita fmalita commented Jul 23, 2024

Using mkdocs-print-site-plugin:

  • add a single-page version of the docs under lottie-spec/print_page/

  • hide live examples from the consolidated page

Using mkdocs-print-site-plugin:

 * add a single-page version of the docs under lottie-spec/print_page/
 * hide live examples from the consolidated page
@fmalita
Copy link
Member Author

fmalita commented Jul 23, 2024

The TOC may need some cleanup/tweaking, maybe someone more familiar with mkdocs can take a stab.

Copy link
Contributor

@b-wils b-wils left a comment

Choose a reason for hiding this comment

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

What's the intended discovery path for this? I couldn't find a link anywhere, so ended up looking up the docs.

Maybe we can add a link to index.md or in the nav bar?

@fmalita
Copy link
Member Author

fmalita commented Jul 24, 2024

I intentionally left it hidden for now because the TOC may require some extra polishing. But yeah, a link in index.md or nav bar is exactly where I think it should end up.

@mbasaglia
Copy link
Member

I wonder if we can inject a tree processor that cleans up empty sections before the TOC is generated

@fmalita
Copy link
Member Author

fmalita commented Aug 2, 2024

I wonder if we can inject a tree processor that cleans up empty sections before the TOC is generated

AFAICT markdown processors are not applied to plugin output...

Maybe we could have a separate mkdocs config just for the single page version? Or a separate mkdocs config for the actual spec content ?

@fmalita
Copy link
Member Author

fmalita commented Aug 2, 2024

What's the intended discovery path for this? I couldn't find a link anywhere, so ended up looking up the docs.

Maybe we can add a link to index.md or in the nav bar?

Added a link in "Where to start".

@mbasaglia
Copy link
Member

I patched the plugin: timvink/mkdocs-print-site-plugin#112

We can reference it as git+https://github.com/mbasaglia/mkdocs-print-site-plugin.git@clean-toc for pip packages (you might need to uninstall the old one first)

mkdocs.yml Show resolved Hide resolved
@fmalita
Copy link
Member Author

fmalita commented Aug 5, 2024

I patched the plugin: timvink/mkdocs-print-site-plugin#112

We can reference it as git+https://github.com/mbasaglia/mkdocs-print-site-plugin.git@clean-toc for pip packages (you might need to uninstall the old one first)

Thanks, done!

@mbasaglia
Copy link
Member

Could we use this to make a PDF as well?

@fmalita
Copy link
Member Author

fmalita commented Aug 6, 2024

I think it's doable but the process is not exactly straightforward (Chrome printing + Puppeteer): https://timvink.github.io/mkdocs-print-site-plugin/how-to/export-PDF.html#automated-export-using-nodejs-and-chrome

@mbasaglia
Copy link
Member

I guess if someone wants the PDF they could print to file anyway

@fmalita fmalita merged commit afb9e63 into lottie:main Aug 6, 2024
3 checks passed
@mbasaglia
Copy link
Member

I patched the plugin: timvink/mkdocs-print-site-plugin#112

We can reference it as git+https://github.com/mbasaglia/mkdocs-print-site-plugin.git@clean-toc for pip packages (you might need to uninstall the old one first)

The patch got merged, so if they make a release we can switch back to the official package

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