jekyll-theme-paperwiki 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +61 -13
- data/_config.yml +43 -1
- data/_data/navigation.yml +4 -0
- data/_includes/collections_sidebar.html +0 -54
- data/_includes/global_footer.html +2 -2
- data/_layouts/collections.html +1 -1
- data/_layouts/grammar.html +1 -1
- data/_layouts/launchpad.html +3 -0
- data/_layouts/page.html +1 -1
- data/_layouts/post.html +1 -1
- data/_layouts/reference_desk.html +1 -1
- data/_layouts/wiki.html +1 -1
- data/_layouts/work.html +1 -1
- data/_pages/blog.md +13 -0
- data/_pages/search.md +24 -0
- data/_pages/wiki.md +13 -0
- data/_sass/partials/_base.scss +1 -6
- data/_sass/partials/_global.scss +6 -0
- data/_sass/partials/_launchpad.scss +38 -0
- metadata +7 -4
- data/_plugins/_gloss.rb +0 -22
- data/_plugins/_interlinear.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4fdedc32cb88321f3a4f385ebce2e51ff63a50f04a1d0bda529fca11039a519
|
4
|
+
data.tar.gz: 666179a519fad2588b6c4fac26a9fa5434e7f4720efe5b2f953105d1e5d7c3b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ee82260e046e1983299f4637de1bddb380c809ecced5a7462696ca78c085b3d6fdfe07c6c9ac60a3e759235c4869b1b30d6d41e2707448ad06452e0544170d
|
7
|
+
data.tar.gz: 10faec06628838ef30f2cab51831f1397988a28e5bc9a35151f2cca1055c9a7e033e9442c7ee21a3f5b429969ed6a6b46140bc4a34e19f248cfd46b99a0dff5e
|
data/README.md
CHANGED
@@ -1,15 +1,31 @@
|
|
1
1
|
# jekyll-theme-paperwiki
|
2
2
|
|
3
|
-
|
3
|
+
The intent of this theme is to get all the code out of the way and to allow you to write Markdown articles.
|
4
4
|
|
5
|
-
To experiment with this code, add some sample content and run `bundle exec jekyll serve` – this directory is setup just like a Jekyll site!
|
6
5
|
|
7
|
-
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
In case you're unfamiliar with it, a basic Jekyll site includes the following:
|
10
|
+
+ The `_includes` folder contains snippets of HTML that are frequently reused on pages throughout the website. This saves us from having to copy and paste the HTML on multiple pages, and we only have to edit it in one file in order to change every instance of it.
|
11
|
+
+ The `_layouts` folder contains the formatting for different types of pages, meaning that instead of formatting each page individually we can just specify which layout template to use.
|
12
|
+
+ The `_sass` folder contains all the styling for the site, written in SCSS.
|
13
|
+
+ The `_site` folder contains everything that Jekyll outputs when it builds the site. Don't edit anything in this folder, as it will be rewritten the next time you serve the site.
|
14
|
+
+ The `assets` folder contains things like fonts, images, and Javascript files. It also contains a `.scss` file importing all of your SCSS so that Jekyll can convert it to regular CSS.
|
15
|
+
|
16
|
+
This theme comes with all of these prepackaged, so most of what you have to do is edit the `_config.yaml` file. The theme has some default config set already, but you can override these in your own config file if you wish. You can also add any of the above folders with includes, layouts, or SCSS to override the theme's own files. For example, you will want to add your own `assets` folder to store your own images, including one titled `favicon.png` in order to override the placeholder one i've included.
|
17
|
+
|
8
18
|
|
9
19
|
|
10
20
|
## Installation
|
11
21
|
|
12
|
-
|
22
|
+
[Install Jekyll](https://jekyllrb.com/docs/). Create a new site by running the following in your terminal:
|
23
|
+
|
24
|
+
$ jekyll new MYSITENAME
|
25
|
+
|
26
|
+
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`.
|
27
|
+
|
28
|
+
To use this theme, open your Jekyll site's `Gemfile`, delete the line that says `gem "minima"` and replace it with this line:
|
13
29
|
|
14
30
|
```ruby
|
15
31
|
gem "jekyll-theme-paperwiki"
|
@@ -23,33 +39,65 @@ theme: jekyll-theme-paperwiki
|
|
23
39
|
|
24
40
|
And then execute:
|
25
41
|
|
26
|
-
|
42
|
+
```
|
43
|
+
$ bundle
|
44
|
+
```
|
27
45
|
|
28
46
|
Or install it yourself as:
|
29
47
|
|
30
|
-
|
48
|
+
```
|
49
|
+
$ gem install jekyll-theme-paperwiki
|
50
|
+
```
|
31
51
|
|
32
|
-
## Usage
|
33
52
|
|
34
|
-
TODO: Write usage instructions here. Describe your available layouts, includes, sass and/or assets.
|
35
53
|
|
36
|
-
##
|
54
|
+
## Config
|
37
55
|
|
38
|
-
|
56
|
+
By default, PaperWiki is set up to just be a collection of articles, with a handful of navigational pages, similar to Wikipedia. The articles are organized into the `collections` folder, in a subfolder titled `_wiki`. This is defined in the theme's config file like so:
|
39
57
|
|
40
|
-
|
58
|
+
```yaml
|
59
|
+
collections_dir: collections
|
60
|
+
collections:
|
61
|
+
wiki:
|
62
|
+
output: true
|
63
|
+
permalink: /:collection/:name
|
64
|
+
```
|
41
65
|
|
42
|
-
|
66
|
+
`/:collection/:name` means the url to each wiki entry will be `wiki/article_title` without the article file extension.
|
43
67
|
|
44
|
-
|
68
|
+
However, if you would like to have additional collections akin to the Wikimedia Foundation's other projects - such as Wikisource, Wikispecies, or Wiktionary - then you can specify them in the same format as above, also under the `collections` key:
|
69
|
+
|
70
|
+
```yaml
|
71
|
+
collection_name:
|
72
|
+
output: true
|
73
|
+
permalink: /:collection/:name
|
74
|
+
```
|
75
|
+
|
76
|
+
Make sure to add the corresponding folders within `collections`, including the preceding underscore.
|
77
|
+
|
78
|
+
Add into your `_config.yml`:
|
79
|
+
|
80
|
+
```yaml
|
81
|
+
multi_projects: true
|
82
|
+
```
|
83
|
+
|
84
|
+
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.
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
## Development
|
45
89
|
|
46
90
|
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
|
47
91
|
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-paperwiki.gemspec` accordingly.
|
48
92
|
|
93
|
+
|
94
|
+
|
49
95
|
## License
|
50
96
|
|
51
97
|
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
52
98
|
|
99
|
+
|
100
|
+
|
53
101
|
## Credits
|
54
102
|
|
55
103
|
This theme uses the fonts [Inter](https://rsms.me/inter/), [Libertinus Serif](https://github.com/alerque/libertinus), and [Liberation Mono](https://fontlibrary.org/en/font/liberation-mono), all of which are released under the SIL Open Font License; and the icon font [RemixIcon](https://remixicon.com/), which is available under the Apache License 2.0. The [example favicon](https://www.flaticon.com/free-icon/picture_4671171) is by Royyan Wijaya at Flaticon.
|
data/_config.yml
CHANGED
@@ -1,7 +1,49 @@
|
|
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
|
+
title: Your Title Here
|
21
|
+
|
1
22
|
# Build settings
|
23
|
+
theme: jekyll-theme-paperwiki
|
2
24
|
include: ['_pages'] # forces custom pages to be organized into their own directory
|
3
25
|
|
4
|
-
#
|
26
|
+
# Exclude from processing.
|
27
|
+
# The following items will not be processed, by default.
|
28
|
+
# Any item listed under the `exclude:` key here will be automatically added to
|
29
|
+
# the internal "default list".
|
30
|
+
#
|
31
|
+
# Excluded items can be processed by explicitly listing the directories or
|
32
|
+
# their entries' file path in the `include:` list.
|
33
|
+
#
|
34
|
+
# exclude:
|
35
|
+
# - .sass-cache/
|
36
|
+
# - .jekyll-cache/
|
37
|
+
# - gemfiles/
|
38
|
+
# - Gemfile
|
39
|
+
# - Gemfile.lock
|
40
|
+
# - node_modules/
|
41
|
+
# - vendor/bundle/
|
42
|
+
# - vendor/cache/
|
43
|
+
# - vendor/gems/
|
44
|
+
# - vendor/ruby/
|
45
|
+
|
46
|
+
#
|
5
47
|
collections_dir: collections
|
6
48
|
collections:
|
7
49
|
wiki:
|
@@ -1,57 +1,3 @@
|
|
1
1
|
<nav class="collections-sidebar">
|
2
2
|
|
3
|
-
<ul>
|
4
|
-
<li>
|
5
|
-
{% if page.url == "/wiki" %}
|
6
|
-
Wiki
|
7
|
-
{% endif %}
|
8
|
-
{% if page.url contains "/wiki:" or page.url contains "/wiki/" %}
|
9
|
-
< <a href="/wiki">Back to Wiki</a>
|
10
|
-
{% endif %}
|
11
|
-
{% if page.url == "/works" %}
|
12
|
-
Works
|
13
|
-
{% endif %}
|
14
|
-
{% if page.url contains "/works:" or page.url contains "/works/" %}
|
15
|
-
< <a href="/works">Back to Works</a>
|
16
|
-
{% endif %}
|
17
|
-
{% if page.url == "/polyglot" %}
|
18
|
-
Polyglot
|
19
|
-
{% endif %}
|
20
|
-
{% if page.url == "/polyglot/grammars:all" or page.url == "/polyglot/dictionary:all" %}
|
21
|
-
< <a href="/polyglot">Back to Polyglot</a>
|
22
|
-
{% endif %}
|
23
|
-
</li>
|
24
|
-
|
25
|
-
{% if page.url contains "/wiki" %}
|
26
|
-
{% for item in site.data.collections_wiki %}
|
27
|
-
<li>
|
28
|
-
<a href="{{ item.link }}">
|
29
|
-
{{ item.name }}
|
30
|
-
</a>
|
31
|
-
</li>
|
32
|
-
{% endfor %}
|
33
|
-
{% endif %}
|
34
|
-
|
35
|
-
{% if page.url contains "/works" %}
|
36
|
-
{% for item in site.data.collections_works %}
|
37
|
-
<li>
|
38
|
-
<a href="{{ item.link }}">
|
39
|
-
{{ item.name }}
|
40
|
-
</a>
|
41
|
-
</li>
|
42
|
-
{% endfor %}
|
43
|
-
{% endif %}
|
44
|
-
|
45
|
-
{% if page.url contains "/polyglot" %}
|
46
|
-
{% for item in site.data.collections_polyglot %}
|
47
|
-
<li>
|
48
|
-
<a href="{{ item.link }}">
|
49
|
-
{{ item.name }}
|
50
|
-
</a>
|
51
|
-
</li>
|
52
|
-
{% endfor %}
|
53
|
-
{% endif %}
|
54
|
-
|
55
|
-
</ul>
|
56
|
-
|
57
3
|
</nav>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<footer class="global-footer">
|
2
|
-
<p>This
|
3
|
-
<p>Powered by <a href="https://jekyllrb.com/">Jekyll</a>, with help from <a href="https://remixicon.com/">Remix Icon</a> and <a href="https://lunrjs.com/">Lunr.js</a
|
2
|
+
<p>This site uses the <a href="https://github.com/pomeloshark/jekyll-theme-paperwiki">PaperWiki</a> theme for Jekyll, released under the MIT license.</p>
|
3
|
+
<p>Powered by <a href="https://jekyllrb.com/">Jekyll</a>, with help from <a href="https://remixicon.com/">Remix Icon</a> and <a href="https://lunrjs.com/">Lunr.js</a>.</p>
|
4
4
|
</footer>
|
data/_layouts/collections.html
CHANGED
data/_layouts/grammar.html
CHANGED
data/_layouts/page.html
CHANGED
data/_layouts/post.html
CHANGED
data/_layouts/wiki.html
CHANGED
data/_layouts/work.html
CHANGED
data/_pages/blog.md
ADDED
data/_pages/search.md
ADDED
@@ -0,0 +1,24 @@
|
|
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.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/_pages/wiki.md
ADDED
data/_sass/partials/_base.scss
CHANGED
@@ -61,7 +61,6 @@ h3 {
|
|
61
61
|
font-variant: small-caps;
|
62
62
|
padding: 0.71em 0 0.9em 0;
|
63
63
|
color: #828077;
|
64
|
-
// opacity: 0.8;
|
65
64
|
}
|
66
65
|
|
67
66
|
a,
|
@@ -74,11 +73,7 @@ a:active {
|
|
74
73
|
a:hover {
|
75
74
|
color: $color-linkhover;
|
76
75
|
}
|
77
|
-
|
78
|
-
a:visited {
|
79
|
-
color: $color-linkvisited;
|
80
|
-
}
|
81
|
-
*/
|
76
|
+
|
82
77
|
a:active {
|
83
78
|
color: $color-linkactive;
|
84
79
|
}
|
data/_sass/partials/_global.scss
CHANGED
@@ -72,6 +72,44 @@
|
|
72
72
|
grid-gap: 32px;
|
73
73
|
}
|
74
74
|
|
75
|
+
|
76
|
+
|
77
|
+
/*------------------------------------*\
|
78
|
+
# !IF ONLY ONE PROJECT IS SHOWN
|
79
|
+
\*------------------------------------*/
|
80
|
+
|
81
|
+
.launchpad-wiki_card {
|
82
|
+
grid-column: span 12 / auto;
|
83
|
+
padding: 28px;
|
84
|
+
|
85
|
+
background-color: $color-projecthover;
|
86
|
+
border-radius: 1.5rem;
|
87
|
+
border: 1px solid $color-projectborder;
|
88
|
+
|
89
|
+
text-decoration: none;
|
90
|
+
color: $color-bodytext;
|
91
|
+
}
|
92
|
+
|
93
|
+
.launchpad-wiki_card:link {
|
94
|
+
color: $color-bodytext;
|
95
|
+
}
|
96
|
+
|
97
|
+
.launchpad-wiki_card:hover {
|
98
|
+
background-color: $color-projecthover;
|
99
|
+
|
100
|
+
color: $color-projectcard;
|
101
|
+
|
102
|
+
transition: 0.2s;
|
103
|
+
}
|
104
|
+
|
105
|
+
.launchpad-project_card:visited {
|
106
|
+
color: $color-bodytext;
|
107
|
+
}
|
108
|
+
|
109
|
+
/*------------------------------------*\
|
110
|
+
# !IF MULTIPLE PROJECTS ARE SHOWN
|
111
|
+
\*------------------------------------*/
|
112
|
+
|
75
113
|
.launchpad-project_card {
|
76
114
|
grid-column: span 4 / auto;
|
77
115
|
|
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.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pomeloshark
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- LICENSE.txt
|
35
35
|
- README.md
|
36
36
|
- _config.yml
|
37
|
+
- _data/navigation.yml
|
37
38
|
- _includes/collections_sidebar.html
|
38
39
|
- _includes/global_footer.html
|
39
40
|
- _includes/global_head.html
|
@@ -42,14 +43,16 @@ files:
|
|
42
43
|
- _layouts/collections.html
|
43
44
|
- _layouts/default.html
|
44
45
|
- _layouts/grammar.html
|
46
|
+
- _layouts/launchpad.html
|
45
47
|
- _layouts/page.html
|
46
48
|
- _layouts/portal.html
|
47
49
|
- _layouts/post.html
|
48
50
|
- _layouts/reference_desk.html
|
49
51
|
- _layouts/wiki.html
|
50
52
|
- _layouts/work.html
|
51
|
-
-
|
52
|
-
-
|
53
|
+
- _pages/blog.md
|
54
|
+
- _pages/search.md
|
55
|
+
- _pages/wiki.md
|
53
56
|
- _plugins/ipa.rb
|
54
57
|
- _plugins/lang.rb
|
55
58
|
- _sass/partials/_base.scss
|
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)
|
data/_plugins/_interlinear.rb
DELETED
@@ -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)
|