summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Gemfile8
-rw-r--r--README.md4
-rw-r--r--_config.yml17
-rw-r--r--_includes/extensions/mathjax.html12
-rw-r--r--_includes/views/footer.html6
-rw-r--r--_layouts/home.html3
-rw-r--r--_sass/yat.scss14
-rw-r--r--assets/main.scss20
-rw-r--r--jekyll-theme-yat.gemspec5
9 files changed, 53 insertions, 36 deletions
diff --git a/Gemfile b/Gemfile
index 68aa6c1..bb94df8 100644
--- a/Gemfile
+++ b/Gemfile
@@ -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?
diff --git a/README.md b/README.md
index 9c18066..d3e0ccf 100644
--- a/README.md
+++ b/README.md
@@ -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
diff --git a/_config.yml b/_config.yml
index 2c7db43..dedafeb 100644
--- a/_config.yml
+++ b/_config.yml
@@ -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:
diff --git a/_includes/extensions/mathjax.html b/_includes/extensions/mathjax.html
index b06023b..9ddd1ff 100644
--- a/_includes/extensions/mathjax.html
+++ b/_includes/extensions/mathjax.html
@@ -1,10 +1,10 @@
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
-tex2jax: {
-skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
-inlineMath: [['$','$']]
-}
-});
+ tex2jax: {
+ skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
+ inlineMath: [['$','$']]
+ }
+ });
</script>
<script
- src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML" type="text/javascript"></script>
+src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML" type="text/javascript"></script>
diff --git a/_includes/views/footer.html b/_includes/views/footer.html
index 2df399b..867a428 100644
--- a/_includes/views/footer.html
+++ b/_includes/views/footer.html
@@ -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>
diff --git a/_layouts/home.html b/_layouts/home.html
index 5b677fe..4753b16 100644
--- a/_layouts/home.html
+++ b/_layouts/home.html
@@ -1,5 +1,8 @@
---
layout: articles
+heading: 'Your awesome heading'
+subheading: 'Your awesome subheading'
+banner: 'default'
---
{{ content }}
diff --git a/_sass/yat.scss b/_sass/yat.scss
index 76bf409..52162d7 100644
--- a/_sass/yat.scss
+++ b/_sass/yat.scss
@@ -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;
diff --git a/assets/main.scss b/assets/main.scss
index bb4b18b..393c8e9 100644
--- a/assets/main.scss
+++ b/assets/main.scss
@@ -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";
diff --git a/jekyll-theme-yat.gemspec b/jekyll-theme-yat.gemspec
index 6e89827..5fc7b08 100644
--- a/jekyll-theme-yat.gemspec
+++ b/jekyll-theme-yat.gemspec
@@ -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