├── _includes ├── head_custom.html ├── footer.html ├── custom_comments_provider.html ├── fonts.html ├── footer_content.html ├── pagination.html ├── header.html ├── i18n.html ├── category_links.html ├── google_analytics.html ├── date.html └── head.html ├── Rakefile ├── feed.xml ├── screenshot.png ├── .gitignore ├── archives.md ├── robots.txt ├── .github ├── dependabot.yml └── workflows │ └── main.yml ├── .pa11yci.json ├── index.html ├── Gemfile ├── _data ├── navigation.yml └── i18n.yml ├── 404.md ├── _layouts ├── default.html ├── page.html ├── post.html ├── archive.html ├── category_archives.html ├── home.html └── feed.xml ├── _posts ├── 2017-01-02-my-german-post.md ├── 2017-01-01-my-example-post.md ├── 2017-01-05-welcome-to-jekyll.md ├── 2017-01-03-super-long-article.md └── 2017-01-04-this-post-demonstrates-post-content-styles.md ├── LICENSE.txt ├── .travis.yml ├── assets └── main.scss ├── jekyll-whiteglass.gemspec ├── _sass ├── whiteglass.scss └── whiteglass │ ├── _syntax-highlighting.scss │ ├── _layout.scss │ └── _base.scss ├── _config.yml ├── CHANGELOG.md ├── about.md └── README.md /_includes/head_custom.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require "bundler/gem_tasks" 2 | -------------------------------------------------------------------------------- /feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: feed 3 | --- 4 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yous/whiteglass/HEAD/screenshot.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | .bundle 3 | .jekyll-cache 4 | .sass-cache 5 | _site 6 | Gemfile.lock 7 | -------------------------------------------------------------------------------- /archives.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: archive 3 | title: "Blog Archive" 4 | permalink: /archives/ 5 | --- 6 | -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | User-agent: * 5 | Disallow: 6 | 7 | Sitemap: {{ "/sitemap.xml" | prepend: site.baseurl | prepend: site.url }} 8 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "weekly" 7 | -------------------------------------------------------------------------------- /.pa11yci.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaults": { 3 | "chromeLaunchConfig": { 4 | "args": [ 5 | "--no-sandbox" 6 | ] 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /_includes/footer.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | --- 2 | # You don't need to edit this file, it's empty on purpose. 3 | # Edit whiteglass' home layout instead if you want to make some changes. 4 | # See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults 5 | layout: home 6 | --- 7 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | gemspec 3 | 4 | gem "jekyll", ENV["JEKYLL_VERSION"] if ENV["JEKYLL_VERSION"] 5 | if ENV["JEKYLL_VERSION"] == "< 4.0" 6 | gem "base64", "~> 0.2" 7 | gem "bigdecimal" 8 | gem "kramdown-parser-gfm", "~> 1.0" 9 | end 10 | -------------------------------------------------------------------------------- /_includes/custom_comments_provider.html: -------------------------------------------------------------------------------- 1 |
2 |

{% include i18n.html lang=lang value="comments" default="Comments" %}

3 |

Insert your custom comment provider like Disqus or Isso here.

4 | -------------------------------------------------------------------------------- /_includes/fonts.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /_data/navigation.yml: -------------------------------------------------------------------------------- 1 | # If you want to link only specific pages in your header, add the path to the 2 | # pages in order as they should show up. 3 | main: 4 | - title: "About" 5 | url: /about/ 6 | - title: "Archives" 7 | url: /archives/ 8 | - title: "GitHub" 9 | url: https://github.com/yous/whiteglass 10 | -------------------------------------------------------------------------------- /404.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "404: Not Found" 4 | permalink: /404.html 5 | --- 6 | 7 | This page cannot be found. Try to go [home]({{ site.baseurl }}/) or 8 | [archives]({{ "/archives/" | prepend: site.baseurl }}) page. If you still can't 9 | find what you want, visit and browse 10 | [the code](https://github.com/yous/whiteglass) of this site. 11 | -------------------------------------------------------------------------------- /_includes/footer_content.html: -------------------------------------------------------------------------------- 1 | {% assign feed_path = "/feed.xml" %} 2 | {% if site.feed and site.feed.path %} 3 | {% assign feed_path = site.feed.path %} 4 | {% endif %} 5 | © {{ site.author }} - Powered by Jekyll & whiteglass - Subscribe via RSS 6 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {% include head.html %} 5 | 6 | 7 | 8 | {% include header.html %} 9 | 10 |
11 |
12 | {{ content }} 13 |
14 |
15 | 16 | {% include footer.html %} 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /_posts/2017-01-02-my-german-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: Mein Deutscher Beitrag 4 | lang: de-DE 5 | --- 6 | 7 | Dieser Beitrag ist in einer anderen Sprache. In diesem Fall Deutsch. Datumsangaben werden entsprechend in Deutsch gemacht. 8 | 9 |

This is a German post. The post is annotated with `lang: de-DE` in the front matter. Whiteglass uses German date formatting given in `_data/i18n.yml`.

10 | -------------------------------------------------------------------------------- /_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 |

{{ page.title | escape }}

8 |
9 | 10 |
11 | {{ content }} 12 |
13 | 14 | {% if site.comments == true and page.comments != false %} 15 |
16 | {% include custom_comments_provider.html %} 17 |
18 | {% endif %} 19 | 20 |
21 | -------------------------------------------------------------------------------- /_includes/pagination.html: -------------------------------------------------------------------------------- 1 | {% if paginator.total_pages > 1 %} 2 | 11 | {% endif %} 12 | -------------------------------------------------------------------------------- /_includes/header.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /_includes/i18n.html: -------------------------------------------------------------------------------- 1 | {%- capture text -%} 2 | {%- if include.lang and include.lang != empty -%} 3 | {%- assign plang = include.lang -%} 4 | {%- else -%} 5 | {%- assign plang = page.lang | default: site.lang | default: "en" -%} 6 | {%- endif -%} 7 | {%- assign i18n-tag = include.value -%} 8 | {%- assign splang = plang | truncate: 2, "" -%} 9 | {%- if site.data.i18n.[plang].[i18n-tag] -%} 10 | {{ site.data.i18n.[plang].[i18n-tag] }} 11 | {%- elsif site.data.i18n.[splang].[i18n-tag] -%} 12 | {{ site.data.i18n.[splang].[i18n-tag] }} 13 | {%- else -%} 14 | {{ include.default }} 15 | {%- endif -%} 16 | {%- endcapture -%} 17 | {{ text | strip_newlines }} -------------------------------------------------------------------------------- /_posts/2017-01-01-my-example-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | --- 4 | 5 | Eos eu docendi tractatos sapientem, brute option menandri in vix, quando vivendo accommodare te ius. Nec melius fastidii constituam id, viderer theophrastus ad sit, hinc semper periculis cum id. Noluisse postulant assentior est in, no choro sadipscing repudiandae vix. Vis in euismod delenit dignissim. Ex quod nostrum sit, suas decore animal id ius, nobis solet detracto quo te. 6 | 7 | {% comment %} 8 | Might you have an include in your theme? Why not try it here! 9 | {% include my-themes-great-include.html %} 10 | {% endcomment %} 11 | 12 | No laudem altera adolescens has, volumus lucilius eum no. Eam ei nulla audiam efficiantur. Suas affert per no, ei tale nibh sea. Sea ne magna harum, in denique scriptorem sea, cetero alienum tibique ei eos. Labores persequeris referrentur eos ei. 13 | -------------------------------------------------------------------------------- /_includes/category_links.html: -------------------------------------------------------------------------------- 1 | {% if include.categories != empty %} • 2 | {% for category in include.categories %} 3 | {% assign no_comma = forloop.last %} 4 | {% for archive in site.archives %} 5 | {% if archive.type == "category" and archive.title == category %} 6 | {{ archive.title | escape }}{% unless no_comma %},{% endunless %} 7 | {% endif %} 8 | {% endfor %} 9 | {% endfor %} 10 | {% endif %} 11 | 12 | {% if include.tags != empty %} • 13 | {% for tag in include.tags %} 14 | {% assign no_comma = forloop.last %} 15 | {% for archive in site.archives %} 16 | {% if archive.type == "tag" and archive.title == tag %} 17 | {{ archive.title | escape }}{% unless no_comma %},{% endunless %} 18 | {% endif %} 19 | {% endfor %} 20 | {% endfor %} 21 | {% endif %} 22 | -------------------------------------------------------------------------------- /_includes/google_analytics.html: -------------------------------------------------------------------------------- 1 | {% if site.google_analytics %} 2 | {% assign prefix = site.google_analytics | slice: 0, 2 %} 3 | {% if prefix == "G-" %} 4 | 5 | 6 | 13 | {% else %} 14 | 15 | 24 | {% endif %} 25 | {% endif %} 26 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2019 Chayoung You 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. 22 | -------------------------------------------------------------------------------- /_posts/2017-01-05-welcome-to-jekyll.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | --- 4 | You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. 5 | 6 | To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. 7 | 8 | Jekyll also offers powerful support for code snippets: 9 | 10 | {% highlight ruby %} 11 | def print_hi(name) 12 | puts "Hi, #{name}" 13 | end 14 | print_hi('Tom') 15 | #=> prints 'Hi, Tom' to STDOUT. 16 | {% endhighlight %} 17 | 18 | Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. 19 | 20 | [jekyll-docs]: http://jekyllrb.com/docs/home 21 | [jekyll-gh]: https://github.com/jekyll/jekyll 22 | [jekyll-talk]: https://talk.jekyllrb.com/ 23 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: ruby 2 | cache: bundler 3 | rvm: 4 | - 3.0.2 5 | addons: 6 | apt: 7 | packages: 8 | - openjdk-8-jre 9 | before_install: 10 | - gem update --system 11 | - gem install bundler 12 | - nvm install node 13 | install: 14 | - bundle install --jobs=3 --retry=3 15 | - pip install --user html5validator 16 | - npm install -g pa11y-ci 17 | script: 18 | - bundle exec jekyll clean && bundle exec jekyll build 19 | - html5validator --Werror --also-check-css --also-check-svg --root _site/ 20 | - | 21 | (bundle exec jekyll server -d _tmp_site & echo $! >&3) 3>jekyll.pid | grep -q 'Server running' && \ 22 | pa11y-ci --sitemap 'http://localhost:4000/whiteglass/sitemap.xml' \ 23 | --sitemap-find 'https://yous.github.io/whiteglass' --sitemap-replace 'http://localhost:4000/whiteglass' && \ 24 | kill -9 "$(cat jekyll.pid)" && \ 25 | rm -f jekyll.pid && \ 26 | rm -rf _tmp_site 27 | branches: 28 | only: 29 | - master 30 | deploy: 31 | provider: pages 32 | skip_cleanup: true 33 | github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable 34 | keep_history: true 35 | local_dir: _site 36 | target_branch: gh-pages 37 | on: 38 | branch: master 39 | -------------------------------------------------------------------------------- /_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |
7 | {% if page.external-url %} 8 |

