Code: Select all
<?php include("Parsedown.php"); $markdown = file_get_contents('path/to/file.md'); $markup = Parsedown::instance()->text($markdown); echo $markup; ?>
Code: Select all
git push origin master ./updatewebsite.sh
I can confirm it does use Parsedown.MatthieuL wrote:Yet I'm not sure this is used on the raspberry pi documentation
The Travis CI stuff is nothing to do with the markdown->HTML parsing. It's just a continuous integration build that tests the markdown is ok, no broken links, etc.MatthieuL wrote:or I do not undestand why there is a gemfile and a rakefile on the github repo.
It seems there is something build on the github server (travis config) then something get the HTML and display it with a template on the main website.
Thanks ben, it is more clear now.ben_nuttall wrote: I have an .htaccess file that redirects all requests into index.php, which looks up the request inside the docs folder (a clone of the repo), and renders it in a template to make it look like the rest of the website.
That's for sharing that. And thanks to panik for the link to "Parsedown", I've snagged a copy of that as being able to test my markdown before I publish it on Github has lots of value.ben_nuttall wrote: I can confirm it does use Parsedown.
I wrote about the non-technical side of this - why we do it, etc, at opensource.com
It might be noteworthy that github uses a 'github flavored markdown' which Parsedown renders correctly.DougieLawson wrote:That's for sharing that. And thanks to panik for the link to "Parsedown", I've snagged a copy of that as being able to test my markdown before I publish it on Github has lots of value.