jekyll-theme-dml 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/404.md +12 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +133 -0
  5. data/_data/authors.yml +10 -0
  6. data/_data/config.yml +10 -0
  7. data/_data/localization.yml +14 -0
  8. data/_data/projects.yml +10 -0
  9. data/_includes/author.html +23 -0
  10. data/_includes/date.html +11 -0
  11. data/_includes/disqus_comments.html +23 -0
  12. data/_includes/footer.html +57 -0
  13. data/_includes/google-analytics.html +9 -0
  14. data/_includes/head.html +23 -0
  15. data/_includes/header.html +38 -0
  16. data/_includes/icon-facebook.html +11 -0
  17. data/_includes/icon-facebook.svg +1 -0
  18. data/_includes/icon-feed.html +11 -0
  19. data/_includes/icon-feed.svg +1 -0
  20. data/_includes/icon-github.html +11 -0
  21. data/_includes/icon-github.svg +1 -0
  22. data/_includes/icon-menu.svg +5 -0
  23. data/_includes/icon-twitter.html +11 -0
  24. data/_includes/icon-twitter.svg +1 -0
  25. data/_includes/localized_string.html +3 -0
  26. data/_layouts/authors.html +36 -0
  27. data/_layouts/blog.html +60 -0
  28. data/_layouts/default.html +19 -0
  29. data/_layouts/home.html +3 -0
  30. data/_layouts/lang_blog.html +38 -0
  31. data/_layouts/lang_chooser.html +26 -0
  32. data/_layouts/page.html +14 -0
  33. data/_layouts/post.html +51 -0
  34. data/_layouts/projects.html +32 -0
  35. data/_sass/jekyll-theme-dml.scss +53 -0
  36. data/_sass/jekyll-theme-dml/_base.scss +231 -0
  37. data/_sass/jekyll-theme-dml/_layout.scss +304 -0
  38. data/_sass/jekyll-theme-dml/_syntax-highlighting.scss +71 -0
  39. data/assets/icons/icon-facebook.png +0 -0
  40. data/assets/icons/icon-feed.png +0 -0
  41. data/assets/icons/icon-github.png +0 -0
  42. data/assets/icons/icon-menu.png +0 -0
  43. data/assets/icons/icon-twitter.png +0 -0
  44. data/assets/main.scss +5 -0
  45. metadata +130 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ab9e0d882fa6eb94431281033ba85281b3902c82