{{ page.title | escape }} →

9 | {% else %} 10 |

{{ page.title | escape }}

11 | {% endif %} 12 | 13 |
14 | 15 |
16 | {{ content }} 17 |
18 | 19 | {% if site.comments == true and page.comments != false %} 20 |
21 | {% include custom_comments_provider.html %} 22 |
23 | {% endif %} 24 | 25 |
26 | -------------------------------------------------------------------------------- /assets/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | # Only the main Sass file needs front matter (the dashes are enough) 3 | --- 4 | @charset "utf-8"; 5 | 6 | // Our variables 7 | $base-font-family: Bitter, "Apple SD Gothic Neo", AppleGothic, NanumBarunGothic, "Malgun Gothic", Dotum, sans-serif; 8 | $monospace-font-family: Monaco, Menlo, Consolas, "Courier New", DotumChe, monospace; 9 | $base-font-size: 16px; 10 | $base-font-weight: 400; 11 | $small-font-size: $base-font-size * 0.875; 12 | $base-line-height: 1.5; 13 | 14 | $spacing-unit: 30px; 15 | 16 | $text-color: #111; 17 | $background-color: #fdfdfd; 18 | $brand-color: #2568ba; 19 | 20 | $grey-color: #757575; 21 | $grey-color-light: adjust-color($grey-color, $lightness: 45%); 22 | $grey-color-dark: adjust-color($grey-color, $lightness: -20%); 23 | 24 | // Width of the content area 25 | $content-width: 800px; 26 | 27 | $on-palm: 600px; 28 | $on-laptop: 800px; 29 | 30 | 31 | 32 | // whiteglass also includes a mixin for defining media queries. 33 | // Use media queries like this: 34 | // @include media-query($on-palm) { 35 | // .wrapper { 36 | // padding-right: $spacing-unit * 0.5; 37 | // padding-left: $spacing-unit * 0.5; 38 | // } 39 | // } 40 | @mixin media-query($device) { 41 | @media screen and (max-width: $device) { 42 | @content; 43 | } 44 | } 45 | 46 | 47 | 48 | // Import partials from the `whiteglass` theme. 49 | @import "whiteglass"; 50 | -------------------------------------------------------------------------------- /_layouts/archive.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 |

{% include i18n.html value="archive" default="Blog Archive" %}

7 | 8 | {{ content }} 9 | 10 | {% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %} 11 | 12 | 38 | 39 |
40 | -------------------------------------------------------------------------------- /jekyll-whiteglass.gemspec: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | Gem::Specification.new do |spec| 4 | spec.name = "jekyll-whiteglass" 5 | spec.version = "1.11.7" 6 | spec.authors = ["Chayoung You"] 7 | spec.email = ["yousbe@gmail.com"] 8 | 9 | spec.summary = %q{Minimal, responsive Jekyll theme for hackers.} 10 | spec.homepage = "https://github.com/yous/whiteglass" 11 | spec.license = "MIT" 12 | 13 | spec.metadata["homepage_uri"] = spec.homepage 14 | spec.metadata["source_code_uri"] = spec.homepage 15 | spec.metadata["bug_tracker_uri"] = "https://github.com/yous/whiteglass/issues" 16 | spec.metadata["changelog_uri"] = "https://github.com/yous/whiteglass/blob/master/CHANGELOG.md" 17 | 18 | # Specify which files should be added to the gem when it is released. 19 | # The `git ls-files -z` loads the files in the RubyGem that have been added into git. 20 | spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do 21 | `git ls-files -z`.split("\x0").select do |f| 22 | f.match(%r{^(assets|_layouts|_includes|_sass|_data\/i18n\.yml|LICENSE|README|CHANGELOG)}i) 23 | end 24 | end 25 | 26 | spec.add_runtime_dependency "jekyll", ">= 3.3" 27 | spec.add_runtime_dependency "jekyll-archives", "~> 2.1" 28 | spec.add_runtime_dependency "jekyll-paginate", "~> 1.1" 29 | spec.add_runtime_dependency "jekyll-sitemap", "~> 1.0" 30 | 31 | spec.add_development_dependency "bundler" 32 | spec.add_development_dependency "rake" 33 | end 34 | -------------------------------------------------------------------------------- /_sass/whiteglass.scss: -------------------------------------------------------------------------------- 1 | // Define defaults for each variable. 2 | $base-font-family: Bitter, "Apple SD Gothic Neo", "Noto Sans", "Source Han Sans", "Noto Sans CJK JP", "Source Han Sans JP", "Noto Sans CJK KR", "Source Han Sans KR", NanumBarunGothic, AppleGothic, "Malgun Gothic", Dotum, sans-serif !default; 3 | $monospace-font-family: Monaco, Menlo, Consolas, "Courier New", DotumChe, monospace !default; 4 | $base-font-size: 16px !default; 5 | $base-font-weight: 400 !default; 6 | $small-font-size: $base-font-size * 0.875 !default; 7 | $base-line-height: 1.5 !default; 8 | 9 | $spacing-unit: 30px !default; 10 | 11 | $text-color: #111 !default; 12 | $background-color: #fdfdfd !default; 13 | $brand-color: #2568ba !default; 14 | 15 | $grey-color: #757575 !default; 16 | $grey-color-light: adjust-color($grey-color, $lightness: 45%) !default; 17 | $grey-color-dark: adjust-color($grey-color, $lightness: -20%) !default; 18 | 19 | // Width of the content area 20 | $content-width: 800px !default; 21 | 22 | $on-palm: 600px !default; 23 | $on-laptop: 800px !default; 24 | 25 | 26 | 27 | // Use media queries like this: 28 | // @include media-query($on-palm) { 29 | // .wrapper { 30 | // padding-right: $spacing-unit * 0.5; 31 | // padding-left: $spacing-unit * 0.5; 32 | // } 33 | // } 34 | @mixin media-query($device) { 35 | @media screen and (max-width: $device) { 36 | @content; 37 | } 38 | } 39 | 40 | 41 | 42 | // Import partials. 43 | @import 44 | "whiteglass/base", 45 | "whiteglass/layout", 46 | "whiteglass/syntax-highlighting" 47 | ; 48 | -------------------------------------------------------------------------------- /_layouts/category_archives.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 | 6 | {% capture i18n-tag %}archive-{{ page.type }}{% endcapture %} 7 | {% capture default-title %}Archive of {{ page.type }} '%1'{% endcapture %} 8 | {% capture title %}{% include i18n.html value=i18n-tag default=default-title %}{% endcapture %} 9 |

{{ title | replace: "%1", page.title | escape }}

