Trying to create a wiki site similar to gramex help document.
For that, I have gramex.yaml
that reads
url:
main:
pattern: /$YAMLURL/
handler: FileHandler
kwargs:
index: false
path:
"": $YAMLPATH/{dir}/readme.md
transform:
"*.md":
encoding: utf-8
function: markdown.markdown(content)
headers:
Content-Type: text/html; charset=UTF-8
File tree looks like:
$ tree
.
├── behave
│ └── readme.md
├── gramex.yaml
└── readme.md
But it does not seem to render any MARKDOWN
files as HTML
.
Do I need to create this markdown.markdown function?
or Is this function readily available in gramex?
Edit 1:
The render issue came because of {dir}
in path
.
Solution:
Remove {dir}
and make the new path as :- $YAMLPATH/readme.md
EDIT 2: NEW PROBLEM
Markdown tables are not rendered I have a table in the markdown as:
| Criteria | Behave | Pytest |
| --- | --- | --- |
| Readability | Tests are written in natural language format, making them easier to understand by both technical and non-technical stakeholders. | Tests are written in code format, which can be challenging for non-technical stakeholders to understand. |
That must be rendered as: