console-theme 1.0.0 → 1.0.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 +50 -1
- data/_includes/search.html +2 -2
- data/assets/js/search.js +2 -1
- metadata +58 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c87dbf2d8441690db6d6d9fce9bb71564814404
|
4
|
+
data.tar.gz: e22275841b1b599d5c59809e782f63dbf64a0f48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f11c0d27ce7e22c1bab3648d17f4afb83666a5ef6c82842232534b7e6f9395ca43e65f16b63b0857fb8b15cb70a2a2fd3d133bcf5646d5e55400d72586d6b5b
|
7
|
+
data.tar.gz: ecc7b7087a332c46c7ac36baf9d32f9cb215c5b063279185d9fdb6c8790f5e13603909d2d93f61e98060c168299a1a9edf3a7c3a487b56692d4b06b05f8bf97f
|
data/README.md
CHANGED
@@ -24,6 +24,25 @@ The primary features of this theme are:
|
|
24
24
|
|
25
25
|
There are more features to come. Stay tuned!
|
26
26
|
|
27
|
+
# Table of Contents
|
28
|
+
|
29
|
+
* [Installation](#installation)
|
30
|
+
* [Gulp Settings](#gulp-settings)
|
31
|
+
* [Using a BrowserSync instead of Jekyll generated local server](#why-browsersync)
|
32
|
+
* [Usage](#usage)
|
33
|
+
* [Creating a post](#create-post)
|
34
|
+
* [Integrating Disqus with your website](#integrate-disqus)
|
35
|
+
* [Using svg symbol](#use-svg-symbol)
|
36
|
+
* [Adding more languages](#add-languages)
|
37
|
+
* [Categorization](#categorization)
|
38
|
+
* [Layouts and Blocks](#layout-block)
|
39
|
+
* [Stylesheets](#stylesheets)
|
40
|
+
* [Why some pages need to use folder structure](#why-use-folder-structure)
|
41
|
+
* [Contributing](#contributing)
|
42
|
+
* [Development](#development)
|
43
|
+
* [License](#license)
|
44
|
+
|
45
|
+
<div id='installation'></div>
|
27
46
|
## Installation
|
28
47
|
|
29
48
|
Add this line to your Jekyll site's Gemfile:
|
@@ -46,6 +65,7 @@ Or install it yourself as:
|
|
46
65
|
|
47
66
|
$ gem install console-theme
|
48
67
|
|
68
|
+
<div id='gulp-settings'></div>
|
49
69
|
### Gulp settings
|
50
70
|
|
51
71
|
To be able to use Gulp, you will need to install Node.js as well as its package manager (i.e. npm). Once you have installed npm. Go to the folder where the package.json is located and run `npm install` and it will install all the dependencies including Gulp.
|
@@ -60,6 +80,7 @@ This task would run several other tasks defined in `gulpfile.js.` To run individ
|
|
60
80
|
|
61
81
|
$ gulp minify-css
|
62
82
|
|
83
|
+
<div id='why-browsersync'></div>
|
63
84
|
### Using a BrowserSync instead of Jekyll generated local server.
|
64
85
|
|
65
86
|
When running Jekyll serve, it is possible to run a server. However, I chose to use BrowserSync instead of that for few reasons:
|
@@ -69,8 +90,10 @@ When running Jekyll serve, it is possible to run a server. However, I chose to u
|
|
69
90
|
|
70
91
|
Therefore, please do use gulp!
|
71
92
|
|
93
|
+
<div id='usage'></div>
|
72
94
|
## Usage
|
73
95
|
|
96
|
+
<div id='create-post'></div>
|
74
97
|
### Creating a post
|
75
98
|
|
76
99
|
Please use `rake` command to create a post. Using this command would automatically generate Jekyll front matter with a unique Disqus identifier. The syntax for rake command is [assuming that you are in the root folder]:
|
@@ -81,6 +104,7 @@ rake post title="Title" [date="2017-01-13"] [category="category"]
|
|
81
104
|
|
82
105
|
[] are optionals.
|
83
106
|
|
107
|
+
<div id='integrate-disqus'></div>
|
84
108
|
### Integrating Disqus with your website.
|
85
109
|
|
86
110
|
You will need to first have Disqus account. Once the account is ready, please modify `config.yml` file by adding your shortname for disqus like below:
|
@@ -91,7 +115,8 @@ disqus_shortname: [your short name. Remove the bracket!]
|
|
91
115
|
|
92
116
|
By doing this, every disqus script would use that information and disqus identifier to fetch relevant data.
|
93
117
|
|
94
|
-
|
118
|
+
<div id='use-svg-symbol'></div>
|
119
|
+
### Using svg symbol
|
95
120
|
|
96
121
|
Using svg symbol is a good practice. By doing this, we can organize svgs better while not losing the caching functionality. Make sure you change your svg file to the file that conforms to the svg symbol style:
|
97
122
|
|
@@ -117,12 +142,31 @@ This would display beaker on the screen! Examples are available.
|
|
117
142
|
|
118
143
|
This external svg file is located in: `assets/css/images/graphics/svg-symbols.svg`
|
119
144
|
|
145
|
+
<div id='add-languages'></div>
|
146
|
+
### Adding more languages
|
147
|
+
|
148
|
+
This theme uses `jekyll-polyglot` plugin with the plugin I developed. I have already initiated the internationalization work. The partially translated languages are: English, German and Korean. To add languages, simply add the language acronym (e.g. German is de ('Deutsch') but really you can define your own acronym) to languages variable in `_config.yml` (e.g. `languages: ["en", "de", "ko"]`). To add more languages, you would need to do the following:
|
149
|
+
|
150
|
+
1. **`localization.json`**: this is a nested json object file. The key represents the id for each translation and the value would have another key-value object with its key repesenting language acronym and the value being the translated word.
|
151
|
+
|
152
|
+
2. **`search.js`**: this may later be integrated with `localization.json` file but at the moment it is separate. In this js file, you will see `populateJSON()` function. The translation json in this function will be used in search.html. To add more languages, you need to modify this function.
|
153
|
+
|
154
|
+
The above files will then be used by the plugin called **Localization** (i.e. `_plugins/localize.rb`) and to use this simply:
|
155
|
+
|
156
|
+
```liquid
|
157
|
+
{% localize [key_id] %}
|
158
|
+
```
|
159
|
+
|
160
|
+
Explore the files and you will see plenty of examples. The plugin will automatically detect the language currently being used and then translate the word according to the one defined in `localization.json`.
|
161
|
+
|
162
|
+
<div id='categorization'></div>
|
120
163
|
## Categorization
|
121
164
|
|
122
165
|
This theme uses data-driven categorization, which makes the construction of categoization simple and succinct. The json file for category is located in _data/categories.json. Each category has three attributes: title, href and id (used to uniquely identify them). Please view the sample file to get a sense of it.
|
123
166
|
|
124
167
|
To create the category pages, you need to create a 'category' folder and subfolders would be the name of categories. They can be further nested (i.e. sub categories). Each folder would have index.md (as we will be using folder structure for creating the page for category.) You can reference my website or refer to the examples provided.
|
125
168
|
|
169
|
+
<div id='layout-block'></div>
|
126
170
|
## Layouts and Blocks
|
127
171
|
|
128
172
|
This theme values simplicity. As such, every layout would look extremely analogous with each other. However, for extensibility there are about 7 layouts:
|
@@ -148,6 +192,7 @@ These layouts share same blocks, which are defined in _includes folder. There ar
|
|
148
192
|
* **not_found**: for 404 page.
|
149
193
|
* **search**: the block for search.
|
150
194
|
|
195
|
+
<div id='stylesheets'></div>
|
151
196
|
## Stylesheets
|
152
197
|
|
153
198
|
Jekyll uses sass, which is a scripting language that would be interpreted into css files. They are largely divided into three usages:
|
@@ -158,14 +203,17 @@ Jekyll uses sass, which is a scripting language that would be interpreted into c
|
|
158
203
|
|
159
204
|
Based on your needs, you may modify these files.
|
160
205
|
|
206
|
+
<div id='why-use-folder-structure'></div>
|
161
207
|
## Why some pages need to use folder structure
|
162
208
|
|
163
209
|
To create a page, there are few ways to achieve it. One of the solutions would be to use folder structure. For example, if we were to create a page called 'archive', then you can create the folder called 'archive' and then include index.html. For pages that use jekyll-paginate functionality, it is mandatory to use this. Otherwise, the functionality would not work. Please do not use .md extension. Use `.html` only as it would not work if this extension is not used.
|
164
210
|
|
211
|
+
<div id='contributing'></div>
|
165
212
|
## Contributing
|
166
213
|
|
167
214
|
Bug reports and pull requests are welcome on GitHub at https://github.com/jaehee0113/console. 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.
|
168
215
|
|
216
|
+
<div id='development'></div>
|
169
217
|
## Development
|
170
218
|
|
171
219
|
To set up your environment to develop this theme, run `bundle install`.
|
@@ -174,6 +222,7 @@ Your theme is setup just like a normal Jekyll site! To test your theme, run `bun
|
|
174
222
|
|
175
223
|
When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
|
176
224
|
|
225
|
+
<div id='license'></div>
|
177
226
|
## License
|
178
227
|
|
179
228
|
The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/_includes/search.html
CHANGED
@@ -6,9 +6,9 @@
|
|
6
6
|
<label class="container-search-inner-label" for="search-box">{% localize search %}</label>
|
7
7
|
{% endif %}
|
8
8
|
{% if site.active_lang == 'en' %}
|
9
|
-
<form class="container-search-inner-form" id="search-form" action="{{site.production_url}}/search
|
9
|
+
<form class="container-search-inner-form" id="search-form" action="{{site.production_url}}/search" method="get">
|
10
10
|
{% else %}
|
11
|
-
<form class="container-search-inner-form" id="search-form" action="{{site.production_url}}/{{site.active_lang}}/search
|
11
|
+
<form class="container-search-inner-form" id="search-form" action="{{site.production_url}}/{{site.active_lang}}/search" method="get">
|
12
12
|
{% endif %}
|
13
13
|
<div class="container-search-inner-form-input">
|
14
14
|
<input type="text" placeholder="{% localize lookformore %}" class="container-search-inner-form-box" id="search-box" name="query">
|
data/assets/js/search.js
CHANGED
@@ -120,7 +120,8 @@ jQuery(document).ready(function(){
|
|
120
120
|
function initSearchResults() {
|
121
121
|
|
122
122
|
if(resultArray === null){
|
123
|
-
searchResults
|
123
|
+
if(searchResults != null)
|
124
|
+
searchResults.innerHTML = '<div class=\"post-list-input-required\"><svg class=\"icon-warning\"><use xlink:href=\"/assets/images/graphics/svg-symbols.svg\#warning"></use></svg><li class="ask-input">' + getJSON("input_needed", currLang) + '<blink>_</blink> </li></div>';
|
124
125
|
return;
|
125
126
|
}
|
126
127
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jae Hee Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -52,6 +52,62 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: jekyll-polyglot
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.2.4
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.2.4
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: jekyll-seo-tag
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.1.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.1.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: jekyll-paginate
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 1.1.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 1.1.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jekyll-feed
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0.6'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.6'
|
55
111
|
description:
|
56
112
|
email:
|
57
113
|
- jaeheelee0113@gmail.com
|