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

Fix Custom Rendering Markdown example #102

Merged
merged 3 commits into from Nov 14, 2020
Merged

Fix Custom Rendering Markdown example #102

merged 3 commits into from Nov 14, 2020

Conversation

NickCrews
Copy link
Collaborator

This is an attempt to fix #87 and #91

To see the new version of the documentation after this change, see https://staticjinja.readthedocs.io/en/fix-md-docs

@PatrickMassot @garyrob @jboynyc @Minkiu, you all had some interaction with those two issues, if you're interested I'd love you feedback on this.

Move example/ into examples/simple so that we can add other examples.
This is the start of a fix for #87, where the current markdown rendering example is totally outdated.

Instead of just fixing the examples embedded in the docs, I wanted to give users a fully featured example that they could run straightaway or copy adn modify. This format of examples folder could also could be used for tests, not sure yet...
See issues #87 and #91 for more context.

I unified the language from `compile` to `render` because that is the term the source code and API uses for this step in the build process. I'm not sure if my definition of the rendering step is very good/complete/clear.

I tweaked @PatrickMassot's example if #87:
1. Use the markdown instead of mistletoe library, I'm more familiar with it and it seems more popular?
2. Do the md->html translation in the context generator because that's simple, the point of this example was to show off the custom render function.
3. Don't use the Path library, instead just use vanilla os.path utilities, as I think they may be mofre familiar to people.
4. Don't use a jinja2 extension, that is sorta out of scope I think? I was just trying to show off custom rendering functions.
@NickCrews NickCrews linked an issue Nov 14, 2020 that may be closed by this pull request
@NickCrews NickCrews merged commit 3ba7311 into main Nov 14, 2020
@NickCrews NickCrews deleted the fix-md-docs branch November 24, 2020 01:15
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.

Problem with documentation Compilation Rules example Compilation rule example
1 participant