4
+ data.tar.gz: f3c983483e476b98ebd77ff3972f5220b80d1f91
5
+ SHA512:
6
+ metadata.gz: 11add161c174405c131c8fd582f06191010259f5ff668983ecce8ee6717be309cdc5858404cc1f1ff4c96f45073aac68fdd5660cb6717320fe0d6c2125123fa2
7
+ data.tar.gz: 4079226a2520b146f71ef5fb420d990ff32f9644382a3600fd3b0e793458a39d784873e5727bbf36a1795c3cb67d54c7320107a435df1413f5bbed0c72e1ec03
data/404.md ADDED
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: default
3
+ permalink: /404.html
4
+ ---
5
+ # Error 404
6
+ Not found
7
+
8
+ The page you are looking for was not found. Some possible reasons are:
9
+ * you typed a wrong url
10
+ * you clicked on a broken link
11
+
12
+ [click here](/) to back to home page
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Parker Moore
4
+ Copyright (c) 2017 Delson Lima
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
@@ -0,0 +1,133 @@
1
+ # jekyll-theme-dml
2
+
3
+ Welcome to jekyll-theme-dml!
4
+
5
+ jekyll-theme-dml is a simple dark theme based on [minima](https://github.com/jekyll/minima) with easy multilingual setup
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Jekyll site's `Gemfile`:
10
+
11
+ ```ruby
12
+ gem "jekyll-theme-dml"
13
+ ```
14
+
15
+ And add this line to your Jekyll site's `_config.yml`:
16
+
17
+ ```yaml
18
+ theme: jekyll-theme-dml
19
+ ```
20
+
21
+ And then execute:
22
+
23
+ $ bundle
24
+
25
+ Or install it yourself as:
26
+
27
+ $ gem install jekyll-theme-dml
28
+
29
+ ## Usage
30
+
31
+ ### Layouts
32
+
33
+ Currently the following layouts are available: *authors*, *blog*, *default*, *home*, *lang_blog*, *lang_chooser*, *page*, *post* and *projects*:
34
+
35
+ - `authors` — automatically generates a list of site's authors using data from `_data/authors.yml`
36
+ - `default` — default layout used for every other layouts
37
+ Use this if you want to create a new custom layout placing it inside `_layouts` on your site's root directory
38
+ - `lang_chooser` — generates a page with all languages available and a link for each one
39
+ - `page` — the pages of your site
40
+ - `post` — the posts of your site
41
+ - `projects` — automatically generates a list of your projects using data from `_data/projects.yml`
42
+
43
+ The layouts *blog*, *home* and *lang_blog* are almost alike, with a few differences between them:
44
+
45
+ - `blog`: use this anywhere you want to place your post list. e.g: `https://yourdomain/blog`
46
+ - `home`: this layout is the same as *blog*. If you want to show your post list at home page you may want to use it
47
+ - `lang_blog`: use this if you want to show only the posts on page language
48
+
49
+ ### Multilingual
50
+
51
+ jekyll-theme-dml was designed to be multi multilingual!
52
+ You can specify a language on every page. All you have to do is include a `lang` key on its front matter:
53
+
54
+ ```yaml
55
+ ---
56
+ layout: post
57
+ title: post_title
58
+ lang: en
59
+ ---
60
+ ```
61
+
62
+ The best way to organize your multi multilingual site is setting subfolders for every language. And also inside `_posts`.
63
+ For example, a site with two languages: *english* and *portuguese*, should be as follows:
64
+
65
+ ```
66
+ .
67
+ ├── en
68
+ ├── pt
69
+ ├── _posts
70
+ | └── en
71
+ | └── pt
72
+ ```
73
+
74
+ Where folders `en` and `pt` contains the pages in each language.
75
+ Example:
76
+
77
+ ```
78
+ .
79
+ ├── en
80
+ | └── about.md
81
+ ├── pt
82
+ | └── about.md
83
+ ```
84
+
85
+ Here there is a page called about on each folder.
86
+ Where `https://example.com/en/about.html` will be the page in english, and `https://example.com/pt/about.html` will be the page in portuguese.
87
+ You can also choose a localized name to your pages by change its filename:
88
+
89
+ ```
90
+ .
91
+ ├── en
92
+ | └── about.md
93
+ ├── pt
94
+ | └── sobre.md
95
+ ```
96
+
97
+ Then address will be `https://example.com/pt/sobre.html`
98
+
99
+ ### Choosing Defaults
100
+
101
+ You can choose a default language (and everything else) for every path on your site. So you don't have to add `lang` key to every page or post.
102
+ It can be done by adding a `defaults` key to your `_config.yml`:
103
+
104
+ ```yaml
105
+ defaults:
106
+ - scope:
107
+ path: "en"
108
+ value:
109
+ lang: "en"
110
+ - scope:
111
+ path: "pt"
112
+ value:
113
+ lang: "pt"
114
+ - scope:
115
+ path: "_posts/en"
116
+ value:
117
+ lang: "en"
118
+ - scope:
119
+ path: "_posts/pt"
120
+ value:
121
+ lang: "pt"
122
+ ```
123
+
124
+ For more info see [Jekyll docs](https://jekylllrb.com/docs/configuration/#front-matter-defaults)
125
+
126
+ ## Contributing
127
+
128
+ Bug reports and pull requests are welcome on GitHub at https://github.com/delsonlima/jekyll-theme-dml.
129
+ This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
130
+
131
+ ## License
132
+
133
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,10 @@
1
+ username:
2
+ name: Your Name
3
+ image:
4
+ # you can add description in multiple languages by adding a child to "description", with language code. e.g. "en"
5
+ description:
6
+ en: your description
7
+ links:
8
+ site: https://example.com
9
+ github: https://github.com/{username}
10
+ twitter: https://twitter.com/{username}
@@ -0,0 +1,10 @@
1
+ # you can choose to use png images instead of svg.
2
+ # tip: set it to true if want your site to be available to older browsers which doesn't support svg.
3
+ #bitmap_mode: false
4
+ #date_format:
5
+
6
+ # here you can add more languages to your site by placing a child to "langs", with language code. e.g.: "pt".
7
+ # you also need to specify its localized name. e.g.: "português" for "pt". ex:
8
+ #langs:
9
+ # en: english
10
+ # pt: português
@@ -0,0 +1,14 @@
1
+ lang: en
2
+ # you can choose a date format to whole site placing it as a string to "date_format". e.g.: "%b %d, %Y"
3
+ # or choose a format for each language by placing a string to a child of "date_format", with language code. e.g.: "pt". As follows:
4
+ #date_format:
5
+ # pt: "%d %b, %Y"
6
+
7
+ # you can write a localized description by adding a string to a child of "description" object, with language code. e.g.: "pt". As follows:
8
+ #description:
9
+ # pt: your localized description
10
+
11
+ # here you can translate the site strings by placing a string to a child of "strings", with language code. e.g.: "pt". As follows:
12
+ #strings:
13
+ # read_more:
14
+ # pt: "continuar lendo"
@@ -0,0 +1,10 @@
1
+ project:
2
+ name:
3
+ description:
4
+ en: "project details"
5
+ pt: "detalhes do projeto"
6
+ icon:
7
+ url: https://github.com/user/project
8
+ link:
9
+ en: /en/projects/project
10
+ pt: /pt/projetos/project
@@ -0,0 +1,23 @@
1
+ {% assign default_author = site.data.config.default_author | default: site.theme_config.default_author %}
2
+ {% assign github_username = site.github.owner_name %}
3
+ {% assign author_name = include.author | default: default_author | default: github_username %}
4
+ {% assign author = site.data.authors[author_name] %}
5
+ {% assign author_link = author.links.first[1] %}
6
+
7
+ {% if author_name %}
8
+
9
+ <span itemprop="author" itemscope itemtype="http://schema.org/Person">
10
+ <span itemprop="name">
11
+
12
+ {% if author %}
13
+ {% if author_link %}
14
+ <a href="{{ author_link }}" title="{{ author.name }}">{{ author.name }}</a>
15
+ {% else %}
16
+ {{ author.name }}
17
+ {% endif %}
18
+ {% else %}
19
+ {{ author_name | default: "unknown author" }}
20
+ {% endif %}
21
+ </span>
22
+ </span>
23
+ {% endif %}
@@ -0,0 +1,11 @@
1
+ {% assign date_config_lang = site.data.localization.date_format | default: site.data.config.date_format | default: site.theme_config.date_format %}
2
+ {% assign default_lang = site.lang | default: "en" %}
3
+
4
+ {% if date_config_lang.first %}
5
+ {% assign date_config = date_config_lang[page.lang] | default: date_config_lang[default_lang] %}
6
+ {% else %}
7
+ {% assign date_config = date_config_lang %}
8
+ {% endif %}
9
+
10
+ {% assign date_format = date_config | default: "%b %-d, %Y" %}
11
+ {{ include.date | date: date_format }}
@@ -0,0 +1,23 @@
1
+ {% if page.comments != false and jekyll.environment == "production" %}
2
+
3
+ <section class="comments">
4
+ <h2>{% include localized_string.html string="Comments" %}</h2>
5
+ <div id="disqus_thread"></div>
6
+ <script>
7
+ var disqus_config = function () {
8
+ this.page.url = '{{ page.url | absolute_url }}';
9
+ this.page.identifier = '{{ page.url | absolute_url }}';
10
+ };
11
+
12
+ (function() {
13
+ var d = document, s = d.createElement('script');
14
+
15
+ s.src = 'https://{{ site.disqus.shortname }}.disqus.com/embed.js';
16
+
17
+ s.setAttribute('data-timestamp', +new Date());
18
+ (d.head || d.body).appendChild(s);
19
+ })();
20
+ </script>
21
+ <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
22
+ </section>
23
+ {% endif %}
@@ -0,0 +1,57 @@
1
+ <footer class="site-footer">
2
+
3
+ <div class="wrapper">
4
+ <div class="footer-col-wrapper">
5
+ <div class="footer-col footer-col-1">
6
+ <ul class="contact-list">
7
+ <li>
8
+ {{ site.title | escape }}
9
+ </li>
10
+ {% assign email = site.email %}
11
+ {% if email %}
12
+ <li><a href="mailto:{{ site.email }}">{{ email }}</a></li>
13
+ {% endif %}
14
+ </ul>
15
+ </div>
16
+
17
+ <div class="footer-col footer-col-2">
18
+ <ul class="social-media-list">
19
+ {% if site.feed.path %}
20
+ <li>
21
+ {% include icon-feed.html %}
22
+ </li>
23
+ {% endif %}
24
+
25
+ {% assign github_username = site.data.config.github_username | default: site.github_username %}
26
+ {% if github_username %}
27
+ <li>
28
+ {% include icon-github.html username=github_username %}
29
+ </li>
30
+ {% endif %}
31
+
32
+ {% assign twitter_username = site.data.config.twitter_username | default: site.twitter_username %}
33
+ {% if twitter_username %}
34
+ <li>
35
+ {% include icon-twitter.html username=twitter_username %}
36
+ </li>
37
+ {% endif %}
38
+
39
+ {% assign facebook_username = site.data.config.facebook_username | default: site.facebook_username %}
40
+ {% if facebook_username %}
41
+ <li>
42
+ {% include icon-facebook.html username=facebook_username %}
43
+ </li>
44
+ {% endif %}
45
+ </ul>
46
+ </div>
47
+
48
+ <div class="footer-col footer-col-3">
49
+ {% assign localized_description = site.data.localization.description[page.lang] %}
50
+ {% assign description = localized_description | default: site.description %}
51
+ <p>{{ description | escape }}</p>
52
+ </div>
53
+ </div>
54
+
55
+ </div>
56
+
57
+ </footer>
@@ -0,0 +1,9 @@
1
+ <script>
2
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
3
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
4
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
5
+ })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
6
+
7
+ ga('create', '{{ site.google_analytics }}', 'auto');
8
+ ga('send', 'pageview');
9
+ </script>
@@ -0,0 +1,23 @@
1
+ <head>
2
+ <meta charset="{{ site.encoding }}">
3
+ <meta name="viewport" content="width=device-width, initial-scale=1">
4
+
5
+ <title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
6
+ <meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
7
+
8
+ <link rel="stylesheet" href="{{ '/assets/main.css' | relative_url }}">
9
+ <link rel="canonical" href="{{ page.url | replace:'index.html','' | absolute_url }}">
10
+
11
+ {% assign icon = site.data.config.icon | default: site.theme_config.icon %}
12
+ {% if icon != "" %}
13
+ <link rel="icon" type="image/x-icon" href="{{ icon }}">
14
+ {% endif %}
15
+
16
+ {% if site.feed.path %}
17
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ site.feed.path | relative_url }}">
18
+ {% endif %}
19
+
20
+ {% if jekyll.environment == 'production' and site.google_analytics %}
21
+ {% include google-analytics.html %}
22
+ {% endif %}
23
+ </head>
@@ -0,0 +1,38 @@
1
+ <header class="site-header" role="banner">
2
+
3
+ <div class="wrapper">
4
+ {% assign default_paths = site.pages | map: "path" %}
5
+ {% assign page_paths = site.header_pages | default: default_paths %}
6
+ <a class="site-title" href="{{ '/' | relative_url }}">{{ site.title | escape }}</a>
7
+
8
+ {% if page_paths %}
9
+ <nav class="site-nav">
10
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
11
+ <label for="nav-trigger">
12
+ <span class="menu-icon">
13
+ {% assign bitmap_mode = site.data.config.bitmap_mode | default: site.theme_config.bitmap_mode %}
14
+ {% if bitmap_mode == true %}
15
+ <img src="/assets/icons/icon-menu.png" />
16
+ {% else %}
17
+ {% include icon-menu.svg %}
18
+ {% endif %}
19
+ </span>
20
+ </label>
21
+
22
+ <div class="trigger">
23
+ {% assign home_link = page.home_link | default: site.data.config.home_link | default: site.theme_config.home_link %}
24
+ {% if home_link %}
25
+ <a class="page-link" href="/">Home</a>
26
+ {% endif %}
27
+
28
+ {% for path in page_paths %}
29
+ {% assign my_page = site.pages | where: "path", path | where: "lang", page.lang | first %}
30
+ {% if my_page.title %}
31
+ <a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
32
+ {% endif %}
33
+ {% endfor %}
34
+ </div>
35
+ </nav>
36
+ {% endif %}
37
+ </div>
38
+ </header>
@@ -0,0 +1,11 @@
1
+ {% assign bitmap_mode = site.data.config.bitmap_mode | default: site.theme_config.bitmap_mode %}
2
+ <a href="https://facebook.com/{{ include.username }}">
3
+ <span class="icon icon--facebook">
4
+ {% if bitmap_mode == true %}
5
+ <img src="/assets/icons/icon-facebook.png"/>
6
+ {% else %}
7
+ {% include icon-facebook.svg %}
8
+ {% endif %}
9
+ </span>
10
+ <span class="username">{{ include.username }}</span>
11
+ </a>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 16 16" width="16px" height="16px"><path fill="#828282" d="m 16,1 0,14 c 0,0.542857 -0.457143,1 -1,1 l -4,0 0,-6.228571 2,0 0.342857,-2.314286 -2.342857,0 0,-1.8 C 11,5 11.342857,4.628571 12,4.628571 l 1.485714,0 0,-2.085714 c 0,0 -0.685714,-0.114286 -1.628571,-0.114286 -2.2000001,0 -3.3142859,1.228572 -3.3142859,3.028572 l 0,2 -2,0 0,2.314286 2,0 0,6.228571 L 1,16 C 0.45714286,16 0,15.542857 0,15 L 0,1 C 0,0.457143 0.45714286,0 1,0 l 14,0 c 0.542857,0 1,0.457143 1,1 z"/></svg>
@@ -0,0 +1,11 @@
1
+ {% assign bitmap_mode = site.data.config.bitmap_mode | default: site.theme_config.bitmap_mode %}
2
+ <a href="{{ site.feed.path | default: '/feed.xml' | relative_url }}">
3
+ <span class="icon icon--feed">
4
+ {% if bitmap_mode == true %}
5
+ <img src="/assets/icons/icon-feed.png"/>
6
+ {% else %}
7
+ {% include icon-feed.svg %}
8
+ {% endif %}
9
+ </span>
10
+ <span>feed</span>
11
+ </a>