|
1 |
| -Jekyll Themes |
2 |
| -============= |
| 1 | +# Jekyll lin theme |
3 | 2 |
|
4 |
| -A directory of the best-looking themes for Jekyll blogs |
| 3 | +A slick minimalist theme for Jekyll built with [lin.css](https://lin-css.netlify.com/). |
5 | 4 |
|
| 5 | +[Theme preview](https://jekyll-lin-theme.netlify.com) |
6 | 6 |
|
7 |
| -Submitting a Theme |
8 |
| ------------------- |
| 7 | +## Quick start |
9 | 8 |
|
10 |
| -Have a theme you want to share? |
| 9 | +1. Fork the this repository |
| 10 | +2. Update the `_config.yml` file with your settings |
| 11 | +3. Update the content at the `_posts` folder and the pages at the root (`about.md`, `contact.md`) |
| 12 | +4. Commit and push the changes to your repository and follow the instructions to deploy your website to: |
| 13 | + - [Github pages](https://jekyllrb.com/docs/github-pages/) |
| 14 | + - or [Netlify](https://www.netlify.com/blog/2017/05/11/migrating-your-jekyll-site-to-netlify/) |
11 | 15 |
|
12 |
| -* Fork the site on GitHub |
13 |
| -* Create a new post in the `_posts` directory and fill out the relevant YAML fields |
14 |
| -* Make a 250x200 thumbnail and drop it in the thumbnails directory. List its filename in the post's markdown file. |
15 |
| -* Test it out, then push your changes up and open a pull request. |
16 | 16 |
|
| 17 | +## Installation |
17 | 18 |
|
18 |
| -License |
19 |
| -------- |
| 19 | +Add this line to your Jekyll site's Gemfile: |
20 | 20 |
|
21 |
| -The contents of this repository are licensed under the [GNU Public License.](http://www.gnu.org/licenses/gpl-3.0.html) |
| 21 | +```ruby |
| 22 | +gem "jekyll-lin" |
| 23 | +``` |
| 24 | + |
| 25 | +And then execute: |
| 26 | + |
| 27 | + $ bundle |
| 28 | + |
| 29 | + |
| 30 | +### Layouts |
| 31 | + |
| 32 | +Refers to files within the `_layouts` directory, that define the markup for your theme. |
| 33 | + |
| 34 | + - `default.html` — The base layout that lays the foundation for subsequent layouts. The derived layouts inject their contents into this file at the line that says ` {{ content }} ` and are linked to this file via [FrontMatter](https://jekyllrb.com/docs/frontmatter/) declaration `layout: default`. |
| 35 | + - `home.html` — The layout for your landing-page / home-page / index-page. [[More Info.](#home-layout)] |
| 36 | + - `page.html` — The layout for your documents that contain FrontMatter, but are not posts. |
| 37 | + - `post.html` — The layout for your posts. |
| 38 | + |
| 39 | +#### Home Layout |
| 40 | + |
| 41 | +`home.html` is a flexible HTML layout for the site's landing-page / home-page / index-page. <br/> |
| 42 | + |
| 43 | +### Includes |
| 44 | + |
| 45 | +Refers to snippets of code within the `_includes` directory that can be inserted in multiple layouts (and another include-file as well) within the same theme-gem. |
| 46 | + |
| 47 | + - `disqus_comments.html` — Code to markup disqus comment box. |
| 48 | + - `footer.html` — Defines the site's footer section. |
| 49 | + - `google-analytics.html` — Inserts Google Analytics module (active only in production environment). |
| 50 | + - `head.html` — Code-block that defines the `<head></head>` in *default* layout. |
| 51 | + - `header.html` — Defines the site's main header section. By default, pages with a defined `title` attribute will have links displayed here. |
| 52 | + - `social.html` — Renders social-media icons based on the `lin:social_links` data in the config file. |
| 53 | + |
| 54 | + |
| 55 | +### Assets |
| 56 | + |
| 57 | +Refers to various asset files within the `assets` directory. |
| 58 | +Contains the `css/style.scss` that imports sass files from within the `_sass` directory. This `css/style.scss` is what gets processed into the theme's main stylesheet `main.css` called by `_layouts/default.html` via `_includes/head.html`. |
| 59 | + |
| 60 | +This directory can include sub-directories to manage assets of similar type (`img`, `fonts`, `svg`), and will be copied over as is, to the final transformed site directory. |
| 61 | + |
| 62 | +## Usage |
| 63 | + |
| 64 | +Have the following line in your config file: |
| 65 | + |
| 66 | +```yaml |
| 67 | +theme: jekyll-lin |
| 68 | +``` |
| 69 | +
|
| 70 | +
|
| 71 | +### Customizing templates |
| 72 | +
|
| 73 | +To override the default structure and style of minima, simply create the concerned directory at the root of your site, copy the file you wish to customize to that directory, and then edit the file. |
| 74 | +e.g., to override the [`_includes/head.html `](_includes/head.html) file to specify a custom style path, create an `_includes` directory, copy `_includes/head.html` from minima gem folder to `<yoursite>/_includes` and start editing that file. |
| 75 | + |
| 76 | +The site's default CSS has now moved to a new place within the gem itself, [`assets/css/style.scss`](assets/css/style.scss). To **override the default CSS**, the file has to exist at your site source. Do either of the following: |
| 77 | +- Create a new instance at site source. |
| 78 | + - Create a new file at `<your-site>/assets/css/style.scss` |
| 79 | + - Add the frontmatter dashes, and |
| 80 | + - Add `@import "minima";` |
| 81 | + - Add your custom CSS. |
| 82 | +- Download the file from this repo |
| 83 | + - Create a new file at `<your-site>/assets/css/style.scss` |
| 84 | + - Copy the contents at [assets/css/style.scss](assets/css/style.scss) onto the `css/style.scss` you just created, and edit away! |
| 85 | +- Copy directly from minima gem |
| 86 | + - Go to your local minima gem installation directory ( run `bundle show minima` to get the path to it ). |
| 87 | + - Copy the `assets/` folder from there into the root of `<your-site>` |
| 88 | + - Change whatever values you want, inside `<your-site>/assets/css/style.scss` |
| 89 | + |
| 90 | +### Change default date format |
| 91 | + |
| 92 | +You can change the default date format by specifying `site.lin.date_format` |
| 93 | +in `_config.yml`. |
| 94 | + |
| 95 | +### Add your favicons |
| 96 | + |
| 97 | +1. Head over to [https://realfavicongenerator.net/](https://realfavicongenerator.net/) to add your own favicons. |
| 98 | +2. [Customize](#customization) default `_includes/head.html` in your source directory and insert the given code snippet. |
| 99 | + |
| 100 | +### Enabling comments (via Disqus) |
| 101 | + |
| 102 | +Optionally, if you have a Disqus account, you can tell Jekyll to use it to show a comments section below each post. |
| 103 | + |
| 104 | +To enable it, add the following lines to your Jekyll site: |
| 105 | + |
| 106 | +```yaml |
| 107 | + disqus: |
| 108 | + shortname: my_disqus_shortname |
| 109 | +``` |
| 110 | + |
| 111 | +You can find out more about Disqus' shortnames [here](https://help.disqus.com/installation/whats-a-shortname). |
| 112 | + |
| 113 | +Comments are enabled by default and will only appear in production, i.e., `JEKYLL_ENV=production` |
| 114 | + |
| 115 | +If you don't want to display comments for a particular post you can disable them by adding `comments: false` to that post's YAML Front Matter. |
| 116 | + |
| 117 | +:warning: `url`, e.g. `https://example.com`, must be set in you config file for Disqus to work. |
| 118 | + |
| 119 | + |
| 120 | +### Social networks |
| 121 | + |
| 122 | +You can add links to the accounts you have on other sites, with respective icon, by adding one or more of the following options in your config. |
| 123 | +From `Minima-3.0` onwards, the usernames are to be nested under `lin.social_links`, with the keys being simply the social-network's name: |
| 124 | + |
| 125 | +```yaml |
| 126 | +minima: |
| 127 | + social_links: |
| 128 | + twitter: jekyllrb |
| 129 | + github: jekyll |
| 130 | + medium: jekyll |
| 131 | + rss: rss |
| 132 | + dribbble: jekyll |
| 133 | + facebook: jekyll |
| 134 | + flickr: jekyll |
| 135 | + instagram: jekyll |
| 136 | + linkedin: jekyll |
| 137 | + pinterest: jekyll |
| 138 | + youtube_user: jekyll |
| 139 | + youtube_channel: UC8CXR0-3I70i1tfPg1PAE1g |
| 140 | + telegram: jekyll |
| 141 | + googleplus: +jekyll |
| 142 | + keybase: jekyll |
| 143 | +``` |
| 144 | + |
| 145 | +### Enabling Google Analytics |
| 146 | + |
| 147 | +To enable Google Analytics, add the following lines to your Jekyll site: |
| 148 | + |
| 149 | +```yaml |
| 150 | + google_analytics: UA-NNNNNNNN-N |
| 151 | +``` |
| 152 | + |
| 153 | +Google Analytics will only appear in production, i.e., `JEKYLL_ENV=production` |
| 154 | + |
| 155 | +### Enabling Excerpts on the Home Page |
| 156 | + |
| 157 | +To display post-excerpts on the Home Page, simply add the following to your `_config.yml`: |
| 158 | + |
| 159 | +```yaml |
| 160 | +show_excerpts: true |
| 161 | +``` |
| 162 | + |
| 163 | + |
| 164 | +## Contributing |
| 165 | + |
| 166 | +Bug reports and pull requests are welcome on GitHub at [https://github.com/ssokurenko/jekyll-lin-theme](https://github.com/ssokurenko/jekyll-lin-theme). 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. |
| 167 | + |
| 168 | +## Development |
| 169 | + |
| 170 | +To set up your environment to develop this theme, run `script/bootstrap`. |
| 171 | + |
| 172 | +To test your theme, run `script/server` (or `bundle exec jekyll serve`) and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme and the contents. As you make modifications, your site will regenerate and you should see the changes in the browser after a refresh. |
| 173 | + |
| 174 | +## Publishing |
| 175 | + |
| 176 | +Update the version. |
| 177 | + |
| 178 | +Build the gem: |
| 179 | + |
| 180 | +``` |
| 181 | +gem build jekyll-lin.gemspec |
| 182 | +``` |
| 183 | + |
| 184 | +Push the generated file |
| 185 | + |
| 186 | +``` |
| 187 | +gem push jekyll-lin-x.y.z.gem |
| 188 | +``` |
| 189 | +
|
| 190 | +## License |
| 191 | +
|
| 192 | +The theme is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT). |
0 commit comments