10 | 11 | {% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %} 12 | 13 | 39 | 40 |
41 | -------------------------------------------------------------------------------- /_layouts/home.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 | 7 | {{ content }} 8 | 9 | {% capture site_lang %}{{ site.lang | default: "en" }}{% endcapture %} 10 | 11 | 48 | 49 | {% include pagination.html %} 50 | 51 |
52 | -------------------------------------------------------------------------------- /_includes/date.html: -------------------------------------------------------------------------------- 1 | {%- if include.lang and include.lang != empty -%} 2 | {%- assign plang = include.lang -%} 3 | {%- else -%} 4 | {%- assign plang = page.lang | default: site.lang | default: "en" -%} 5 | {%- endif -%} 6 | {%- assign splang = plang | truncate: 2, "" -%} 7 | {%- if plang != "en" -%} 8 | {%- assign dateformat = site.data.i18n.[plang].date.format | default: site.data.i18n.[splang].date.format | default: "%b %-d, %Y" -%} 9 | {%- comment -%} The dateformat is determined based on the language. Now replace required variables (for now we ignore time based variables (%p, %P)) {%- endcomment -%} 10 | {%- assign num_month = include.date | date: "%-m" | minus: 1 -%} 11 | {%- assign num_day = include.date | date: "%w" | plus: 0 -%} 12 | {%- assign i18n_dateformat = dateformat -%} 13 | {%- assign abbr_day_name = site.data.i18n.[plang].date.abbr_day_names[num_day] | default: site.data.i18n.[splang].date.abbr_day_names[num_day] -%} 14 | {%- if abbr_day_name -%} 15 | {%- assign i18n_dateformat = i18n_dateformat | replace: "%a", abbr_day_name -%} 16 | {%- endif -%} 17 | {%- assign day_name = site.data.i18n.[plang].date.day_names[num_day] | default: site.data.i18n.[splang].date.day_names[num_day] -%} 18 | {%- if day_name -%} 19 | {%- assign i18n_dateformat = i18n_dateformat | replace: "%A", day_name -%} 20 | {%- endif -%} 21 | {%- assign abbr_month_name = site.data.i18n.[plang].date.abbr_month_names[num_month] | default: site.data.i18n.[splang].date.abbr_month_names[num_month] -%} 22 | {%- if abbr_month_name -%} 23 | {%- assign i18n_dateformat = i18n_dateformat | replace: "%b", abbr_month_name -%} 24 | {%- endif -%} 25 | {%- assign month_name = site.data.i18n.[plang].date.month_names[num_month] | default: site.data.i18n.[splang].date.month_names[num_month] -%} 26 | {%- if month_name -%} 27 | {%- assign i18n_dateformat = i18n_dateformat | replace: "%B", month_name -%} 28 | {%- endif -%} 29 | {{ include.date | date: i18n_dateformat }} 30 | {%- else -%} 31 | {{ include.date | date: "%b %-d, %Y" }} 32 | {%- endif -%} 33 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 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 | # 'jekyll serve'. If you change this file, please restart the server process. 10 | 11 | # Site settings 12 | # These are used to personalize your new site. If you look in the HTML files, 13 | # you will see them accessed via {{ site.title }}, {{ site.author }}, and so on. 14 | # You can create any custom variable you would like, and they will be accessible 15 | # in the templates via {{ site.myvariable }}. 16 | title: whiteglass theme 17 | author: Yous 18 | description: Minimal, responsive Jekyll theme for hackers. 19 | baseurl: "/whiteglass" # the subpath of your site, e.g. /blog 20 | url: "https://yous.github.io" # the base hostname & protocol for your site, e.g. http://example.com 21 | lang: en 22 | timezone: UTC 23 | exclude: 24 | - Gemfile 25 | - Gemfile.lock 26 | - Rakefile 27 | - README.md 28 | - LICENSE.txt 29 | - CHANGELOG.md 30 | - jekyll-whiteglass.gemspec 31 | - screenshot.png 32 | - vendor 33 | 34 | # Social media 35 | twitter_username: 36 | twitter_image: 37 | facebook_app_id: 38 | facebook_image: 39 | google_analytics: 40 | comments: false 41 | 42 | # Plugins 43 | plugins: 44 | - jekyll-archives 45 | - jekyll-paginate 46 | - jekyll-sitemap 47 | 48 | # Build settings 49 | markdown: kramdown 50 | excerpt_separator: "" 51 | 52 | # Outputting 53 | permalink: /:year/:month/:day/:title/ 54 | paginate_path: /posts/:num/ 55 | paginate: 5 56 | 57 | # Markdown settings 58 | kramdown: 59 | auto_ids: false 60 | enable_coderay: false 61 | entity_output: as_char 62 | footnote_nr: 1 63 | smart_quotes: lsquo,rsquo,ldquo,rdquo 64 | toc_levels: 1..6 65 | 66 | # jekyll-archives 67 | jekyll-archives: 68 | enabled: 69 | - categories 70 | - tags 71 | layout: category_archives 72 | permalinks: 73 | category: /categories/:name/ 74 | tag: /tags/:name/ 75 | -------------------------------------------------------------------------------- /_posts/2017-01-03-super-long-article.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Some articles are just so long they deserve a really long title to see if things will break well" 4 | categories: misc 5 | tags: 6 | - lorem 7 | - ipsum 8 | --- 9 | 10 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. 11 | 12 | 13 | 14 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. 15 | 16 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. 17 | -------------------------------------------------------------------------------- /_data/i18n.yml: -------------------------------------------------------------------------------- 1 | en: 2 | date: 3 | format: "%b %-d, %Y" # See http://ruby-doc.org/core/Time.html#method-i-strftime for possible date formatting strings 4 | abbr_day_names: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] 5 | abbr_month_names: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", 6 | "Jul", "Aug", "Sep", "Oct", "Nov", "Dez"] 7 | day_names: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] 8 | month_names: ["January", "February", "March", "April", "May", "June", 9 | "July", "August", "September", "October", "November", "December"] 10 | morelink: "Read on" 11 | page-older: "Older" 12 | page-newer: "Newer" 13 | archive: "Blog Archive" 14 | archive-category: "Archive of category '%1'" 15 | archive-tag: "Archive of tag '%1'" 16 | comments: "Comments" 17 | de: 18 | date: 19 | format: "%e. %B %Y" 20 | abbr_day_names: ["So", "Mo", "Di", "Mi", "Do", "Fr" , "Sa"] 21 | abbr_month_names: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", 22 | "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] 23 | day_names: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"] 24 | month_names: ["Januar", "Februar", "März", "April", "Mai", "Juni", 25 | "Juli", "August", "September", "Oktober", "November", "Dezember"] 26 | morelink: "Weiterlesen" 27 | page-older: "Ältere Beiträge" 28 | page-newer: "Neuere Beiträge" 29 | archive: "Blog Archiv" 30 | archive-category: "Archiv der Kategorie '%1'" 31 | archive-tag: "Archiv des Tags '%1'" 32 | comments: "Kommentare" 33 | de-AT: 34 | date: 35 | month_names: ["Jänner", "Februar", "März", "April", "Mai", "Juni", 36 | "Juli", "August", "September", "Oktober", "November", "Dezember"] 37 | abbr_month_names: ["Jän", "Feb", "Mär", "Apr", "Mai", "Jun", 38 | "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] 39 | ko: 40 | date: 41 | format: "%Y년 %-m월 %-d일" 42 | abbr_day_names: ["일", "월", "화", "수", "목", "금", "토"] 43 | abbr_month_names: ["1월", "2월", "3월", "4월", "5월", "6월", 44 | "7월", "8월", "9월", "10월", "11월", "12월"] 45 | day_names: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일", "일요일"] 46 | month_names: ["1월", "2월", "3월", "4월", "5월", "6월", 47 | "7월", "8월", "9월", "10월", "11월", "12월"] 48 | morelink: "계속 읽기" 49 | page-older: "이전" 50 | page-newer: "다음" 51 | archive: "블로그 아카이브" 52 | archive-category: "'%1' 카테고리 아카이브" 53 | archive-tag: "'%1' 태그 아카이브" 54 | comments: "댓글" 55 | fr: 56 | date: 57 | format: "%-d %B %Y" 58 | abbr_day_names: ["Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"] 59 | abbr_month_names: ["Jan", "Fev", "Mar", "Avr", "Mai", "Jui", 60 | "Jui", "Aou", "Sep", "Oct", "Nov", "Dec"] 61 | day_names: ["Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi"] 62 | month_names: ["Janvier", "Février", "Mars", "Avril", "Mai", "Juin", 63 | "Juillet", "Aout", "Septembre", "Octobre", "Novembre", "Décembre"] 64 | morelink: "Lire plus" 65 | page-older: "Plus ancien" 66 | page-newer: "Récent" 67 | archive: "Archives" 68 | archive-category: "Archives de la catégorie '%1'" 69 | archive-tag: "Archives du tag '%1'" 70 | comments: "Commentaires" 71 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # ChangeLog 2 | 3 | ## 1.11.7 (2024-10-15) 4 | 5 | - Support Jekyll < 4 (#54) 6 | 7 | ## 1.11.6 (2024-10-13) 8 | 9 | - Fix Sass warnings 10 | 11 | ## 1.11.5 (2024-07-31) 12 | 13 | - Fix Sass warnings 14 | 15 | ## 1.11.4 (2024-05-11) 16 | 17 | - Remove duplicated last slash from feed id 18 | 19 | ## 1.11.3 (2023-08-30) 20 | 21 | - Fix SASS calc() issue (#50) 22 | 23 | ## 1.11.2 (2022-12-27) 24 | 25 | - Fix SASS warnings (#48) 26 | 27 | ## 1.11.1 (2021-08-14) 28 | 29 | - Don't break h1, h2, h3 for Korean 30 | 31 | ## 1.11.0 (2021-07-21) 32 | 33 | - Update for Google Analytics 4 34 | 35 | ## 1.10.4 (2021-03-15) 36 | 37 | - Add French translation (#42) 38 | 39 | ## 1.10.3 (2021-01-03) 40 | 41 | - Don't ship _config.yml (#40) 42 | - Include i18n.yml only under _data for gem 43 | - Add missing robots.txt 44 | 45 | ## 1.10.2 (2020-10-16) 46 | 47 | - Update Google Fonts to v2 API 48 | 49 | ## 1.10.1 (2020-08-31) 50 | 51 | - Fix i18n.yml for de-AT (#39) 52 | 53 | ## 1.10.0 (2020-08-24) 54 | 55 | - URL-encode the ampersand in the URL (#32) 56 | - Internationalization of whiteglass (#11) 57 | - Added German translation (#11) 58 | - Add Korean translation 59 | 60 | ## 1.9.1 (2019-08-26) 61 | 62 | - Restore colors of code in blockquotes 63 | - Fix insufficient contrast of .post-continue 64 | 65 | ## 1.9.0 (2019-08-26) 66 | 67 | - Adjust $grey-color to conform to WCAG 2.0 AA (#26) 68 | - Support Jekyll 4.0 69 | - Fix insufficient contrast in syntax highlighting (#26) 70 | - Validate HTML, CSS, SVG files with html5validator 71 | - Test accessibility of site with pa11y-ci 72 | 73 | ## 1.8.2 (2019-05-25) 74 | 75 | - Use font-display: swap for Google Fonts 76 | 77 | ## 1.8.1 (2019-05-15) 78 | 79 | - DNS prefetch for Google Fonts 80 | 81 | ## 1.8.0 (2019-05-07) 82 | 83 | - Loosen version requirements for bundler 84 | - Include basic meta tags even without facebook_app_id 85 | - Update syntax highlighting CSS to rouge's GitHub style 86 | 87 | ## 1.7.1 (2018-09-13) 88 | 89 | - Set proper word-wrap for long lines 90 | 91 | ## 1.7.0 (2018-05-24) 92 | 93 | - Use Google Fonts CSS directly with preconnect 94 | 95 | ## 1.6.1 (2018-04-09) 96 | 97 | - Fix lang attribute for post with external URL 98 | 99 | ## 1.6.0 (2018-04-09) 100 | 101 | - Appropriately size h1s in the post body (#19) 102 | - Update code for Web Font Loader 103 | - Link external URL directly for each post (#20) 104 | 105 | ## 1.5.0 (2017-12-27) 106 | 107 | - Support tags (#17) 108 | 109 | ## 1.4.2 (2017-11-21) 110 | 111 | - Add some styling for tables (#15) 112 | 113 | ## 1.4.1 (2017-11-03) 114 | 115 | - Disable comments by default 116 | 117 | ## 1.4.0 (2017-11-01) 118 | 119 | - Support YAML list for keywords (Fix #7) 120 | - Add ability to provide a comments provider for pages and posts (#10) 121 | 122 | ## 1.3.0 (2017-02-20) 123 | 124 | - Fix typos of the theme description 125 | - Add powered-by links to the footer 126 | 127 | ## 1.2.1 (2017-01-23) 128 | 129 | - Make theme can be overridden (#2) 130 | 131 | ## 1.2.0 (2017-01-16) 132 | 133 | - Use excerpt for meta tags (#1) 134 | 135 | ## 1.1.0 (2017-01-07) 136 | 137 | - Make feed path configurable 138 | - Empty `head_custom.html` to prevent adding comments 139 | 140 | ## 1.0.1 (2017-01-07) 141 | 142 | - Fix RSS feed URL 143 | - Bump jekyll-sitemap to 1.0 144 | 145 | ## 1.0.0 (2017-01-06) 146 | 147 | - Initial release 148 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | 8 | concurrency: 9 | group: "pages" 10 | cancel-in-progress: false 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | strategy: 16 | matrix: 17 | jekyll: ["< 4.0", "< 5.0"] 18 | env: 19 | JEKYLL_VERSION: ${{ matrix.jekyll }} 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@v6 23 | - name: Setup Ruby 24 | uses: ruby/setup-ruby@v1 25 | with: 26 | ruby-version: '3.4' 27 | bundler-cache: true 28 | - name: Setup Pages 29 | id: pages 30 | uses: actions/configure-pages@v5 31 | - name: Build with Jekyll 32 | run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" 33 | env: 34 | JEKYLL_ENV: production 35 | - name: Upload artifact 36 | if: ${{ matrix.jekyll == '< 5.0' }} 37 | uses: actions/upload-pages-artifact@v4 38 | 39 | pa11y-ci: 40 | needs: build 41 | runs-on: ubuntu-latest 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@v6 45 | - name: Setup Ruby 46 | uses: ruby/setup-ruby@v1 47 | with: 48 | ruby-version: '3.4' 49 | bundler-cache: true 50 | - name: Setup Chrome 51 | uses: browser-actions/setup-chrome@v2 52 | - name: Setup Node.js 53 | uses: actions/setup-node@v6 54 | with: 55 | node-version: 'lts/*' 56 | check-latest: true 57 | - run: npm install -g pa11y-ci 58 | - name: Download artifact 59 | uses: actions/download-artifact@v7 60 | with: 61 | name: github-pages 62 | - name: Extract artifact 63 | run: | 64 | mkdir _site 65 | tar -xf artifact.tar -C _site/ 66 | - name: Run pa11y-ci 67 | env: 68 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 69 | run: | 70 | url="$(gh api "repos/$GITHUB_REPOSITORY/pages" --jq '.html_url')" 71 | (bundle exec jekyll serve -d _tmp_site --no-watch & echo $! >&3) 3>_jekyll.pid | grep -q 'Server running' 72 | pa11y-ci --sitemap 'http://localhost:4000/whiteglass/sitemap.xml' \ 73 | --sitemap-find "$url" --sitemap-replace 'http://localhost:4000/whiteglass/' 74 | kill -9 "$(cat _jekyll.pid)" 75 | rm -f _jekyll.pid 76 | rm -rf _tmp_site 77 | 78 | validate: 79 | needs: build 80 | runs-on: ubuntu-latest 81 | steps: 82 | - name: Download artifact 83 | uses: actions/download-artifact@v7 84 | with: 85 | name: github-pages 86 | - name: Extract artifact 87 | run: | 88 | mkdir _site 89 | tar -xf artifact.tar -C _site/ 90 | - name: HTML5Validator 91 | uses: Cyb3r-Jak3/html5validator-action@4ea5e57383ed7e14432ebbaae1b64893b7c5210b # v8.0.0 92 | with: 93 | root: _site/ 94 | css: true 95 | skip_git_check: true 96 | 97 | deploy: 98 | needs: [build, pa11y-ci, validate] 99 | permissions: 100 | pages: write 101 | id-token: write 102 | environment: 103 | name: github-pages 104 | url: ${{ steps.deployment.outputs.page_url }} 105 | runs-on: ubuntu-latest 106 | steps: 107 | - name: Deploy to GitHub Pages 108 | id: deployment 109 | uses: actions/deploy-pages@v4 110 | -------------------------------------------------------------------------------- /_includes/head.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {% assign title = page.title | default: site.title | escape %} 7 | {% assign canonical = page.url | replace:'index.html','' | absolute_url %} 8 | {% assign description = page.description | default: page.excerpt | default: site.description | strip_html | normalize_whitespace | escape %} 9 | {{ title }} 10 | 11 | {% if page.keywords %} 12 | {% if page.keywords.first %} 13 | {% assign keywords = page.keywords | join: ',' %} 14 | {% else %} 15 | {% assign keywords = page.keywords %} 16 | {% endif %} 17 | 18 | {% endif %} 19 | 20 | 21 | 22 | {% assign feed_path = "/feed.xml" %} 23 | {% if site.feed and site.feed.path %} 24 | {% assign feed_path = site.feed.path %} 25 | {% endif %} 26 | 27 | 28 | {% include head_custom.html %} 29 | 30 | {% if site.facebook_app_id %}{% endif %} 31 | 32 | 33 | 34 | 35 | {% if site.facebook_page %}{% endif %} 36 | {% if page.facebook.image %} 37 | 38 | {% elsif site.facebook_image %} 39 | 40 | {% endif %} 41 | 42 | {% if site.twitter_username %}{% endif %} 43 | 44 | 45 | {% if page.twitter_card.creator %} 46 | 47 | {% elsif site.twitter_username %} 48 | 49 | {% endif %} 50 | {% if page.twitter_card.image %} 51 | {% if page.twitter_card.type == 'gallery' %} 52 | 53 | 54 | 55 | 56 | {% else %} 57 | 58 | {% if page.twitter_card.type == 'photo' %} 59 | {% if page.twitter_card.width %}{% endif %} 60 | {% if page.twitter_card.height %}{% endif %} 61 | {% endif %} 62 | {% endif %} 63 | {% elsif site.twitter_image %} 64 | 65 | {% endif %} 66 | 67 | {% include fonts.html %} 68 | {% include google_analytics.html %} 69 | 70 | -------------------------------------------------------------------------------- /_sass/whiteglass/_syntax-highlighting.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Syntax highlighting styles 3 | */ 4 | .highlight { 5 | background-color: #f8f8f8; 6 | @extend %vertical-rhythm; 7 | 8 | .highlighter-rouge & { 9 | background-color: #f8f8f8; 10 | } 11 | 12 | .cm { color: #727262; font-style: italic } // Comment.Multiline 13 | .cp { color: #727272; font-weight: bold } // Comment.Preproc 14 | .c1 { color: #727262; font-style: italic } // Comment.Single 15 | .cs { color: #727272; font-weight: bold; font-style: italic } // Comment.Special 16 | .c, .cd { color: #727262; font-style: italic } // Comment, Comment.Doc 17 | .err { color: #a61717; background-color: #e3d2d2 } // Error 18 | .gd { color: #000; background-color: #fdd } // Generic.Deleted 19 | .ge { color: #000; font-style: italic } // Generic.Emph 20 | .gr { color: #a00 } // Generic.Error 21 | .gh { color: #727272 } // Generic.Heading 22 | .gi { color: #000; background-color: #dfd } // Generic.Inserted 23 | .go { color: #727272 } // Generic.Output 24 | .gp { color: #555 } // Generic.Prompt 25 | .gs { font-weight: bold } // Generic.Strong 26 | .gu { color: #727272 } // Generic.Subheading 27 | .gt { color: #a00 } // Generic.Traceback 28 | .kc { color: #000; font-weight: bold } // Keyword.Constant 29 | .kd { color: #000; font-weight: bold } // Keyword.Declaration 30 | .kn { color: #000; font-weight: bold } // Keyword.Namespace 31 | .kp { color: #000; font-weight: bold } // Keyword.Pseudo 32 | .kr { color: #000; font-weight: bold } // Keyword.Reserved 33 | .kt { color: #458; font-weight: bold } // Keyword.Type 34 | .k, .kv { color: #000; font-weight: bold } // Keyword, Keyword.Variable 35 | .mf { color: #007f7f } // Literal.Number.Float 36 | .mh { color: #007f7f } // Literal.Number.Hex 37 | .il { color: #007f7f } // Literal.Number.Integer.Long 38 | .mi { color: #007f7f } // Literal.Number.Integer 39 | .mo { color: #007f7f } // Literal.Number.Oct 40 | .m, .mb, .mx { color: #007f7f } // Literal.Number, Literal.Number.Bin, Literal.Number.Other 41 | .sb { color: #d14 } // Literal.String.Backtick 42 | .sc { color: #d14 } // Literal.String.Char 43 | .sd { color: #d14 } // Literal.String.Doc 44 | .s2 { color: #d14 } // Literal.String.Double 45 | .se { color: #d14 } // Literal.String.Escape 46 | .sh { color: #d14 } // Literal.String.Heredoc 47 | .si { color: #d14 } // Literal.String.Interpol 48 | .sx { color: #d14 } // Literal.String.Other 49 | .sr { color: #008522 } // Literal.String.Regex 50 | .s1 { color: #d14 } // Literal.String.Single 51 | .ss { color: #990073 } // Literal.String.Symbol 52 | .s { color: #d14 } // Literal.String 53 | .na { color: #007f7f } // Name.Attribute 54 | .bp { color: #727272 } // Name.Builtin.Pseudo 55 | .nb { color: #007aa3 } // Name.Builtin 56 | .nc { color: #458; font-weight: bold } // Name.Class 57 | .no { color: #007f7f } // Name.Constant 58 | .nd { color: #3c5d5d; font-weight: bold } // Name.Decorator 59 | .ni { color: #800080 } // Name.Entity 60 | .ne { color: #900; font-weight: bold } // Name.Exception 61 | .nf { color: #900; font-weight: bold } // Name.Function 62 | .nl { color: #900; font-weight: bold } // Name.Label 63 | .nn { color: #555 } // Name.Namespace 64 | .nt { color: #000080 } // Name.Tag 65 | .vc { color: #007f7f } // Name.Variable.Class 66 | .vg { color: #007f7f } // Name.Variable.Global 67 | .vi { color: #007f7f } // Name.Variable.Instance 68 | .nv { color: #007f7f } // Name.Variable 69 | .ow { color: #000; font-weight: bold } // Operator.Word 70 | .o { color: #000; font-weight: bold } // Operator 71 | .w { color: #727272 } // Text.Whitespace 72 | } 73 | -------------------------------------------------------------------------------- /_sass/whiteglass/_layout.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Site header 3 | */ 4 | .site-header { 5 | min-height: 56px; 6 | 7 | // Positioning context for the mobile navigation icon 8 | position: relative; 9 | } 10 | 11 | .site-title { 12 | font-size: 26px; 13 | font-weight: 300; 14 | line-height: 56px; 15 | letter-spacing: -1px; 16 | margin-bottom: 0; 17 | float: left; 18 | 19 | &, 20 | &:visited { 21 | color: $grey-color-dark; 22 | } 23 | } 24 | 25 | .site-nav { 26 | float: right; 27 | line-height: 56px; 28 | 29 | .page-link { 30 | color: $text-color; 31 | line-height: $base-line-height; 32 | 33 | // Gaps between nav items, but not on the last one 34 | &:not(:last-child) { 35 | margin-right: 20px; 36 | } 37 | } 38 | 39 | @include media-query($on-palm) { 40 | .page-link { 41 | padding: 20px 0; 42 | 43 | margin-left: 20px; 44 | &:not(:last-child) { 45 | margin-right: 0; 46 | } 47 | } 48 | } 49 | } 50 | 51 | 52 | 53 | /** 54 | * Site footer 55 | */ 56 | .site-footer { 57 | padding: $spacing-unit 0; 58 | font-size: 15px; 59 | color: $grey-color; 60 | text-align: center; 61 | } 62 | 63 | 64 | 65 | /** 66 | * Page content 67 | */ 68 | .page-content { 69 | padding: $spacing-unit 0; 70 | } 71 | 72 | .page-heading { 73 | font-size: 20px; 74 | } 75 | 76 | .post-list { 77 | margin-left: 0; 78 | list-style: none; 79 | 80 | .post-link:hover { 81 | text-decoration: none; 82 | } 83 | 84 | > li { 85 | margin-bottom: $spacing-unit * 2; 86 | 87 | &:not(:first-child) { 88 | border-top: 4px solid $grey-color-light; 89 | padding-top: $spacing-unit * 2; 90 | } 91 | } 92 | } 93 | 94 | .post-archives { 95 | margin-left: 0; 96 | list-style: none; 97 | 98 | .post-link { 99 | font-size: 24px; 100 | } 101 | 102 | > li { 103 | margin-bottom: $spacing-unit; 104 | } 105 | } 106 | 107 | .post-meta { 108 | font-size: $small-font-size; 109 | color: $grey-color; 110 | } 111 | 112 | .post-link { 113 | &, 114 | &:visited { 115 | color: $text-color; 116 | } 117 | 118 | &:hover { 119 | color: $brand-color; 120 | } 121 | } 122 | 123 | .post-continue { 124 | a { 125 | padding: 8px 15px; 126 | text-decoration: none; 127 | 128 | &, 129 | &:visited { 130 | color: $grey-color-dark; 131 | background-color: $grey-color-light; 132 | } 133 | 134 | &:hover { 135 | color: white; 136 | background-color: $brand-color; 137 | } 138 | } 139 | } 140 | 141 | 142 | 143 | /** 144 | * Posts 145 | */ 146 | .post-header { 147 | margin-bottom: $spacing-unit; 148 | } 149 | 150 | .post-title { 151 | font-size: 42px; 152 | letter-spacing: -1px; 153 | line-height: 1; 154 | 155 | @include media-query($on-laptop) { 156 | font-size: 36px; 157 | } 158 | } 159 | 160 | .post-content { 161 | margin-bottom: $spacing-unit; 162 | 163 | h1 { 164 | font-size: 38px; 165 | 166 | @include media-query($on-laptop) { 167 | font-size: 34px; 168 | } 169 | } 170 | 171 | h2 { 172 | font-size: 32px; 173 | 174 | @include media-query($on-laptop) { 175 | font-size: 28px; 176 | } 177 | } 178 | 179 | h3 { 180 | font-size: 26px; 181 | 182 | @include media-query($on-laptop) { 183 | font-size: 22px; 184 | } 185 | } 186 | 187 | h4 { 188 | font-size: 20px; 189 | 190 | @include media-query($on-laptop) { 191 | font-size: 18px; 192 | } 193 | } 194 | } 195 | 196 | 197 | 198 | /** 199 | * Pagination 200 | */ 201 | .pagination { 202 | padding: $spacing-unit * 0.5 0; 203 | border-top: 1px solid $grey-color-light; 204 | border-bottom: 1px solid $grey-color-light; 205 | text-align: center; 206 | @extend %clearfix; 207 | 208 | a { 209 | &, 210 | &:visited { 211 | color: $grey-color; 212 | } 213 | 214 | &:hover { 215 | color: $brand-color; 216 | } 217 | } 218 | 219 | .previous { 220 | float: left; 221 | } 222 | 223 | .next { 224 | float: right; 225 | } 226 | } 227 | -------------------------------------------------------------------------------- /_sass/whiteglass/_base.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Reset some basic elements 3 | */ 4 | body, h1, h2, h3, h4, h5, h6, 5 | p, blockquote, pre, hr, 6 | dl, dd, ol, ul, figure { 7 | margin: 0; 8 | padding: 0; 9 | } 10 | 11 | 12 | 13 | /** 14 | * Basic styling 15 | */ 16 | body { 17 | font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; 18 | color: $text-color; 19 | background-color: $background-color; 20 | -webkit-text-size-adjust: 100%; 21 | -webkit-font-feature-settings: "kern" 1; 22 | -moz-font-feature-settings: "kern" 1; 23 | -o-font-feature-settings: "kern" 1; 24 | font-feature-settings: "kern" 1; 25 | font-kerning: normal; 26 | word-wrap: break-word; 27 | } 28 | 29 | table { 30 | width: 100%; 31 | margin: 0 0 20px 0; 32 | text-align: left; 33 | } 34 | 35 | /** 36 | * Set `margin-bottom` to maintain vertical rhythm 37 | */ 38 | h1, h2, h3, h4, h5, h6, 39 | p, blockquote, pre, 40 | ul, ol, dl, figure, 41 | %vertical-rhythm { 42 | margin-bottom: $spacing-unit * 0.5; 43 | } 44 | 45 | 46 | 47 | /** 48 | * Images 49 | */ 50 | img { 51 | max-width: 100%; 52 | vertical-align: middle; 53 | } 54 | 55 | 56 | 57 | /** 58 | * Figures 59 | */ 60 | figure > img { 61 | display: block; 62 | } 63 | 64 | figcaption { 65 | font-size: $small-font-size; 66 | } 67 | 68 | 69 | 70 | /** 71 | * Lists 72 | */ 73 | ul, ol { 74 | margin-left: $spacing-unit; 75 | } 76 | 77 | li { 78 | > ul, 79 | > ol { 80 | margin-bottom: 0; 81 | } 82 | } 83 | 84 | 85 | 86 | /** 87 | * Headings 88 | */ 89 | h1, h2, h3, h4, h5, h6 { 90 | font-weight: $base-font-weight; 91 | 92 | code { 93 | font-size: inherit; 94 | } 95 | } 96 | 97 | h1, h2, h3 { 98 | &:lang(ko) { 99 | word-break: keep-all; 100 | } 101 | } 102 | 103 | 104 | 105 | /** 106 | * Links 107 | */ 108 | a { 109 | color: $brand-color; 110 | text-decoration: none; 111 | 112 | &:visited { 113 | color: adjust-color($brand-color, $lightness: -10%); 114 | } 115 | 116 | &:hover { 117 | color: $text-color; 118 | text-decoration: underline; 119 | } 120 | } 121 | 122 | 123 | 124 | /** 125 | * Blockquotes 126 | */ 127 | blockquote { 128 | color: $grey-color; 129 | border-left: 4px solid $grey-color-light; 130 | padding-left: $spacing-unit * 0.5; 131 | font-size: 18px; 132 | letter-spacing: -1px; 133 | font-style: italic; 134 | 135 | > :last-child { 136 | margin-bottom: 0; 137 | } 138 | 139 | pre, code { 140 | color: $text-color; 141 | } 142 | } 143 | 144 | 145 | 146 | /** 147 | * Rules 148 | */ 149 | hr { 150 | height: 4px; 151 | margin: $spacing-unit * 0.5 0; 152 | border: 0; 153 | background-color: $grey-color-light; 154 | } 155 | 156 | 157 | 158 | /** 159 | * Code formatting 160 | */ 161 | pre, 162 | code { 163 | font-family: $monospace-font-family; 164 | font-size: 13px; 165 | border: 1px solid $grey-color-light; 166 | border-radius: 0; 167 | background-color: #f8f8f8; 168 | } 169 | 170 | code { 171 | padding: 1px 5px; 172 | } 173 | 174 | pre { 175 | padding: 8px 12px; 176 | overflow-x: auto; 177 | word-wrap: normal; 178 | 179 | > code { 180 | border: 0; 181 | padding-right: 0; 182 | padding-left: 0; 183 | } 184 | } 185 | 186 | 187 | 188 | /** 189 | * Wrapper 190 | */ 191 | .wrapper { 192 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); 193 | max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); 194 | margin-right: auto; 195 | margin-left: auto; 196 | padding-right: $spacing-unit; 197 | padding-left: $spacing-unit; 198 | @extend %clearfix; 199 | 200 | @include media-query($on-laptop) { 201 | max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); 202 | max-width: calc(#{$content-width} - (#{$spacing-unit})); 203 | padding-right: $spacing-unit * 0.5; 204 | padding-left: $spacing-unit * 0.5; 205 | } 206 | } 207 | 208 | 209 | 210 | /** 211 | * Clearfix 212 | */ 213 | %clearfix:after { 214 | content: ""; 215 | display: table; 216 | clear: both; 217 | } 218 | -------------------------------------------------------------------------------- /_posts/2017-01-04-this-post-demonstrates-post-content-styles.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "This post demonstrates post content styles" 4 | categories: junk 5 | author: "Bart Simpson" 6 | meta: "Springfield" 7 | --- 8 | 9 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. 10 | 11 | ## Some great heading (h2) 12 | 13 | Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. 14 | 15 | Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. 16 | 17 | ## Another great heading (h2) 18 | 19 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. 20 | 21 | ### Some great subheading (h3) 22 | 23 | Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. 24 | 25 | Phasellus et hendrerit mauris. Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. 26 | 27 | ### Some great subheading (h3) 28 | 29 | Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. 30 | 31 | > This quote will change your life. It will reveal the secrets of the universe, and all the wonders of humanity. Don't misuse it. 32 | 33 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. 34 | 35 | ### Some great subheading (h3) 36 | 37 | Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit. Proin convallis mi ac felis pharetra aliquam. Curabitur dignissim accumsan rutrum. 38 | 39 | ``` html 40 | 41 | 42 | 43 | 44 |

