boostorg/website-v2

Privacy Policy and TOS to Render from Markdown from Existing URLs

Closed this issue · 1 comments

The only time our MarkdownTemplateView gets triggered is when the URL matches ^markdown/(?P.+)/? - but for the privacy policy and TOS, we want them to have normal paths - and the StaticContentTemplateView is already a catch-all where no "markdown" folder would be needed.

Rather than try to either create some intermediary view which would make a determination, or modify the StaticContentTemplateView itself to somehow accommodate it, I'm creating a custom argument to the MarkdownTemplateView for 'markdown_local' which will look for the MD source in templates/markdown.

Possibly something to have someone take a look at in the future, and let me know what might be a better practice, but this seems to be working fine.

This was necessary since the new versions of the content for these pages was provided in markdown format - and I don't believe these are files we would want anyone to have the ability to contribute edits to. (but- going to ask about that now, and if so, new issue shall come)

Also added frontmatter into the MD files for setting page title. Left description and author blank.