jekyll-theme-paperwiki 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bd5647356250d27a51862ad94ca40a17ba4ec33bec742b95d09a3dc38c0f3d9b
4
- data.tar.gz: 817ac6d86315dac8b99e4e8c88f07ae5d5ecb0b4028f4fa70ca21127287ece04
3
+ metadata.gz: dd9bd7015a5fd9b6b1ea1139ce529d52c0d769b96585cc00800a3bf1db28d571
4
+ data.tar.gz: 358584149a0141a2f73b19565ae0a17a3a8d233fac4d153788a59b105148bf45
5
5
  SHA512:
6
- metadata.gz: c0ead5a13368865eca2b9c0d8c190dd563182b5b3ec085214b34230203583196e2fc2d2c4efe192cec12fb151ae75fba9a19977136c7eda1252de50b5664a163
7
- data.tar.gz: 89ae3bfe1fc0eaf2ef2bf0991bb2eb0e74c44be1f9f8f1c9ae25fd0c08a0e4bf5759c581498e35528ea31d2124a27647071b6644288ce659b1d933b2dfb5cfca
6
+ metadata.gz: '0900591839357e2f3ef3059d75b50dec0ed9b6863248eb69a80bbc4d77ab4d9a0d156fe1fe0e0e701f4256aa77b4a69452de5e4cf13f2f40c3d7f60feda38bf7'
7
+ data.tar.gz: 76c2dc278a7d1a4f33f0faf737ce1a2116538273d8108ede6da2b612b74b3fc5a5d670a5370ff0e1d344113c9a34c4810a816fd2bcf6d3ba7e9c320c636fa7e3
data/README.md CHANGED
@@ -97,6 +97,9 @@ All of your wiki pages should be written in markdown, and you must begin each `.
97
97
 
98
98
  Between these two lines is where you include *front matter*, such as specifying the layout or the permalink to the page. However, you can leave the front matter blank - wiki pages have layouts and permalinks set by default in the theme's config file, and you only need to specify them if you want to override the defaults. You also do not need to specify a title for the page, as it is automatically taken from the filename. All you absolutely need is the two triple-dashed lines, as Jekyll needs it to know that the front matter is there in order to output the page.
99
99
 
100
+ Caveats:
101
+ - if the site won't build due to an error with the random page, make sure you have more than one wiki article for it to draw from
102
+
100
103
 
101
104
 
102
105
  ## Config
data/_config.yml CHANGED
@@ -1,5 +1,6 @@
1
- # Build settings
2
- include: ['_pages'] # forces custom pages to be organized into their own directory
1
+
2
+ random_redirect:
3
+ pages: true
3
4
 
4
5
  collections_dir: collections
5
6
  collections:
@@ -7,9 +8,6 @@ collections:
7
8
  output: true
8
9
  permalink: /:collection/:name
9
10
 
10
- random_redirect:
11
- pages: true
12
-
13
11
  # Front matter defaults, so you don't need to set layouts on every new page.
14
12
  # As long as pages are in the correct folder, they'll automatically have the
15
13
  # correct layout. You can override this via each page's front matter.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-paperwiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - pomeloshark
@@ -26,7 +26,6 @@ dependencies:
26
26
  version: '4.2'
27
27
  description:
28
28
  email:
29
- - pomeloshark@proton.me
30
29
  executables: []
31
30
  extensions: []
32
31
  extra_rdoc_files: []
@@ -51,17 +50,6 @@ files:
51
50
  - _layouts/reference_desk.html
52
51
  - _layouts/wiki.html
53
52
  - _layouts/work.html
54
- - _pages/random.html
55
- - _pages/search.md
56
- - _pages/wiki/wiki.md
57
- - _pages/wiki/wiki_all.md
58
- - _pages/wiki/wiki_contents.md
59
- - _pages/wiki/wiki_random.md
60
- - _pages/wiki/wiki_search.md
61
- - _plugins/gloss.rb
62
- - _plugins/interlinear.rb
63
- - _plugins/ipa.rb
64
- - _plugins/lang.rb
65
53
  - _sass/partials/_base.scss
66
54
  - _sass/partials/_blog.scss
67
55
  - _sass/partials/_collections.scss
data/_pages/random.html DELETED
@@ -1,41 +0,0 @@
1
- ---
2
- # Jekyll page that redirects to a random page, post or document
3
- # https://github.com/jekylltools/jekyll-random-redirect
4
- # v1.6
5
- permalink: /random
6
- ---
7
-
8
- {%- assign docs = site.posts -%}
9
-
10
- {%- if site.random_redirect.pages == true -%}
11
- {%- assign pages = site.documents | where_exp:"page","page.url != '/random/'" -%}
12
- {%- assign docs = docs | concat: pages -%}
13
- {%- endif -%}
14
-
15
- {%- if site.random_redirect.documents == true -%}
16
- {%- assign docs = docs | concat: site.documents | uniq -%}
17
- {%- endif -%}
18
-
19
- <script type="text/javascript">
20
- var urls=[];
21
-
22
- {% for doc in docs -%}
23
- urls.push("{{ doc.url | absolute_url }}");
24
- {% endfor -%}
25
-
26
- var url = urls[Math.floor(Math.random()*urls.length)];
27
- var link = document.createElement('link');
28
- link.setAttribute('rel', 'canonical');
29
- link.setAttribute('href', url);
30
- document.head.appendChild(link);
31
-
32
- if (typeof IE_fix != "undefined") {
33
- document.write("Redirecting...");
34
- var referLink = document.createElement("a");
35
- referLink.href = url;
36
- document.body.appendChild(referLink);
37
- referLink.click();
38
- } else {
39
- window.location.replace(url);
40
- }
41
- </script>
data/_pages/search.md DELETED
@@ -1,25 +0,0 @@
1
- ---
2
- permalink: /search
3
- title: Search results
4
- ---
5
-
6
- <h1>{{ page.title }}</h1>
7
-
8
- <dl id="search-results"></dl>
9
-
10
- <script>
11
- window.pages = {
12
- {% for page in site.documents %}
13
- "{{ page.url | slugify }}": {
14
- "title": "{{ page.title | xml_escape }}",
15
- "content": {{ page.content | markdownify | strip_newlines | strip_html | jsonify }},
16
- "url": "{{ site.url | append: page.url | xml_escape }}",
17
- "path": "{{ page.url | xml_escape }}"
18
- }{% unless forloop.last %},{% endunless %}
19
- {% endfor %}
20
- };
21
- </script>
22
-
23
-
24
- <script src="/assets/js/lunr.js"></script>
25
- <script src="/assets/js/search.js"></script>
data/_pages/wiki/wiki.md DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- layout: reference_desk
3
- permalink: /wiki
4
- ---
@@ -1,13 +0,0 @@
1
- ---
2
- layout: collections
3
- title: All wiki articles
4
- permalink: /wiki:all
5
- ---
6
-
7
- <ul class="collections_list">
8
- {% for wiki in site.wiki %}
9
- <li>
10
- <a href="{{ wiki.url }}">{{ wiki.title }}</a>
11
- </li>
12
- {% endfor %}
13
- </ul>
@@ -1,19 +0,0 @@
1
- ---
2
- layout: collections
3
- title: Wiki contents
4
- permalink: /wiki:contents
5
- ---
6
-
7
- The information in this wiki is organized into the following subject portals. Each portal broadly surveys and is further organized into various levels of subcategories.
8
-
9
- {% for item in site.data.portals_wiki %}
10
- <dl class="">
11
- <dd><a href="{{ item.link }}">{{ item.name }}</a></dd>
12
- <dt>{{ item.contents }}</dt>
13
- </dl>
14
- {% endfor %}
15
-
16
- ## Special categories
17
-
18
- + Timelines
19
- + Glossaries
@@ -1,41 +0,0 @@
1
- ---
2
- # Jekyll page that redirects to a random page, post or document
3
- # https://github.com/jekylltools/jekyll-random-redirect
4
- # v1.6
5
- permalink: /wiki:random
6
- ---
7
-
8
- {%- assign docs = site.posts -%}
9
-
10
- {%- if site.random_redirect.pages == true -%}
11
- {%- assign pages = site.wiki | where_exp:"page","page.url != '/random/'" -%}
12
- {%- assign docs = docs | concat: pages -%}
13
- {%- endif -%}
14
-
15
- {%- if site.random_redirect.documents == true -%}
16
- {%- assign docs = docs | concat: site.documents | uniq -%}
17
- {%- endif -%}
18
-
19
- <script type="text/javascript">
20
- var urls=[];
21
-
22
- {% for doc in docs -%}
23
- urls.push("{{ doc.url | absolute_url }}");
24
- {% endfor -%}
25
-
26
- var url = urls[Math.floor(Math.random()*urls.length)];
27
- var link = document.createElement('link');
28
- link.setAttribute('rel', 'canonical');
29
- link.setAttribute('href', url);
30
- document.head.appendChild(link);
31
-
32
- if (typeof IE_fix != "undefined") {
33
- document.write("Redirecting...");
34
- var referLink = document.createElement("a");
35
- referLink.href = url;
36
- document.body.appendChild(referLink);
37
- referLink.click();
38
- } else {
39
- window.location.replace(url);
40
- }
41
- </script>
@@ -1,24 +0,0 @@
1
- ---
2
- permalink: /wiki:search
3
- title: Search results
4
- ---
5
-
6
- <h1>{{ page.title }}</h1>
7
-
8
- <dl id="search-results"></dl>
9
-
10
- <script>
11
- window.pages = {
12
- {% for page in site.wiki %}
13
- "{{ page.url | slugify }}": {
14
- "title": "{{ page.title | xml_escape }}",
15
- "content": {{ page.content | markdownify | strip_newlines | strip_html | jsonify }},
16
- "url": "{{ site.url | append: page.url | xml_escape }}",
17
- "path": "{{ page.url | xml_escape }}"
18
- }{% unless forloop.last %},{% endunless %}
19
- {% endfor %}
20
- };
21
- </script>
22
-
23
- <script src="/assets/js/lunr.js"></script>
24
- <script src="/assets/js/search.js"></script>
data/_plugins/gloss.rb DELETED
@@ -1,22 +0,0 @@
1
- module Jekyll
2
- module InterlinearGlossFilter # Liquid just uses the method name as the filter name; there's no extra level of name-mapping like there is with tags and blocks
3
-
4
- def gloss(input) # will be available as the "gloss" filter
5
- @text = input
6
- # puts "<tr>"
7
-
8
- # lexemes = @text.split(" ")
9
- # lexemes.each do |word|
10
- # puts "<td class=\"gloss_item\">#{word}</td>"
11
- # end
12
-
13
- # puts "</tr>"
14
-
15
- # morphemic_analysis
16
- # morphemic_gloss
17
-
18
- end
19
- end
20
- end
21
-
22
- Liquid::Template.register_filter(Jekyll::InterlinearGlossFilter)
@@ -1,24 +0,0 @@
1
- module Jekyll
2
- module Tags
3
- class InterlinearGlossTag < Liquid::Block
4
-
5
- require "shellwords"
6
-
7
- # initialize is called when we encounter the {% interlinear %} Liquid tag; 'interlinear' is the tag name and anything immediately after it is passed in via the second argument
8
- def initialize(tag_name, text, tokens)
9
- super
10
- # @text = text.shellsplit
11
- # @wordcount = @text[0].length
12
- # object_lang, morphemic_analysis, morphemic_gloss, target_lang
13
- end
14
-
15
- def render(context)
16
- # "<table class=\"interlinear-gloss\"><tbody><tr><td colspan=\"7\">#{@text[0]}</td></tr>" + "<tr><td>#{@text[1]}</td></tr></tbody></table>"
17
- end
18
-
19
- end
20
- end
21
- end
22
-
23
- # The register_tag method takes two arguments: the user-facing name of the tag [interlinear], and the class that implements it [InterlinearGlossTag].
24
- Liquid::Template.register_tag('interlinear', Jekyll::Tags::InterlinearGlossTag)
data/_plugins/ipa.rb DELETED
@@ -1,19 +0,0 @@
1
- module Jekyll
2
- module Tags
3
- class RenderPhoneticTag < Liquid::Tag
4
-
5
- def initialize(tag_name, text, tokens)
6
- super
7
- @text = text
8
- end
9
-
10
- def render(context)
11
- "<abbr class=\"gloss\" title=\"International Phonetic Alphabet\">IPA</abbr>: <span class=\"ipa\">#{@text}</span>"
12
- end
13
-
14
- end
15
- end
16
- end
17
-
18
- # The register_tag method takes two arguments: the user-facing name of the tag [lang], and the class that implements it [DefineLanguageTag].
19
- Liquid::Template.register_tag("ipa", Jekyll::Tags::RenderPhoneticTag)
data/_plugins/lang.rb DELETED
@@ -1,27 +0,0 @@
1
- # usage: {% lang text[0] text[1] text[2] %}
2
- # usage: {% lang ko 바이 괕 모 iced jelly dish %}
3
- # text[0] = language code
4
- # text[1] = the text, in latin script or not
5
- # text[2] = the translation into english
6
-
7
- module Jekyll
8
- module Tags
9
- class DefineLanguageTag < Liquid::Tag
10
-
11
- require "shellwords"
12
-
13
- def initialize(tag_name, text, tokens)
14
- super
15
- @text = text.shellsplit
16
- end
17
-
18
- def render(context)
19
- "<abbr class=\"gloss\" title=\"#{@text[0]}\">#{@text[0]}</abbr>: <strong>#{@text[1]}</strong> <em>#{@text[2]}</em>"
20
- end
21
-
22
- end
23
- end
24
- end
25
-
26
- # The register_tag method takes two arguments: the user-facing name of the tag [lang], and the class that implements it [DefineLanguageTag].
27
- Liquid::Template.register_tag('lang', Jekyll::Tags::DefineLanguageTag)