Hello, World!

45 | 46 | 47 | ``` 48 | 49 | 50 | In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. 51 | 52 | #### You might want a sub-subheading (h4) 53 | 54 | In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. 55 | 56 | In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. 57 | 58 | #### But it's probably overkill (h4) 59 | 60 | In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. 61 | 62 | ### Oh hai, an unordered list!! 63 | 64 | In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. 65 | 66 | - First item, yo 67 | - Second item, dawg 68 | - Third item, what what?! 69 | - Fourth item, fo sheezy my neezy 70 | 71 | ### Oh hai, an ordered list!! 72 | 73 | In arcu magna, aliquet vel pretium et, molestie et arcu. Mauris lobortis nulla et felis ullamcorper bibendum. Phasellus et hendrerit mauris. 74 | 75 | 1. First item, yo 76 | 2. Second item, dawg 77 | 3. Third item, what what?! 78 | 4. Fourth item, fo sheezy my neezy 79 | 80 | 81 | 82 | ## Headings are cool! (h2) 83 | 84 | Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. Praesent varius interdum vehicula. Aenean risus libero, placerat at vestibulum eget, ultricies eu enim. Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. 85 | 86 | Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est. 87 | 88 | Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc. 89 | -------------------------------------------------------------------------------- /_layouts/feed.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | --- 4 | 5 | 6 | Jekyll 7 | {% assign feed_path = "/feed.xml" %} 8 | {% if site.feed and site.feed.path %} 9 | {% assign feed_path = site.feed.path %} 10 | {% endif %} 11 | 12 | 13 | {{ site.time | date_to_xmlschema }} 14 | {{ '/' | absolute_url | xml_escape }} 15 | 16 | {% if site.title %} 17 | {{ site.title | smartify | xml_escape }} 18 | {% elsif site.name %} 19 | {{ site.name | smartify | xml_escape }} 20 | {% endif %} 21 | 22 | {% if site.description %} 23 | {{ site.description | xml_escape }} 24 | {% endif %} 25 | 26 | {% if site.author %} 27 | 28 | {{ site.author.name | default: site.author | xml_escape }} 29 | {% if site.author.email %} 30 | {{ site.author.email | xml_escape }} 31 | {% endif %} 32 | {% if site.author.uri %} 33 | {{ site.author.uri | xml_escape }} 34 | {% endif %} 35 | 36 | {% endif %} 37 | 38 | {% for post in site.posts limit: 20 %} 39 | {% unless post.draft %} 40 | 41 | {% if post.external-url %} 42 | {{ post.title | append: " →" | smartify | strip_html | normalize_whitespace | xml_escape }} 43 | {% else %} 44 | {{ post.title | smartify | strip_html | normalize_whitespace | xml_escape }} 45 | {% endif %} 46 | {% if post.external-url %} 47 | 48 | 49 | {% else %} 50 | 51 | {% endif %} 52 | {{ post.date | date_to_xmlschema }} 53 | {{ post.last_modified_at | default: post.date | date_to_xmlschema }} 54 | {{ post.id | absolute_url | xml_escape }} 55 | {{ post.content | strip | xml_escape }} 56 | 57 | {% assign post_author = post.author | default: post.authors[0] | default: site.author %} 58 | {% assign post_author = site.data.authors[post_author] | default: post_author %} 59 | {% assign post_author_email = post_author.email | default: nil %} 60 | {% assign post_author_uri = post_author.uri | default: nil %} 61 | {% assign post_author_name = post_author.name | default: post_author %} 62 | 63 | {% if post_author %} 64 | 65 | {{ post_author_name | xml_escape }} 66 | {% if post_author_email %} 67 | {{ post_author_email | xml_escape }} 68 | {% endif %} 69 | {% if post_author_uri %} 70 | {{ post_author_uri | xml_escape }} 71 | {% endif %} 72 | 73 | {% endif %} 74 | 75 | {% for category in post.categories %} 76 | 77 | {% endfor %} 78 | 79 | {% for tag in post.tags %} 80 | 81 | {% endfor %} 82 | 83 | {% if post.excerpt and post.excerpt != empty %} 84 | {{ post.excerpt | strip_html | normalize_whitespace | xml_escape }} 85 | {% endif %} 86 | 87 | {% assign post_image = post.twitter_card.image | default: post.facebook.image %} 88 | {% if post_image %} 89 | {% unless post_image contains "://" %} 90 | {% assign post_image = post_image | absolute_url | xml_escape %} 91 | {% endunless %} 92 | 93 | {% endif %} 94 | 95 | {% endunless %} 96 | {% endfor %} 97 | 98 | -------------------------------------------------------------------------------- /about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: "About" 4 | permalink: /about/ 5 | --- 6 | 7 | whiteglass is a minimal, responsive Jekyll theme for hackers. 8 | 9 | ## Installation 10 | 11 | Add this line to your Jekyll site's Gemfile: 12 | 13 | ``` ruby 14 | gem "jekyll-whiteglass" 15 | ``` 16 | 17 | And add this line to your Jekyll site's `_config.yml`: 18 | 19 | ``` yaml 20 | theme: jekyll-whiteglass 21 | ``` 22 | 23 | And then execute: 24 | 25 | ``` sh 26 | bundle 27 | ``` 28 | 29 | Or install it yourself as: 30 | 31 | ``` sh 32 | gem install jekyll-whiteglass 33 | ``` 34 | 35 | ## Quick Start 36 | 37 | 1. Go to [yous/whiteglass-template](https://github.com/yous/whiteglass-template). 38 | 2. Click "Use this template" button, and then create a repository. 39 | 3. Change the options defined in _config.yml. See [Configuration](https://github.com/yous/whiteglass-template#configuration) 40 | section under whiteglass-template. 41 | 5. Push some content, then GitHub Actions will generate the site. 42 | 43 | ## Manual Setup 44 | 45 | 1. Generate a new Jekyll blog: 46 | 47 | ``` sh 48 | jekyll new blog --skip-bundle 49 | cd blog 50 | ``` 51 | 52 | 2. Edit `Gemfile` to use whiteglass theme: 53 | 54 | ``` ruby 55 | gem "jekyll-whiteglass" 56 | ``` 57 | 58 | 3. Edit `_config.yml` to use whiteglass theme and its plugins: 59 | 60 | ``` yaml 61 | theme: jekyll-whiteglass 62 | plugins: 63 | - jekyll-archives 64 | - jekyll-paginate 65 | - jekyll-sitemap 66 | 67 | permalink: /:year/:month/:day/:title/ 68 | paginate_path: /posts/:num/ 69 | paginate: 5 70 | 71 | jekyll-archives: 72 | enabled: 73 | - categories 74 | - tags 75 | layout: category_archives 76 | permalinks: 77 | category: /categories/:name/ 78 | tag: /tags/:name/ 79 | ``` 80 | 81 | 4. Copy 82 | [`index.html`](https://github.com/yous/whiteglass/blob/master/index.html), 83 | [`about.md`](https://github.com/yous/whiteglass/blob/master/about.md), 84 | [`archives.md`](https://github.com/yous/whiteglass/blob/master/archives.md), 85 | [`feed.xml`](https://github.com/yous/whiteglass/blob/master/feed.xml), 86 | [`robots.txt`](https://github.com/yous/whiteglass/blob/master/robots.txt), 87 | [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml), 88 | and [`_data/navigation.yml`](https://github.com/yous/whiteglass/blob/master/_data/navigation.yml) 89 | from the theme: 90 | 91 | ``` sh 92 | rm index.md 93 | curl -L -O "https://github.com/yous/whiteglass/raw/master/{index.html,about.md,archives.md,feed.xml,robots.txt}" 94 | curl -L --create-dirs -o _data/#1 "https://github.com/yous/whiteglass/raw/master/_data/{navigation.yml,i18n.yml}" 95 | ``` 96 | 97 | 5. Install gems and you're good to go! The blog will be available on 98 | `http://127.0.0.1:4000`. 99 | 100 | ``` sh 101 | bundle install 102 | bundle exec jekyll serve 103 | ``` 104 | 105 | ## Upgrading 106 | 107 | ### From Version < 1.9.1 108 | 109 | Copy 110 | [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml) 111 | from the theme. 112 | 113 | ## Deployment to GitHub Pages using Travis CI 114 | 115 | This theme uses [jekyll-archives](https://github.com/jekyll/jekyll-archives) gem 116 | which is [not supported by GitHub Pages](https://help.github.com/articles/configuring-jekyll-plugins/). 117 | If you want to use full features like categories and tags, I recommend you to 118 | use Travis CI or other CI services. 119 | 120 | To deploy using Travis CI, first copy the [`.travis.yml`](https://github.com/yous/whiteglass/blob/master/.travis.yml) 121 | of this repository. You can change `target-branch` (`gh-pages` by default) and 122 | `on.branch` (`master` by default) as you want. If you want further 123 | customization, see [Travis CI's documentation page](https://docs.travis-ci.com/user/deployment/pages/). 124 | 125 | You'll see there's `github-token: $GITHUB_TOKEN`, and this is what you should 126 | configure. Go to your [personal access tokens](https://github.com/settings/tokens) 127 | page, and generate new token with `public_repo` or `repo` permission as you 128 | need. Then go to Travis CI's settings page of your repository, and add a new 129 | environment variable `GITHUB_TOKEN` with the value of the token you generated. 130 | 131 | ## Usage 132 | 133 | ### Customization 134 | 135 | To override the default structure and style of whiteglass, simply create the 136 | concerned directory at the root of your site, copy the file you wish to 137 | customize to that directory, and then edit the file. e.g., to override the 138 | [`_includes/footer_content.html`](_includes/footer_content.html) file to add 139 | contents to footer, create an `_includes` directory, copy 140 | `_includes/footer_content.html` from jekyll-whiteglass gem folder to 141 | `/_includes` and start editing that file. 142 | 143 | For example, you can add favicons to `_includes/head_custom.html`: 144 | 145 | ``` html 146 | 147 | 148 | 149 | 150 | 151 | 152 | ``` 153 | 154 | The site's default CSS is in the gem itself, 155 | [`assets/main.scss`](assets/main.scss). To override the default CSS, the file 156 | has to exist at your site source. Do either of the following: 157 | 158 | - Create a new instance of `main.scss` at site source 159 | - Create a new file `main.scss` at `/assets/` 160 | - Add the frontmatter dashes, and 161 | - Add `@import "whiteglass";`, to `/assets/main.scss` 162 | - Add your custom CSS 163 | - Download the file from this repo 164 | - Create a new file `main.scss` at `/assets/` 165 | - Copy the contents at [`assets/main.scss`](assets/main.scss) onto the `main.scss` you just created, and edit away 166 | - Copy directly from jekyll-whiteglass gem 167 | - Go to your local jekyll-whiteglass gem installation directory (run `bundle show jekyll-whiteglass` to get the path to it) 168 | - Copy the `assets/` folder from there into the root of `` 169 | - Change whatever values you want, inside `/assets/main.scss` 170 | 171 | ### Locale 172 | 173 | `site.lang` is used to declare the primary language for each web page within the 174 | site. 175 | 176 | `lang: en-US` sets the `lang` attribute for the site to the United States flavor 177 | of English, while `en-GB` would be for the United Kingdom style of English. 178 | Country codes are optional and the shorter variation `lang: en` is also 179 | acceptable. You may want to write a post in different language, then add `lang` 180 | attribute to the frontmatter of that post: 181 | 182 | ``` yaml 183 | layout: post 184 | title: "안녕하세요" 185 | lang: ko 186 | ``` 187 | 188 | The date format and other fixed strings are translated using the `_data/i18n.yml` file. If your language is not yet included, feel free to open a [pull request](https://github.com/yous/whiteglass/pulls). 189 | 190 | ### Description 191 | 192 | `site.description` describes the site. This is mainly used in meta descriptions 193 | for improving SEO. Also, you can set `description` attribute for each post: 194 | 195 | ``` yaml 196 | layout: post 197 | title: Awesome Post 198 | description: This is an awesome post. 199 | ``` 200 | 201 | If you don't specify `post.description`, then `post.excerpt` will be used if it 202 | exist. 203 | 204 | ### External URL 205 | 206 | `external-url` turns the title of your post to a link. Specify a URL which you 207 | want to link to. 208 | 209 | ``` yaml 210 | layout: post 211 | title: Jekyll whiteglass theme 212 | external-url: https://github.com/yous/whiteglass 213 | ``` 214 | 215 | Then the title of your post would look like a link with text 216 | `Jekyll whiteglass theme →`. This also applies to your blog feed. 217 | 218 | ### Category 219 | 220 | Each post can have `categories` attribute. It can be a string or an array. This 221 | will be displayed on index, archive and each post, and provide a link to the 222 | archive of category. 223 | 224 | ``` yaml 225 | layout: post 226 | title: Awesome Post 227 | categories: Misc 228 | ``` 229 | 230 | ``` yaml 231 | layout: post 232 | title: Another Awesome Post 233 | categories: 234 | - Misc 235 | - Idea 236 | ``` 237 | 238 | ### Tag 239 | 240 | Each post can have `tags` attribute. It can be a string or an array. This will 241 | be displayed on index, archive and each post, and provide a link to the archive 242 | of tag. 243 | 244 | ``` yaml 245 | layout: post 246 | title: Awesome Post 247 | tags: food 248 | ``` 249 | 250 | ``` yaml 251 | layout: post 252 | title: Another Awesome Post 253 | tags: 254 | - food 255 | - trip 256 | ``` 257 | 258 | ### Feed 259 | 260 | Create `/feed.xml` with: 261 | 262 | ``` yaml 263 | --- 264 | layout: feed 265 | --- 266 | ``` 267 | 268 | If you want to use another path for feed, you can specify a non-default path via 269 | your site's config. 270 | 271 | ``` yaml 272 | feed: 273 | path: atom.xml 274 | ``` 275 | 276 | Then create `/atom.xml` with the same content of `feed.xml` above. 277 | 278 | ### Comments 279 | 280 | whiteglass provides the ability to include your favourite commenting service, like [Disqus](https://disqus.com) or [Isso](https://isso-comments.de/). 281 | 282 | To enable comments on pages and posts: 283 | 1. Overwrite the `_includes/custom_comments_provider.html` with your custom provider of comments. 284 | 2. Add `comments: true` to your `_config.yml`. 285 | 286 | To disable comments on certain pages or posts specify `comments: false` in the front matter of the page or post. 287 | 288 | ### Metadata for SEO 289 | 290 | #### Keywords 291 | 292 | Each post can have `keywords` attribute. This is a comma-separated list which is 293 | used in meta descriptions for improving SEO. 294 | 295 | ``` yaml 296 | layout: post 297 | title: How to configure jekyll-whiteglass 298 | keywords: jekyll, whiteglass, github pages 299 | ``` 300 | 301 | YAML list is also available: 302 | 303 | ``` yaml 304 | keywords: 305 | - jekyll 306 | - whiteglass 307 | - github pages 308 | ``` 309 | 310 | #### Twitter 311 | 312 | - `site.twitter_username` sets `twitter:site` and `twitter:creator` meta tag 313 | - `site.twitter_image` sets `twitter:image:src` meta tag 314 | - `page.twitter_card.type` sets `twitter:card` meta tag (default: `summary`) 315 | - If `page.twitter_card.type` is `gallery`, it sets `twitter:image0`, `twitter:image1`, `twitter:image2` and `twitter:image3` meta tags with `page.twitter_card.image`, `page.twitter_card.image1`, `page.twitter_card.image2` and `page.twitter_card.image3`, respectively 316 | - If `page.twitter_card.type` is `photo`, `page.twitter_card.width` sets `twitter:image:width` meta tag and `page.twitter_card.height` sets `twitter:image:height` meta tag 317 | - `page.twitter_card.creator` sets `twitter:creator` meta tag. It overrides `site.twitter_username` 318 | - `page.twitter_card.image` sets `twitter:image:src` meta tag if `page.twitter_card.type` is not `gallery`. It overrides `site.twitter_image` 319 | 320 | #### Facebook 321 | 322 | - `site.facebook_app_id` sets `fb:admins` meta tag 323 | - `site.facebook_page` sets `article:author` meta tag 324 | - `site.facebook_image` sets `og:image` meta tag 325 | - `page.facebook.image` sets `og:image` meta tag. It overrides `site.facebook_image` 326 | 327 | ### Navigation 328 | 329 | To define header links, add titles and URLs under the `main` key in 330 | `_data/navigation.yml`: 331 | 332 | ``` yaml 333 | main: 334 | - title: "About" 335 | url: /about/ 336 | - title: "Archives" 337 | url: /archives/ 338 | - title: "GitHub" 339 | url: https://github.com/yous/whiteglass 340 | ``` 341 | 342 | ### Enabling Google Analytics 343 | 344 | To enable Google Analytics, add the following lines to your Jekyll site: 345 | 346 | ``` yaml 347 | google_analytics: UA-NNNNNNNN-N 348 | ``` 349 | 350 | For Google Analytics 4, add the following lines: 351 | 352 | ``` yaml 353 | google_analytics: G-NNNNNNNNNN 354 | ``` 355 | 356 | Replace `N`s with your specific ID. 357 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # whiteglass 2 | 3 | [![Gem Version](https://badge.fury.io/rb/jekyll-whiteglass.svg)](https://badge.fury.io/rb/jekyll-whiteglass) 4 | [![CI](https://github.com/yous/whiteglass/actions/workflows/main.yml/badge.svg)](https://github.com/yous/whiteglass/actions/workflows/main.yml) 5 | 6 | Minimal, responsive Jekyll theme for hackers. 7 | 8 | ![whiteglass theme](screenshot.png) 9 | 10 | ## Installation 11 | 12 | Add this line to your Jekyll site's Gemfile: 13 | 14 | ``` ruby 15 | gem "jekyll-whiteglass" 16 | ``` 17 | 18 | And add this line to your Jekyll site's `_config.yml`: 19 | 20 | ``` yaml 21 | theme: jekyll-whiteglass 22 | ``` 23 | 24 | And then execute: 25 | 26 | ``` sh 27 | bundle 28 | ``` 29 | 30 | Or install it yourself as: 31 | 32 | ``` sh 33 | gem install jekyll-whiteglass 34 | ``` 35 | 36 | ## Quick Start 37 | 38 | 1. Go to [yous/whiteglass-template](https://github.com/yous/whiteglass-template). 39 | 2. Click "Use this template" button, and then create a repository. 40 | 3. Change the options defined in _config.yml. See [Configuration](https://github.com/yous/whiteglass-template#configuration) 41 | section under whiteglass-template. 42 | 4. Push some content, then GitHub Actions will generate the site. 43 | 44 | ## Manual Setup 45 | 46 | 1. Generate a new Jekyll blog: 47 | 48 | ``` sh 49 | jekyll new blog --skip-bundle 50 | cd blog 51 | ``` 52 | 53 | 2. Edit `Gemfile` to use whiteglass theme: 54 | 55 | ``` ruby 56 | gem "jekyll-whiteglass" 57 | ``` 58 | 59 | 3. Edit `_config.yml` to use whiteglass theme and its plugins: 60 | 61 | ``` yaml 62 | theme: jekyll-whiteglass 63 | plugins: 64 | - jekyll-archives 65 | - jekyll-paginate 66 | - jekyll-sitemap 67 | 68 | permalink: /:year/:month/:day/:title/ 69 | paginate_path: /posts/:num/ 70 | paginate: 5 71 | 72 | jekyll-archives: 73 | enabled: 74 | - categories 75 | - tags 76 | layout: category_archives 77 | permalinks: 78 | category: /categories/:name/ 79 | tag: /tags/:name/ 80 | ``` 81 | 82 | 4. Copy 83 | [`index.html`](https://github.com/yous/whiteglass/blob/master/index.html), 84 | [`about.md`](https://github.com/yous/whiteglass/blob/master/about.md), 85 | [`archives.md`](https://github.com/yous/whiteglass/blob/master/archives.md), 86 | [`feed.xml`](https://github.com/yous/whiteglass/blob/master/feed.xml), 87 | [`robots.txt`](https://github.com/yous/whiteglass/blob/master/robots.txt), 88 | [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml), 89 | and [`_data/navigation.yml`](https://github.com/yous/whiteglass/blob/master/_data/navigation.yml) 90 | from the theme: 91 | 92 | ``` sh 93 | rm index.md 94 | curl -L -O "https://github.com/yous/whiteglass/raw/master/{index.html,about.md,archives.md,feed.xml,robots.txt}" 95 | curl -L --create-dirs -o _data/#1 "https://github.com/yous/whiteglass/raw/master/_data/{navigation.yml,i18n.yml}" 96 | ``` 97 | 98 | 5. Install gems and you're good to go! The blog will be available on 99 | `http://127.0.0.1:4000`. 100 | 101 | ``` sh 102 | bundle install 103 | bundle exec jekyll serve 104 | ``` 105 | 106 | ## Upgrading 107 | 108 | ### From Versions < 1.9.1 109 | 110 | Copy 111 | [`_data/i18n.yml`](https://github.com/yous/whiteglass/blob/master/_data/i18n.yml) 112 | from the theme. 113 | 114 | ## Deployment to GitHub Pages using Travis CI 115 | 116 | This theme uses [jekyll-archives](https://github.com/jekyll/jekyll-archives) gem 117 | which is [not supported by GitHub Pages](https://help.github.com/articles/configuring-jekyll-plugins/). 118 | If you want to use full features like categories and tags, I recommend you to 119 | use Travis CI or other CI services. 120 | 121 | To deploy using Travis CI, first copy the [`.travis.yml`](https://github.com/yous/whiteglass/blob/master/.travis.yml) 122 | of this repository. You can change `target-branch` (`gh-pages` by default) and 123 | `on.branch` (`master` by default) as you want. If you want further 124 | customization, see [Travis CI's documentation page](https://docs.travis-ci.com/user/deployment/pages/). 125 | 126 | You'll see there's `github-token: $GITHUB_TOKEN`, and this is what you should 127 | configure. Go to your [personal access tokens](https://github.com/settings/tokens) 128 | page, and generate new token with `public_repo` or `repo` permission as you 129 | need. Then go to Travis CI's settings page of your repository, and add a new 130 | environment variable `GITHUB_TOKEN` with the value of the token you generated. 131 | 132 | ## Usage 133 | 134 | ### Customization 135 | 136 | To override the default structure and style of whiteglass, simply create the 137 | concerned directory at the root of your site, copy the file you wish to 138 | customize to that directory, and then edit the file. e.g., to override the 139 | [`_includes/footer_content.html`](_includes/footer_content.html) file to add 140 | contents to footer, create an `_includes` directory, copy 141 | `_includes/footer_content.html` from jekyll-whiteglass gem folder to 142 | `/_includes` and start editing that file. 143 | 144 | For example, you can add favicons to `_includes/head_custom.html`: 145 | 146 | ``` html 147 | 148 | 149 | 150 | 151 | 152 | 153 | ``` 154 | 155 | The site's default CSS is in the gem itself, 156 | [`assets/main.scss`](assets/main.scss). To override the default CSS, the file 157 | has to exist at your site source. Do either of the following: 158 | 159 | - Create a new instance of `main.scss` at site source 160 | - Create a new file `main.scss` at `/assets/` 161 | - Add the frontmatter dashes, and 162 | - Add `@import "whiteglass";`, to `/assets/main.scss` 163 | - Add your custom CSS 164 | - Download the file from this repo 165 | - Create a new file `main.scss` at `/assets/` 166 | - Copy the contents at [`assets/main.scss`](assets/main.scss) onto the `main.scss` you just created, and edit away 167 | - Copy directly from jekyll-whiteglass gem 168 | - Go to your local jekyll-whiteglass gem installation directory (run `bundle show jekyll-whiteglass` to get the path to it) 169 | - Copy the `assets/` folder from there into the root of `` 170 | - Change whatever values you want, inside `/assets/main.scss` 171 | 172 | ### Locale 173 | 174 | `site.lang` is used to declare the primary language for each web page within the 175 | site. 176 | 177 | `lang: en-US` sets the `lang` attribute for the site to the United States flavor 178 | of English, while `en-GB` would be for the United Kingdom style of English. 179 | Country codes are optional and the shorter variation `lang: en` is also 180 | acceptable. You may want to write a post in different language, then add `lang` 181 | attribute to the frontmatter of that post: 182 | 183 | ``` yaml 184 | layout: post 185 | title: "안녕하세요" 186 | lang: ko 187 | ``` 188 | 189 | The date format and other fixed strings are translated using the `_data/i18n.yml` file. If your language is not yet included, feel free to open a [pull request](https://github.com/yous/whiteglass/pulls). 190 | 191 | ### Description 192 | 193 | `site.description` describes the site. This is mainly used in meta descriptions 194 | for improving SEO. Also, you can set `description` attribute for each post: 195 | 196 | ``` yaml 197 | layout: post 198 | title: Awesome Post 199 | description: This is an awesome post. 200 | ``` 201 | 202 | If you don't specify `post.description`, then `post.excerpt` will be used if it 203 | exist. 204 | 205 | ### External URL 206 | 207 | `external-url` turns the title of your post to a link. Specify a URL which you 208 | want to link to. 209 | 210 | ``` yaml 211 | layout: post 212 | title: Jekyll whiteglass theme 213 | external-url: https://github.com/yous/whiteglass 214 | ``` 215 | 216 | Then the title of your post would look like a link with text 217 | `Jekyll whiteglass theme →`. This also applies to your blog feed. 218 | 219 | ### Category 220 | 221 | Each post can have `categories` attribute. It can be a string or an array. This 222 | will be displayed on index, archive and each post, and provide a link to the 223 | archive of category. 224 | 225 | ``` yaml 226 | layout: post 227 | title: Awesome Post 228 | categories: Misc 229 | ``` 230 | 231 | ``` yaml 232 | layout: post 233 | title: Another Awesome Post 234 | categories: 235 | - Misc 236 | - Idea 237 | ``` 238 | 239 | ### Tag 240 | 241 | Each post can have `tags` attribute. It can be a string or an array. This will 242 | be displayed on index, archive and each post, and provide a link to the archive 243 | of tag. 244 | 245 | ``` yaml 246 | layout: post 247 | title: Awesome Post 248 | tags: food 249 | ``` 250 | 251 | ``` yaml 252 | layout: post 253 | title: Another Awesome Post 254 | tags: 255 | - food 256 | - trip 257 | ``` 258 | 259 | ### Feed 260 | 261 | Create `/feed.xml` with: 262 | 263 | ``` yaml 264 | --- 265 | layout: feed 266 | --- 267 | ``` 268 | 269 | If you want to use another path for feed, you can specify a non-default path via 270 | your site's config. 271 | 272 | ``` yaml 273 | feed: 274 | path: atom.xml 275 | ``` 276 | 277 | Then create `/atom.xml` with the same content of `feed.xml` above. 278 | 279 | ### Comments 280 | 281 | whiteglass provides the ability to include your favourite commenting service, like [Disqus](https://disqus.com) or [Isso](https://isso-comments.de/). 282 | 283 | To enable comments on pages and posts: 284 | 1. Overwrite the `_includes/custom_comments_provider.html` with your custom provider of comments. 285 | 2. Add `comments: true` to your `_config.yml`. 286 | 287 | To disable comments on certain pages or posts specify `comments: false` in the front matter of the page or post. 288 | 289 | ### Metadata for SEO 290 | 291 | #### Keywords 292 | 293 | Each post can have `keywords` attribute. This is a comma-separated list which is 294 | used in meta descriptions for improving SEO. 295 | 296 | ``` yaml 297 | layout: post 298 | title: How to configure jekyll-whiteglass 299 | keywords: jekyll, whiteglass, github pages 300 | ``` 301 | 302 | YAML list is also available: 303 | 304 | ``` yaml 305 | keywords: 306 | - jekyll 307 | - whiteglass 308 | - github pages 309 | ``` 310 | 311 | #### Twitter 312 | 313 | - `site.twitter_username` sets `twitter:site` and `twitter:creator` meta tag 314 | - `site.twitter_image` sets `twitter:image:src` meta tag 315 | - `page.twitter_card.type` sets `twitter:card` meta tag (default: `summary`) 316 | - If `page.twitter_card.type` is `gallery`, it sets `twitter:image0`, `twitter:image1`, `twitter:image2` and `twitter:image3` meta tags with `page.twitter_card.image`, `page.twitter_card.image1`, `page.twitter_card.image2` and `page.twitter_card.image3`, respectively 317 | - If `page.twitter_card.type` is `photo`, `page.twitter_card.width` sets `twitter:image:width` meta tag and `page.twitter_card.height` sets `twitter:image:height` meta tag 318 | - `page.twitter_card.creator` sets `twitter:creator` meta tag. It overrides `site.twitter_username` 319 | - `page.twitter_card.image` sets `twitter:image:src` meta tag if `page.twitter_card.type` is not `gallery`. It overrides `site.twitter_image` 320 | 321 | #### Facebook 322 | 323 | - `site.facebook_app_id` sets `fb:admins` meta tag 324 | - `site.facebook_page` sets `article:author` meta tag 325 | - `site.facebook_image` sets `og:image` meta tag 326 | - `page.facebook.image` sets `og:image` meta tag. It overrides `site.facebook_image` 327 | 328 | ### Navigation 329 | 330 | To define header links, add titles and URLs under the `main` key in 331 | `_data/navigation.yml`: 332 | 333 | ``` yaml 334 | main: 335 | - title: "About" 336 | url: /about/ 337 | - title: "Archives" 338 | url: /archives/ 339 | - title: "GitHub" 340 | url: https://github.com/yous/whiteglass 341 | ``` 342 | 343 | ### Enabling Google Analytics 344 | 345 | To enable Google Analytics, add the following lines to your Jekyll site: 346 | 347 | ``` yaml 348 | google_analytics: UA-NNNNNNNN-N 349 | ``` 350 | 351 | For Google Analytics 4, add the following lines: 352 | 353 | ``` yaml 354 | google_analytics: G-NNNNNNNNNN 355 | ``` 356 | 357 | Replace `N`s with your specific ID. 358 | 359 | ## Contributing 360 | 361 | Bug reports and pull requests are welcome on GitHub at 362 | . This project is intended to be a safe, 363 | welcoming space for collaboration, and contributors are expected to adhere to 364 | the [Contributor Covenant](http://contributor-covenant.org) code of conduct. 365 | 366 | ## Development 367 | 368 | To set up your environment to develop this theme, run `bundle install`. 369 | 370 | Your theme is setup just like a normal Jekyll site! To test your theme, run 371 | `bundle exec jekyll serve` and open your browser at 372 | `http://localhost:4000/whiteglass/`. This starts a Jekyll server using your 373 | theme. Add pages, documents, data, etc. like normal to test your theme's 374 | contents. As you make modifications to your theme and to your content, your site 375 | will regenerate and you should see the changes in the browser after a refresh, 376 | just like normal. 377 | 378 | ## License 379 | 380 | The theme is available as open source under the terms of the 381 | [MIT License](http://opensource.org/licenses/MIT). 382 | --------------------------------------------------------------------------------