Jekyll is a tool called a “static site generator”. The goal of a static site generator is to effectively separator a site’s content from its layout and style.
In Jekyll, content is stored in Markdown, a simple markup language designed for simplicity and readability. The site’s layout is built up from page templates using Markdown, HTML (including insertable reusable fragments), and a simple programming language called “liquid tags”. Each page, and the site overall, can have metadata stored in YAML (“Yet Another Markup Language”) that can be used to select templates and define variables that are used to build the page. When Jekyll is run, it processes the templates, tags, metadata, and content and generates HTML files that can be served by Jekyll itself or another webserver like Apache
or nginx
.
In 2016-04, GitHub announced they were standardized on one Markdown engine, kramdown, for GitHub Pages. Kramdown extends vanilla Markdown with some additional syntax, including inline attribute lists for assigning classes to block and inline elements without the use of HTML tags.
Jonathan McGlone’s Creating and Hosting a Personal Site on GitHub is the best guide I’ve found so far, especially for someone who wants to take a totally custom ground-up approach and not just recycle a template.
The official documentation has a page on customizing a static site built with Jekyll using options in the _config.yml
file. YAML options can even be nested lists.
Many tutorials discuss how to configure your site as a blog using a _blogpost collection, but the collections feature is flexible and powerful enough to implement all kinds of site structures.
Liquid tags are the key to fully utilizing Jekyll; they’re discussed in-depth in the Shopify documentation (Shopify is a tool built on Jekyll).
Avoid problems with relative links by using <pre>http://bcwiki.brandoncurtis.com</pre> in Liquid scripts.
Philip Ashlock’s Mediawiki-to-Markdown converter will convert your wiki’s XML dumps directly to Markdown with frontmatter (or any one of a variety of other Pandoc-supported formats).
https://www.mediawiki.org/wiki/Manual:DumpBackup.php
php dumpBackup.php –conf /var/www2/www-bsc/wiki/LocalSettings.php –full > dump.xml
sudo apt-get install php5-cli
curl -sS https://getcomposer.org/installer | php php composer.phar install
getcomposer.org curl -sS https://getcomposer.org/installer | sudo php – –install-dir=/usr/local/bin –filename=composer
php convert.php –filename=mediawiki.xml –output=export –indexes=true php convert.php –filename=”../www-bsc.wiki/dump.xml” –output=export –indexes=true
## How It’s Done
THIS IS WHAT WE WANT:
https://www.mediawiki.org/wiki/Manual:DumpBackup.php
brandon@patientzero: /var/www2/wikis/wiki-bsc/maintenance$ php dumpBackup.php –current –conf /var/www2/wikis/wiki-bsc/LocalSettings.php > /home/brandon/backups/dump-bcwiki.xml
can restrict by namespace (we want 0):
https://www.mediawiki.org/wiki/Manual:Namespace
php dumpBackup.php –current –filter=namespace:10 > templates.xml
This tool sometimes chokes on nested tables, so you may have to do some manual cleanup!
References:
## mysqldump generates invalid xml
mysqldump -h localhost -u wikiuser wiki_bsc | gzip > /home/brandon/backups/backup-wiki-bsc-$today.sql.gz |
mysqldump -h localhost -u wikiuser –xml wiki_bsc | gzip > /home/brandon/backups/backup-wiki-bsc-$today.xml.gz |
This yields garbage data!
<field Field="user_touched" Type="binary(14)" Null="NO" Key="" Default="^@^@^@^@^@^@^@^@^@^@^@^@^@^@" Extra="" Comment="" />
<field Field="user_token" Type="binary(32)" Null="NO" Key="" Default="^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@" Extra="" Comment="" />
This problem is referenced elsewhere:
“mysqldump produces invalid xml when data contains blobs. It should respect the hex-blob switch, but it is ignored.”
Jekyll guides
Other articles