jekyll-theme-paperwiki 0.1.2 → 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: 537ec88608639efc7b930c4eacc4763b95cfd9afcf252d0e29bcb382032814ac
4
- data.tar.gz: c5775b9cbf924df74540b1024700ebf47f827342d4b310bbf97ca65518ed5e59
3
+ metadata.gz: dd9bd7015a5fd9b6b1ea1139ce529d52c0d769b96585cc00800a3bf1db28d571
4
+ data.tar.gz: 358584149a0141a2f73b19565ae0a17a3a8d233fac4d153788a59b105148bf45
5
5
  SHA512:
6
- metadata.gz: 496115be9955cc434f57331c3f3afb2e6259310253a3b81be7881a0af5bc332b50d49471420fd7e11ee1a3b1f73f9e23356ea40d706b98bcaabfbc8e0bd5d001
7
- data.tar.gz: 86f7cb061499a6c94431b816775d4ad1ced49a2f99f8bb6ca6d5dd7c0f5cc9340f4c87077e7c2e6a3b1b7b6fb168105525872adcd0fb751eab8c4be285d7d8bf
6
+ metadata.gz: '0900591839357e2f3ef3059d75b50dec0ed9b6863248eb69a80bbc4d77ab4d9a0d156fe1fe0e0e701f4256aa77b4a69452de5e4cf13f2f40c3d7f60feda38bf7'
7
+ data.tar.gz: 76c2dc278a7d1a4f33f0faf737ce1a2116538273d8108ede6da2b612b74b3fc5a5d670a5370ff0e1d344113c9a34c4810a816fd2bcf6d3ba7e9c320c636fa7e3
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # jekyll-theme-paperwiki
2
2
 
3
- The intent of this theme is to get all the code out of the way and to allow you to write Markdown articles.
3
+ The intent of this theme is to get all the code out of the way and to allow you to write Markdown articles; the best way to do that is to install the theme as a gem. However, if you want to tinker with the code, just download this repository.
4
+
5
+ This theme is not mobile friendly, as I personally do absolutely no worldbuilding on mobile and thus my development skills are lacking. There is also no dark mode or other alternate colour scheme, but please feel free to fork this project and add whatever functionality it's missing.
4
6
 
5
7
 
6
8
 
@@ -25,12 +27,31 @@ This theme comes with all of these prepackaged, so most of what you have to do i
25
27
  $ jekyll new MYSITENAME
26
28
  ```
27
29
 
28
- This will give you a very bare bones Jekyll site, with an index page, a folder for blog posts, a config file, and a Gemfile. You will want to add a folder called `collections`, and inside of that another folder called `_wiki`.
30
+ This will give you a very bare bones Jekyll site, with an index page, a folder for blog posts, a config file, and a Gemfile. You'll have to do a little setup to make it usable with this theme. Here's what the directory should look like:
31
+
32
+ ```
33
+ .
34
+ ├── _pages/
35
+ │ ├── wiki/ # In here is where your organizational pages for your wiki will go.
36
+ ├── _posts/ # If you want to write blog posts, they go in here.
37
+ ├── _site/
38
+ ├── collections/
39
+ │ ├── _wiki/ # In here is where all your articles will go, in markdown or html files.
40
+ ├── _config.yml
41
+ ├── 404.html
42
+ ├── about.md
43
+ ├── Gemfile
44
+ ├── index.md
45
+ ```
46
+
47
+ (Don't worry about the .gitignore or the Gemfile.lock.)
48
+
49
+ (You can also move your `_posts` folder into your `collections` folder if you want; I find it makes things a little neater.)
29
50
 
30
51
  To use this theme, open your Jekyll site's `Gemfile`, delete the line that says `gem "minima"` and replace it with this line:
31
52
 
32
53
  ```ruby
33
- gem "jekyll-theme-paperwiki"
54
+ gem "jekyll-theme-paperwiki", "~> 0.1.2"
34
55
  ```
35
56
 
36
57
  And add this line to your Jekyll site's `_config.yml`:
@@ -57,7 +78,15 @@ To serve your site locally, navigate into the site's directory and run:
57
78
  $ bundle exec jekyll serve
58
79
  ```
59
80
 
60
- Navigate to your localhost and voila! Start adding articles in your wiki collections folder.
81
+ Navigate to your localhost and...you will see an empty page. This is because the layout in the default `index.md` is not set properly. Open this file and change the layout like so:
82
+
83
+ ```yaml
84
+ layout: launchpad
85
+ ```
86
+
87
+ This will show you the default wiki homepage. The three links - explore, contents, and random page - link to pages that are included with the theme, and consist of pregenerated content based on the wiki articles you've written. Now you can start adding articles in your `_wiki` folder.
88
+
89
+ ### Using the wiki
61
90
 
62
91
  All of your wiki pages should be written in markdown, and you must begin each `.md` file like so:
63
92
 
@@ -66,7 +95,10 @@ All of your wiki pages should be written in markdown, and you must begin each `.
66
95
  ---
67
96
  ```
68
97
 
