chore: adjust theme configuration, etc

This commit is contained in:
Jeffrey Tse 2019-09-12 18:38:59 +08:00
parent 61eae5c5f9
commit 40b20a9a18
9 changed files with 53 additions and 36 deletions

View file

@ -2,11 +2,3 @@
source "https://rubygems.org"
gemspec
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-paginate"
end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.0" if Gem.win_platform?

View file

@ -35,7 +35,7 @@ TODO: Write usage instructions here. Describe your available layouts, includes,
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hello. 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.
Bug reports and pull requests are welcome on GitHub at https://github.com/jeffreytse/jekyll-theme-yat. 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.
## Development
@ -43,7 +43,7 @@ To set up your environment to develop this theme, run `bundle install`.
Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
When your theme is released, only the files in `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
When your theme is released, only the files in `_data`, `_layouts`, `_includes`, `_sass` and `assets` tracked with Git will be bundled.
To add a custom directory to your theme-gem, please edit the regexp in `jekyll-theme-yat.gemspec` accordingly.
## License

View file

@ -24,6 +24,21 @@ yat:
# If you want more debug log, you can set true
# debug: true
# You can choose a theme color
# Default theme colors as below:
# spacegrey: #222222
# inkpurple: #543581
# aquablue: #00aaa0
# azureblue: #2863b1
# gracered: #a12a50
# aloegreen: #3d9e56
# rustbrown: #795548
#
# theme_color: spacegrey
#
# Custom color as below:
# theme_color: "#882250"
# If you want to link only specific pages in your header, uncomment
# this and add the path to the pages in order as they should show up
# header_pages:
@ -40,7 +55,7 @@ yat:
# banner: "Your image url"
# Pagination setting
paginate: 5
# paginate: 5
# Disqus comments
# disqus:

View file

@ -2,12 +2,12 @@
<data class="u-url" href="{{ "/" | relative_url }}"></data>
<div class="wrapper">
<span>
<div class="site-footer-inner">
<div>{{ site.copyright }} @{{ site.author | escape }}</div>
<div>Powered by <a title="Jekyll is a simple, blog-aware, static site
generator." href="http://jekyllrb.com/">Jekyll</a> &amp; <a title="Yat, yet
another theme." href="https://github.com/jeffreytse/jekyll-theme-yat">Yat Theme</a>.</div>
</span>
<span class="footer-col rss-subscribe">Subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></span>
<div class="footer-col rss-subscribe">Subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></div>
</div>
</div>
</footer>

View file

@ -1,5 +1,8 @@
---
layout: articles
heading: 'Your awesome heading'
subheading: 'Your awesome subheading'
banner: 'default'
---
{{ content }}

View file

@ -19,21 +19,7 @@ $grey-color: #828282 !default;
$grey-color-light: lighten($grey-color, 40%) !default;
$grey-color-dark: darken($grey-color, 25%) !default;
// Themes
$theme-cool: #222 !default;
$theme-violet: #543581 !default;
$theme-aquablue: #00aaa0 !default;
$theme-azure: #2863b1 !default;
$theme-gracered: #a12a50 !default;
$theme-aloe: #3d9e56 !default;
$theme-brown: #795548 !default;
// Current theme
$theme: $theme-cool;
$white-color: #fdfdfd !default;
$theme-color: $theme;
$table-text-align: left !default;

View file

@ -2,4 +2,24 @@
# Only the main Sass file needs front matter (the dashes are enough)
---
// Default theme colors
$theme-colors: (
spacegrey: #222222,
inkpurple: #543581,
aquablue: #00aaa0,
azureblue: #2863b1,
gracered: #a12a50,
aloegreen: #3d9e56,
rustbrown: #795548,
);
$theme-name: "{{ site.theme_color }}";
$theme-color: map-get($theme-colors, "spacegrey");
@if map-has-key($theme-colors, $theme-name) {
$theme-color: map-get($theme-colors, $theme-name);
} @else if str-index($theme-name, "#") == 1 {
$theme-color: {{ site.theme_color | default: '#222' }};
}
@import "yat";

View file

@ -6,12 +6,12 @@ Gem::Specification.new do |spec|
spec.authors = ["jeffreytse"]
spec.email = ["jeffreytse.mail@gmail.com"]
spec.summary = "Yet another theme."
spec.summary = "Yet another theme for personal writers."
spec.homepage = "https://github.com/jeffreytse/jekyll-theme-yat"
spec.license = "MIT"
spec.files = `git ls-files -z`.split("\x0").select do |f|
f.match(%r!^(assets|_layouts|_includes|_sass|LICENSE|README)!i)
f.match(%r!^(assets|_data|_layouts|_includes|_sass|LICENSE|README)!i)
end
spec.add_development_dependency "bundler", "~> 1.16"
@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
spec.add_runtime_dependency "jekyll", "~> 3.8"
spec.add_runtime_dependency "jekyll-feed", "~> 0.9"
spec.add_runtime_dependency "jekyll-seo-tag", "~> 2.1"
spec.add_runtime_dependency "jekyll-paginate", "~> 1.1"
end