From cef5341aeefa8c11d513c49e624f6777b7e23686 Mon Sep 17 00:00:00 2001 From: Natanael Arndt Date: Tue, 1 Aug 2017 14:36:34 +0200 Subject: [PATCH 1/2] shrink mwe and add plugin code --- Gemfile | 4 ---- _config.yml | 9 --------- _layouts/document.html | 7 ------- _plugins/TestGenerator.rb | 28 ++++++++++++++++++++++++++++ hallo/index.md | 4 ---- index.html | 5 ----- rdf-data/content.ttl | 11 ----------- 7 files changed, 28 insertions(+), 40 deletions(-) create mode 100644 _plugins/TestGenerator.rb delete mode 100644 hallo/index.md delete mode 100644 index.html delete mode 100644 rdf-data/content.ttl diff --git a/Gemfile b/Gemfile index 142b4b3..ab3115d 100644 --- a/Gemfile +++ b/Gemfile @@ -15,7 +15,3 @@ gem "jekyll", " ~>3.4" # uncomment the line below. To upgrade, run `bundle update github-pages`. # gem "github-pages", group: :jekyll_plugins -# If you have any plugins, put them here! -group :jekyll_plugins do - gem "jekyll-test-gem", :path => '../jekyll-test-gem' -end diff --git a/_config.yml b/_config.yml index e63eb04..01767c3 100644 --- a/_config.yml +++ b/_config.yml @@ -6,12 +6,3 @@ baseurl: "" # Build settings markdown: kramdown -# jekyll-rdf -plugins: - - jekyll-test-gem -jekyll_rdf: - path: "rdf-data/content.ttl" - class_template_mappings: - "http://xmlns.com/foaf/0.1/Document" : "document.html" - instance_template_mappings: - "http://xmlns.com/foaf/0.1/Document" : "document.html" diff --git a/_layouts/document.html b/_layouts/document.html index 700dba2..2e7759f 100644 --- a/_layouts/document.html +++ b/_layouts/document.html @@ -2,13 +2,6 @@ layout: "default" --- -

Content:
{{ content }} diff --git a/_plugins/TestGenerator.rb b/_plugins/TestGenerator.rb new file mode 100644 index 0000000..6070cd0 --- /dev/null +++ b/_plugins/TestGenerator.rb @@ -0,0 +1,28 @@ +require 'jekyll' +require 'pp' + +module Jekyll + + class CategoryPage < Page + def initialize(site, base, layout, path) + @site = site + @base = base + @name = path + self.process(@name) + self.read_yaml(File.join(base, '_layouts'), layout) + end + end + + class CategoryPageGenerator < Generator + safe true + + def generate(site) + site.pages << CategoryPage.new(site, site.source, "document.html", "Testfile1.html") + site.pages << CategoryPage.new(site, site.source, "document.html", "Testfile2.html") + site.pages << CategoryPage.new(site, site.source, "document.html", "Testfile3.html") + site.pages << CategoryPage.new(site, site.source, "document.html", "Testfile4.html") + end + end + +end + diff --git a/hallo/index.md b/hallo/index.md deleted file mode 100644 index 96a539f..0000000 --- a/hallo/index.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -layout: "default" ---- -This is index in Hallo diff --git a/index.html b/index.html deleted file mode 100644 index 69077f5..0000000 --- a/index.html +++ /dev/null @@ -1,5 +0,0 @@ ---- -layout: "document" ---- - -my Startpage diff --git a/rdf-data/content.ttl b/rdf-data/content.ttl deleted file mode 100644 index b7d6493..0000000 --- a/rdf-data/content.ttl +++ /dev/null @@ -1,11 +0,0 @@ -@prefix rdfs: . -@prefix foaf: . -@prefix ex: . - -ex: a foaf:Document ; - rdfs:label "This is the base page" . - - a foaf:Document . - -ex:project a foaf:Document ; - rdfs:label "Projects" . From e104f692822cada6998fab0dd08ec9801e02e109 Mon Sep 17 00:00:00 2001 From: Natanael Arndt Date: Fri, 11 Aug 2017 16:42:28 +0200 Subject: [PATCH 2/2] Forward to latest jekyll --- Gemfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index ab3115d..673e8b4 100644 --- a/Gemfile +++ b/Gemfile @@ -9,9 +9,8 @@ ruby RUBY_VERSION # # This will help ensure the proper Jekyll version is running. # Happy Jekylling! -gem "jekyll", " ~>3.4" +gem "jekyll", " ~>3.5.1" # If you want to use GitHub Pages, remove the "gem "jekyll"" above and # uncomment the line below. To upgrade, run `bundle update github-pages`. # gem "github-pages", group: :jekyll_plugins -