From 7794f55afea67e65d0ca061191e4309036ad8321 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Fri, 3 Apr 2015 21:51:32 +0200 Subject: [PATCH] Migrate website to Jekyll --- _config.yml | 3 + src/default.template => _layouts/default.html | 18 +++--- src/10.about.page => about.textile | 5 +- config.yaml | 29 --------- src/40.contact.page => contact.textile | 3 +- src/default.css => default.css | 21 +++---- ext/init.rb | 3 - ext/stat.rb | 61 ------------------- src/00.index.page => index.textile | 4 +- src/30.links.page => links.textile | 3 +- src/20.services.page => services.textile | 5 +- 11 files changed, 33 insertions(+), 122 deletions(-) create mode 100644 _config.yml rename src/default.template => _layouts/default.html (55%) rename src/10.about.page => about.textile (98%) delete mode 100644 config.yaml rename src/40.contact.page => contact.textile (97%) rename src/default.css => default.css (92%) delete mode 100644 ext/init.rb delete mode 100644 ext/stat.rb rename src/00.index.page => index.textile (98%) rename src/30.links.page => links.textile (98%) rename src/20.services.page => services.textile (97%) diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..ac7b454 --- /dev/null +++ b/_config.yml @@ -0,0 +1,3 @@ +# Don't interprete hard breaks in Textile +redcloth: + hard_breaks: false diff --git a/src/default.template b/_layouts/default.html similarity index 55% rename from src/default.template rename to _layouts/default.html index 44f3e63..1cdeee1 100644 --- a/src/default.template +++ b/_layouts/default.html @@ -2,30 +2,34 @@ - The Luon Network - {title: } - + The Luon Network - {{ page.title }} +
- + {{ content }}
diff --git a/src/10.about.page b/about.textile similarity index 98% rename from src/10.about.page rename to about.textile index 87b48ea..3d61e88 100644 --- a/src/10.about.page +++ b/about.textile @@ -1,6 +1,7 @@ ---- +--- title: About Us -in_menu: true +layout: default +weight: 10 --- h2. About the Luon Network; diff --git a/config.yaml b/config.yaml deleted file mode 100644 index ff65bfc..0000000 --- a/config.yaml +++ /dev/null @@ -1,29 +0,0 @@ -##### -# This is the YAML configuration file for webgen used to set configuration options. -# -# The general syntax is: -# -# configuration.option.name: value -# -# For example, to set a different default language, you would do: -# -# website.lang: de -# -# Have a look at the documentation of the individual configuration options to see the allowed format -# of the values. Since this is a YAML file, you can easily set configuration options as strings, -# integers, dates, arrays, hashes and more. -# -# The available configuration options can be found on the homepage in the Configuration Option -# Reference at -# -# http://webgen.rubyforge.org/documentation/reference_configuration.html -# -# Some common use cases are shown below. -##### - -## The default processing pipeline for page files. If you use a different markup language you need to -## change 'markdown' to the short name of the content processor for the markup language. -default_processing_pipeline: - Page: erb,tags,textile,blocks,fragments - -tag.date.format: '%A, %B %d %H:%M:%S %Z %Y' diff --git a/src/40.contact.page b/contact.textile similarity index 97% rename from src/40.contact.page rename to contact.textile index 1d13635..85224fb 100644 --- a/src/40.contact.page +++ b/contact.textile @@ -1,6 +1,7 @@ --- title: Contact Info -in_menu: true +layout: default +weight: 40 --- h2. Luon Network Contact Info; diff --git a/src/default.css b/default.css similarity index 92% rename from src/default.css rename to default.css index 7bc4063..3c475d2 100644 --- a/src/default.css +++ b/default.css @@ -142,13 +142,6 @@ table td { line-height: 1.2em; } -#menu a { - color: #594d3c; - background-color: inherit; - text-decoration: none; - border-bottom: none; -} - #menu a:hover { text-decoration: underline; } @@ -164,13 +157,13 @@ table td { padding: 0.5em 0em; /* inter-item padding */ } -#menu li.webgen-menu-item-selected { - font-weight: bold; +#menu li a { + color: #594d3c; + background-color: inherit; + text-decoration: none; + border-bottom: none; } -#menu li > ul { - font-weight: normal; - padding-top: 0.5em; /* padding in front of first item */ - padding-left: 1.2em; /* indentation */ - padding-right: 0em; +#menu li a.active { + font-weight: bold; } diff --git a/ext/init.rb b/ext/init.rb deleted file mode 100644 index ed4fd86..0000000 --- a/ext/init.rb +++ /dev/null @@ -1,3 +0,0 @@ -$LOAD_PATH << "ext" - -require "stat" diff --git a/ext/stat.rb b/ext/stat.rb deleted file mode 100644 index 6255f21..0000000 --- a/ext/stat.rb +++ /dev/null @@ -1,61 +0,0 @@ -# -*- encoding: utf-8 -*- -# -# This webgen plugin extends the available tags with tags that can retrieve -# stat(2) information. -# -# Copyright (2012) Paul van Tilburg - -# This plugin is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 2 of the License, or (at your -# option) any later version. - -module Webgen::Tag - - # Tag that puts the access time and date of the file on the page - class FileATimeTag - - include Base - - def call(tag, body, context) - atime = File.atime(File.join('src', context.content_node.node_info[:src])) - return atime.strftime(param('tag.fileatime.format')) - end - - end # class FileADateTag - - # Tag that puts the create time and date of the file on the page. - class FileCTimeTag - - include Base - - def call(tag, body, context) - ctime = File.ctime(File.join('src', context.content_node.node_info[:src])) - return ctime.strftime(param('tag.filectime.format')) - end - - end # class FileCDateTag - - # Tag that puts the modification time and date of the file on the page. - class FileMTimeTag - - include Base - - def call(tag, body, context) - mtime = File.mtime(File.join('src', context.content_node.node_info[:src])) - return mtime.strftime(param('tag.filemtime.format')) - end - - end # class FileMDateTag - - include Webgen::WebsiteAccess - - website.config.tag.fileatime.format '%A, %B %d %H:%M:%S %Z %Y', :mandatory => 'default' - website.config.tag.filectime.format '%A, %B %d %H:%M:%S %Z %Y', :mandatory => 'default' - website.config.tag.filemtime.format '%A, %B %d %H:%M:%S %Z %Y', :mandatory => 'default' - - website.config['contentprocessor.tags.map']['fileatime'] = FileATimeTag.to_s - website.config['contentprocessor.tags.map']['filectime'] = FileCTimeTag.to_s - website.config['contentprocessor.tags.map']['filemtime'] = FileMTimeTag.to_s - -end diff --git a/src/00.index.page b/index.textile similarity index 98% rename from src/00.index.page rename to index.textile index 605b4da..cfc6414 100644 --- a/src/00.index.page +++ b/index.textile @@ -1,7 +1,7 @@ --- title: Home -in_menu: true -directoryName: The Luon Network; +layout: default +weight: 0 --- h2. Welcome to the Luon Network; diff --git a/src/30.links.page b/links.textile similarity index 98% rename from src/30.links.page rename to links.textile index 16f6ecf..84d6cc4 100644 --- a/src/30.links.page +++ b/links.textile @@ -1,6 +1,7 @@ --- title: Some Links -in_menu: true +layout: default +weight: 30 --- h2. Luon Network Links; diff --git a/src/20.services.page b/services.textile similarity index 97% rename from src/20.services.page rename to services.textile index 380e169..0d4d091 100644 --- a/src/20.services.page +++ b/services.textile @@ -1,6 +1,7 @@ ---- +--- title: Our Services -in_menu: true +layout: default +weight: 20 --- h2. Luon Network Services;