69
- Between these two lines is where you would include *front matter*, such as specifying the layout or the permalink to the page. Jekyll needs to know that the front matter is there in order to output 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.
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
+
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
70
102
 
71
103
 
72
104
 
@@ -92,7 +124,7 @@ However, if you would like to have additional collections akin to the Wikimedia
92
124
  permalink: /:collection/:name
93
125
  ```
94
126
 
95
- Make sure to add the corresponding folders within `collections`, including the preceding underscore.
127
+ Make sure to add the corresponding folders within `collections`, including the preceding underscore: `_literature`, `_dictionary`, etc.
96
128
 
97
129
  Add into your `_config.yml`:
98
130
 
@@ -100,7 +132,18 @@ Add into your `_config.yml`:
100
132
  multi_projects: true
101
133
  ```
102
134
 
103
- This will add links to each different collection on your homepage, and allow you to limit the scope of your searches to a single collection or expand it to cover all of them at once.
135
+ You will also need to add a data file listing your projects: create a folder titled `_data` and inside it a file titled `projects.yml`. Within it you need to list the following, formatted in the same way:
136
+
137
+ ``` yaml
138
+ - name: Wiki
139
+ link: /wiki
140
+ icon: ri-global-line
141
+ desc: A brief description here
142
+ ```
143
+
144
+ For the icon, find one you like from RemixIcon and copy the code.
145
+
146
+ This will add links to each different collection on your homepage, and allow you to limit the scope of your searches to a single collection or expand it to cover all of them at once. You do not need to do anything to
104
147
 
105
148
 
106
149
 
data/_config.yml CHANGED
@@ -1,55 +1,13 @@
1
- # Welcome to Jekyll!
2
- #
3
- # This config file is meant for settings that affect your whole blog, values
4
- # which you are expected to set up once and rarely edit after that. If you find
5
- # yourself editing this file very often, consider using Jekyll's data files
6
- # feature for the data you need to update frequently.
7
- #
8
- # For technical reasons, this file is *NOT* reloaded automatically when you use
9
- # 'bundle exec jekyll serve'. If you change this file, please restart the server process.
10
- #
11
- # If you need help with YAML syntax, here are some quick references for you:
12
- # https://learn-the-web.algonquindesign.ca/topics/markdown-yaml-cheat-sheet/#yaml
13
- # https://learnxinyminutes.com/docs/yaml/
14
- #
15
- # Site settings
16
- # These are used to personalize your new site. If you look in the HTML files,
17
- # you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
18
- # You can create any custom variable you would like, and they will be accessible
19
- # in the templates via {{ site.myvariable }}.
20
1
 
21
- # Build settings
22
-
23
- # Exclude from processing.
24
- # The following items will not be processed, by default.
25
- # Any item listed under the `exclude:` key here will be automatically added to
26
- # the internal "default list".
27
- #
28
- # Excluded items can be processed by explicitly listing the directories or
29
- # their entries' file path in the `include:` list.
30
- #
31
- # exclude:
32
- # - .sass-cache/
33
- # - .jekyll-cache/
34
- # - gemfiles/
35
- # - Gemfile
36
- # - Gemfile.lock
37
- # - node_modules/
38
- # - vendor/bundle/
39
- # - vendor/cache/
40
- # - vendor/gems/
41
- # - vendor/ruby/
2
+ random_redirect:
3
+ pages: true
42
4
 
43
- #
44
5
  collections_dir: collections
45
6
  collections:
46
7
  wiki:
47
8
  output: true
48
9
  permalink: /:collection/:name
49
10
 
50
- random_redirect:
51
- pages: true
52
-
53
11
  # Front matter defaults, so you don't need to set layouts on every new page.
54
12
  # As long as pages are in the correct folder, they'll automatically have the
55
13
  # correct layout. You can override this via each page's front matter.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-paperwiki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - pomeloshark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-03 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -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,12 +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
- - _plugins/gloss.rb
57
- - _plugins/interlinear.rb
58
- - _plugins/ipa.rb
59
- - _plugins/lang.rb
60
53
  - _sass/partials/_base.scss
61
54
  - _sass/partials/_blog.scss
62
55
  - _sass/partials/_collections.scss
@@ -70,7 +63,6 @@ files:
70
63
  - _sass/variables/_colors.scss
71
64
  - _sass/variables/_fonts.scss
72
65
  - assets/css/style.scss
73
- - assets/fonts/.DS_Store
74
66
  - assets/fonts/Inter/.DS_Store
75
67
  - assets/fonts/Inter/Inter-Bold.otf
76
68
  - assets/fonts/Inter/Inter-Bold.woff
@@ -108,8 +100,6 @@ files:
108
100
  - assets/fonts/RemixIcon/remixicon.woff
109
101
  - assets/fonts/RemixIcon/remixicon.woff2
110
102
  - assets/images/favicon.png
111
- - assets/images/wiki1.png
112
- - assets/images/wiki2.png
113
103
  - assets/js/lunr.js
114
104
  - assets/js/search.js
115
105
  - assets/js/toc.js
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/_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)
Binary file
Binary file
Binary file