jekyll-theme-space 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 68d18018676234365b0df0883b67f019f4497786b797b2b99623734cec926e17
4
+ data.tar.gz: b6c8255d461f6785a8adfb346766ad5aa94afa8f6bd0e2b00d7394289d6e5b0d
5
+ SHA512:
6
+ metadata.gz: db272bf043e77333a9d10c9be8cd5a204d51243156ff79609054b325834498edc09758f2a45765ad1e9b2db07719fff2a1347c1080ae504046b161da94951ce1
7
+ data.tar.gz: 83868e83246b8833e90fb0eef6d63a232222cbc0eafd5e85c230bceb8cadf1b6d8423f97762302ac287f181bb3cd67036fdc09ed12f54c92001fa290335a2bbe
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2018 Alfonso Saavedra "Son Link"
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,163 @@
1
+ # jekyll-theme-space
2
+ Jekyll-theme-space is my new Jekyll theme for my [blog (in spanish)](https://son-link.github.io)
3
+
4
+ This theme is lighwight and responsive, this last include tables, images, videos and iframe videos, like **Youtube** and **Vimeo**
5
+
6
+ Include support for jekyll-seo-tag, Google Analytics and Disqus for comments, and include links on any post for share on various social networks, WhatsApp and Telegram. And support too categories and tags.
7
+
8
+ ## Installation
9
+
10
+ Add this lines to your Jekyll site's `Gemfile`:
11
+
12
+ ```ruby
13
+ gem "jekyll-theme-space"
14
+ gem "jekyll-paginator" # This line isn't necessary if you use github-pages
15
+ gem "jekyll-seo-tag" # If you can use this plugin
16
+ ```
17
+
18
+ Add this lines to your Jekyll site's `_config.yml`:
19
+
20
+ ```yaml
21
+ theme: jekyll-simple-dark
22
+ plugins:
23
+ - jekyll-paginate
24
+ - jekyll-seo-tag #if you use this.
25
+ paginate: 5 # Posts per page
26
+ paginate_path: "page:num/"
27
+ ```
28
+
29
+ Rename **index.md** to **index.html** and change **layout** to *home*
30
+
31
+ For search create a new file on the site root foolder called **search.json** with this content:
32
+
33
+ ```json
34
+ ---
35
+ ---
36
+ [
37
+ {% for post in site.posts %}
38
+ {
39
+
40
+ "title" : "{{ post.title | strip_html | escape }}",
41
+ "url" : "{{ site.baseurl }}{{ post.url }}",
42
+ "category" : "{{post.categories | join: ', '}}",
43
+ "tags" : "{{ post.tags | join: ', ' }}",
44
+ "date" : "{{ post.date }}",
45
+ "description" : "{{post.description | strip_html | strip_newlines | escape }}"
46
+
47
+ } {% unless forloop.last %},{% endunless %}
48
+ {% endfor %}
49
+ ]
50
+ ```
51
+ **Note**: You can change post.description to post.content, but innsert description is much better, use post.content only create a big file and also inaccurate search result.
52
+
53
+ And then execute:
54
+
55
+ $ bundle
56
+
57
+ Or install it yourself as:
58
+
59
+ $ gem install jekyll-theme-space
60
+
61
+ ## Usage
62
+
63
+ ### Social links:
64
+
65
+ For activate social links add these lines on your _config.yml:
66
+
67
+ ```yaml
68
+ social_links: true # If true show social links
69
+ rss: true # For add icon to link feed.xml
70
+ facebook:
71
+ github:
72
+ gplus:
73
+ instagram:
74
+ linkedin:
75
+ pinterest:
76
+ twitter:
77
+ vimeo:
78
+ youtube:
79
+ ```
80
+ Just add the ones you're going to use.
81
+
82
+ **Note:** gplus is for Google+ link.
83
+
84
+ ### Responsive iframe for Youtube or Vimeo videos:
85
+
86
+ Insert the iframe code into a div whit the class **video** and remove **width** and **height** attributes, like this:
87
+
88
+ ```html
89
+ <div class="video">
90
+ <iframe src="https://www.youtube.com/embed/<videoID>" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
91
+ </div>
92
+ ```
93
+
94
+ ### Google Analytics:
95
+ For use Google Analytics include this line on **_config.yml** and replace &lt;code> for your Google Analytics code:
96
+
97
+ ```yaml
98
+ google-analytics: <code>
99
+ ```
100
+ Where &lt;code> is your Google Analytics code.
101
+
102
+ ### jekyll-seo-tag:
103
+ For use you only need add this plugin on the plugins array on **_config.yml**
104
+
105
+ ### categories and tags pages:
106
+ Simple create a new file on the root and set categories as layout. Same for tags.
107
+ For add simple add these variables on YAML head of post. For example:
108
+
109
+ ```yaml
110
+ category: Jekyll
111
+ tags:
112
+ - jekyll
113
+ - tutorial
114
+ ```
115
+
116
+ ### Exclude pages on menu:
117
+ If you do not want a page to appear in the menu, simply add this is the YAML header on the desired pages:
118
+
119
+ ### Related posts:
120
+ include this in **_config.yml**
121
+
122
+ ```yaml
123
+ related_post: true
124
+ ```
125
+
126
+ ```yaml
127
+ onmenu: false
128
+ ```
129
+
130
+ ### Custom 404 page error:
131
+ For add custom 404 page create a new page in your site root folder called **404.md** or **404.html** start width this yaml head:
132
+
133
+ ```yaml
134
+ ---
135
+ layout: 404
136
+ permalink: /404.html
137
+ ---
138
+ ```
139
+
140
+ ## Other credits:
141
+ * [normalize.css](http://necolas.github.io/normalize.css/) use for reset default styles on browsers.
142
+ * [Fontello](http://fontello.com/) for make the icon font.
143
+ * [Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search) for search. Thans to [Webjeda](https://blog.webjeda.com/instant-jekyll-search/) for the tutorial.
144
+ * [Exo](https://fonts.google.com/specimen/Exo) as the default font.
145
+ * Monokai for highlight thakns to [https://github.com/richleland/pygments-css](https://github.com/richleland/pygments-css)
146
+ * Background image is [donwload from here](https://pxhere.com/es/photo/114960)
147
+
148
+ ## Contributing
149
+
150
+ Bug reports and pull requests are welcome on GitHub at https://github.com/sonlink/jekyll-theme-space. 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.
151
+
152
+ ## Development
153
+
154
+ To set up your environment to develop this theme, run `bundle install`.
155
+
156
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
157
+
158
+ When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
159
+ To add a custom directory to your theme-gem, please edit the regexp in `jekyll-space.gemspec` accordingly.
160
+
161
+ ## License
162
+
163
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,15 @@
1
+ <footer>
2
+ jekyll-theme-space. <i class="icon-copyright"></i> 2018 Alfonso Saavedra "Son Link". Theme under MIT license
3
+ </footer>
4
+
5
+ <script src="{{ '/assets/js/simple-jekyll-search.min.js' | prepend: site.baseurl | prepend: site.url }}"></script>
6
+ <script type="text/javascript">
7
+ SimpleJekyllSearch({
8
+ searchInput: document.getElementById('search-input'),
9
+ resultsContainer: document.getElementById('results-container'),
10
+ searchResultTemplate: '<li><a href="{url}">{title}</a><br />{description}</li>',
11
+ json: '{{ '/search.json' | prepend: site.baseurl | prepend: site.url }}'
12
+ });
13
+ </script>
14
+ <script src="{{ '/assets/js/main.js' | prepend: site.baseurl | prepend: site.url }}"></script>
15
+ <script id="dsq-count-scr" src="//blogdesonlink.disqus.com/count.js" async></script>
@@ -0,0 +1,12 @@
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', 'UA-75229203-1', 'auto');
8
+ ga('create', '{{google-analytics}}', 'auto');
9
+
10
+ ga('send', 'pageview');
11
+
12
+ </script>
@@ -0,0 +1,22 @@
1
+ <head>
2
+ <meta charset="utf-8">
3
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+
6
+ <title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
7
+ <meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
8
+
9
+ <link rel="stylesheet" href="{{ '/assets/css/normalize.css' | prepend: site.baseurl | prepend: site.url }}">
10
+ <link rel="stylesheet" href="{{ '/assets/css/monokai.css' | prepend: site.baseurl | prepend: site.url }}">
11
+ <link rel="stylesheet" href="{{ '/assets/css/main.css' | prepend: site.baseurl | prepend: site.url }}">
12
+ <link rel="stylesheet" href="{{ '/assets/css/fontello-embedded.css' | prepend: site.baseurl | prepend: site.url }}">
13
+ <link rel="alternate" type="application/rss+xml" title="{{ site.title }}" href="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }}" />
14
+ <link rel="shortcut icon" href="{{ '/favicon.png' | prepend: site.baseurl | prepend: site.url }}" type="image/png" />
15
+ {% if site.plugins contains 'jekyll-seo-tag' %}
16
+ {% seo %}
17
+ {% endif %}
18
+ <!-- If user add her Google Analytics code include the file for use -->
19
+ {% if site.google-analytics %}
20
+ {% include google-analytics.html %}
21
+ {% endif %}
22
+ </head>
@@ -0,0 +1,39 @@
1
+ <header id="header">
2
+ <div id="menu">
3
+ <nav>
4
+ <div id="close-menu"><a class="icon-cancel" title="Cerrar menú"></a></div>
5
+ <ul>
6
+ {% for page in site.pages %}
7
+ {% if page.title and page.onmenu != false %}
8
+ <li><a href="{{ page.url | prepend: site.baseurl }}">{{ page.title }}</a></li>
9
+ {% endif %}
10
+ {% endfor %}
11
+ </ul>
12
+ <div id="menu_social_links">
13
+ <span class="menu-title">Sígueme:</span>
14
+ <ul>
15
+ {% include social_links.html %}
16
+ </ul>
17
+ </div>
18
+ </nav>
19
+ </div>
20
+ <nav class="navbar">
21
+ <div class="navbar-left" id="logo_menu">
22
+ <button id="toggle-menu" class="icon-menu"></button>
23
+ <a href="{{site.url}}" id="logo">{{ site.title }}</a>&nbsp;
24
+ </div>
25
+ <div class="navbar-right">
26
+ <ul id="nav_social_links">
27
+ {% include social_links.html %}
28
+ </ul>
29
+ <a href="#" id="search-navbar-btn" class="icon-search" title="Search"></a>
30
+ </div>
31
+ </nav>
32
+ </header>
33
+ <div id="search">
34
+ <form onsubmit="return false">
35
+ <input type="text" name="query" id="search-input" placeholder="Search....">
36
+ <button type="reset" class="icon-cancel" id="reset-search"></button>
37
+ </form>
38
+ <ul id="results-container"></ul>
39
+ </div>
@@ -0,0 +1,5 @@
1
+ {% for p in site.pages %}
2
+ {% if p.title %}
3
+ <li><a href="{{ p.url | prepend: site.baseurl }}">{{ p.title }}</a></li>
4
+ {% endif %}
5
+ {% endfor %}
@@ -0,0 +1,37 @@
1
+ <div id="relatedPosts">
2
+
3
+ <h4>You may also like</h4>
4
+
5
+ {% assign maxRelated = 4 %}
6
+ {% assign minCommonTags = 2 %}
7
+ {% assign maxRelatedCounter = 0 %}
8
+
9
+ {% for post in site.posts %}
10
+
11
+ {% assign sameTagCount = 0 %}
12
+ {% assign commonTags = '' %}
13
+
14
+ {% for tag in post.tags %}
15
+ {% if post.url != page.url %}
16
+ {% if page.tags contains tag %}
17
+ {% assign sameTagCount = sameTagCount | plus: 1 %}
18
+ {% capture tagmarkup %} <span class="label label-default">{{ tag }}</span> {% endcapture %}
19
+ {% assign commonTags = commonTags | append: tagmarkup %}
20
+ {% endif %}
21
+ {% endif %}
22
+ {% endfor %}
23
+
24
+ {% if sameTagCount >= minCommonTags %}
25
+ <a href="{{ site.baseurl }}{{ post.url }}" class="related_post">
26
+ <figure>
27
+ <img src="{{site.url}}/img/img_dest/{{ post.img_dest }}" />
28
+ <legend>{{ post.title }}</legend>
29
+ </figure>
30
+ </a>
31
+ {% assign maxRelatedCounter = maxRelatedCounter | plus: 1 %}
32
+ {% if maxRelatedCounter >= maxRelated %}
33
+ {% break %}
34
+ {% endif %}
35
+ {% endif %}
36
+ {% endfor %}
37
+ </div>
@@ -0,0 +1,15 @@
1
+ <!-- Html Elements for Search -->
2
+ <div id="search-container">
3
+ <input type="text" id="search-input" placeholder="Buscar...">
4
+ <ul id="results-container"></ul>
5
+ </div>
6
+
7
+ <!-- Script pointing to jekyll-search.js -->
8
+ <script src="{{ site.baseurl }}/bower_components/simple-jekyll-search/dest/jekyll-search.js" type="text/javascript"></script>
9
+ <script>
10
+ SimpleJekyllSearch({
11
+ searchInput: document.getElementById('search-input'),
12
+ resultsContainer: document.getElementById('results-container'),
13
+ json: '/search.json',
14
+ })
15
+ </script>
@@ -0,0 +1,50 @@
1
+ {% if.site.rss%}
2
+ <li>
3
+ <a href="{{ '/feed.xml' | prepend: site.baseurl | prepend: site.url }}" class="icon-rss" title="RSS"></a>
4
+ </li>
5
+ {% endif %}
6
+ {% if site.facebook %}
7
+ <li>
8
+ <a href="{{site.facebook}}" class="icon-facebook" target="_black" title="Facebook"></a>
9
+ </li>
10
+ {% endif %}
11
+ {% if site.github %}
12
+ <li>
13
+ <a href="{{site.github}}" class="icon-github" target="_black" title="Github"></a>
14
+ </li>
15
+ {% endif %}
16
+ {% if site.gplus %}
17
+ <li>
18
+ <a href="{{site.gplus}}" class="icon-gplus" target="_black" title="Google+"></a>
19
+ </li>
20
+ {% endif %}
21
+ {% if site.instagram %}
22
+ <li>
23
+ <a href="{{site.instagram}}" class="icon-instagram" target="_black" title="Instagram"></a>
24
+ </li>
25
+ {% endif %}
26
+ {% if site.linkedin %}
27
+ <li>
28
+ <a href="{{site.linkedin}}" class="icon-linkedin" target="_black" title="Linkedin"></a>
29
+ </li>
30
+ {% endif %}
31
+ {% if site.pinterest %}
32
+ <li>
33
+ <a href="{{site.pinterest}}" class="icon-pinterest" target="_black" title="Pinterest"></a>
34
+ </li>
35
+ {% endif %}
36
+ {% if site.twitter %}
37
+ <li>
38
+ <a href="{{site.twitter}}" class="icon-twitter" target="_black" title="Twitter"></a>
39
+ </li>
40
+ {% endif %}
41
+ {% if site.vimeo %}
42
+ <li>
43
+ <a href="{{site.vimeo}}" class="icon-vimeo" target="_black" title="Vimeo"></a>
44
+ </li>
45
+ {% endif %}
46
+ {% if site.youtube %}
47
+ <li>
48
+ <a href="{{site.youtube}}" class="icon-youtube" target="_black" title="Youtube"></a>
49
+ </li>
50
+ {% endif %}
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <article id="entry">
5
+ <div id="error404">
6
+ {{ content }}
7
+ </div>
8
+ </article>
@@ -0,0 +1,21 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+ <div id="archives">
5
+ <h1 class="title">{{ page.title }}</h1>
6
+ {% for category in site.categories %}
7
+ <div class="archive-group">
8
+ {% capture category_name %}{{ category | first }}{% endcapture %}
9
+ <a name="{{ category_name | slugize }}"></a>
10
+ <input type="radio" class="acor" name="acor" id="{{ category_name | slugize }}-acor"/>
11
+ <label for="{{ category_name | slugize }}-acor">{{ category_name }} <i class="icon-plus"></i></label>
12
+ <div class="category_list">
13
+ {% for post in site.categories[category_name] %}
14
+ <article class="archive-item">
15
+ <h4><a href="{{ site.baseurl }}{{ post.url }}">{{post.title}}</a></h4>
16
+ </article>
17
+ {% endfor %}
18
+ </div>
19
+ </div>
20
+ {% endfor %}
21
+ </div>
@@ -0,0 +1,11 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ {% include head.html %}
4
+ <body>
5
+ {% include header.html %}
6
+ <div id="container">
7
+ {{ content }}
8
+ </div>
9
+ {% include footer.html %}
10
+ </body>
11
+ </html>