Hi !
I really like the way you handle documentation using markdown pages (https://github.com/raspberrypi/documentation/) which are then nicely displayed on the main website:
https://www.raspberrypi.org/documentation/
On our project, we also have markdown documentation hosted on github but we do not have the nice HTML/CSS template you have to render static documentation pages.
So I would like to know more about the techno your are using ?
Thanks !
Matthieu
Re: What techno do you use to generate the documentation ?
So I continue looking for hints in the source code about the way you do.
It seems there is a wordpress somewhere and the few ruby code on the repository transform markdown syntax into HTML one.
I just need to find the black matter which link the 2...
It seems there is a wordpress somewhere and the few ruby code on the repository transform markdown syntax into HTML one.
I just need to find the black matter which link the 2...
Re: What techno do you use to generate the documentation ?
Have a look at Parsedown: http://parsedown.org/
The css could be anything from anywhere that styles basic html.
Code: Select all
<?php
include("Parsedown.php");
$markdown = file_get_contents('path/to/file.md');
$markup = Parsedown::instance()->text($markdown);
echo $markup;
?>
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com
Re: What techno do you use to generate the documentation ?
Thanks for the link, I did not know this tool.
Yet I'm not sure this is used on the raspberry pi documentation, 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.
Yet I'm not sure this is used on the raspberry pi documentation, 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.
Re: What techno do you use to generate the documentation ?
It'd be interesting to know what those files are about. They possibly have something to do with automatically updating the website after a commit/push. Not sure.
I'm using a simple bash script to wget the raw .md files from github to an offline directory, renaming them appropriately and then ftp it to the live website. My workflow is:
Lo-tech, but efficient.
Obviously, ftp straight from the source directory works too, but I'm too lazy for that. Too many files and names to remember.
I'm using a simple bash script to wget the raw .md files from github to an offline directory, renaming them appropriately and then ftp it to the live website. My workflow is:
Code: Select all
git push origin master
./updatewebsite.sh
Obviously, ftp straight from the source directory works too, but I'm too lazy for that. Too many files and names to remember.
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com
Re: What techno do you use to generate the documentation ?
Travis is instructed to use the Rakefile to render and test the Markdown. The renderer is redcarpet.
How the result gets onto the official website is a mystery to me too.
ghans
How the result gets onto the official website is a mystery to me too.
ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
- ben_nuttall
- Posts: 235
- Joined: Sun Aug 19, 2012 11:19 am
- Location: Cambridgeshire, UK
- Contact: Website Twitter
Re: What techno do you use to generate the documentation ?
I can confirm it does use Parsedown.MatthieuL wrote:Yet I'm not sure this is used on the raspberry pi documentation
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.
The learning resources work in the same way, but with a much more bespoke template. Depending on the request, either a cover page, requirements page, worksheet, etc. is rendered. These templates pull in bits of other files, and use YAML files for other config.
I wrote about the non-technical side of this - why we do it, etc, at opensource.com
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.
Former RPF staff. Author of gpiozero and creator of piwheels.
Re: What techno do you use to generate the documentation ?
Thanks for the followup . The articles at opensource.com are interesting too.
ghans
ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Re: What techno do you use to generate the documentation ?
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.
However, for a non-web-dev like me, it seems there is a lot of step before making all this work correctly.
Does your website is somehow "open", i.e. can you share the code you have so we can see how it is actually done ?
- the htaccess redierctions
- index.php
- the template
- DougieLawson
- Posts: 40512
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
- Contact: Website Twitter
Re: What techno do you use to generate the documentation ?
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.
[snip]
I wrote about the non-technical side of this - why we do it, etc, at opensource.com
Any language using left-hand whitespace for syntax is ridiculous
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.
Any requirement to use a crystal ball or mind reading will result in me ignoring your question.
Re: What techno do you use to generate the documentation ?
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.
https://help.github.com/articles/github ... -markdown/
Microcontroller addon boards and software for Raspberry Pi A+/B+/Pi2:
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com
- ARMinARM: ARM Cortex-M3 (STM32)
- AVRPi: ATmega32U4 & ATmega328 ("Arduino")
http://www.onandoffables.com
Re: What techno do you use to generate the documentation ?
I am using markdown with daux.io, it takes a directory filled with markdown files and then creates a boostrap3 based
page, it creates offline docs too. there are others too...
page, it creates offline docs too. there are others too...