README.md styling issues
Closed this issue · 3 comments
There are several issues with README.md conversion in terms of styling. Using Update Manager as an example.
- https://github.com/xxsimoxx/codepotent-update-manager/
- Not published yet: https://staging-directory.classicpress.net/?post_type=plugin&p=1079&preview=true
Issues
For reference, I found out GitHub has an API to render markdown to HTML. Not sure if it's usable for us:
https://docs.github.com/en/rest/markdown?apiVersion=2022-11-28
And this project provides stylesheets:
https://github.com/KrauseFx/markdown-to-html-github-style
Related to GitHub Markdown API, I ran a test and it seems to work. The API key required for authorization can be ClassyBot.
curl -X POST --data-binary @README.md https://api.github.com/markdown/raw --header "Content-Type:text/x-markdown" --header "Authorization: Bearer XXXXXXXXXXXXXXXX" > a.html
If using API, the raw endpoint doesn't support GitHub Flavored Markdown. It only supports standard markdown.
Parsedown seems to be outdated. So if not the API, the other possible option to test is
https://github.com/michelf/php-markdown
Using Update Manager as an example, here's what the HTML code looks like converted using API. Much cleaner than parsedown.
a.html.txt