diff --git a/Gemfile b/Gemfile index 7ce2abbce1..b8073827f0 100644 --- a/Gemfile +++ b/Gemfile @@ -15,4 +15,6 @@ group :jekyll_plugins do gem 'jekyll-paginate' gem 'jekyll-seo-tag' gem 'jekyll-archives' + gem 'kramdown' + gem 'rouge' end diff --git a/Gemfile.lock b/Gemfile.lock index 15b57f224a..a991aa68c0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,9 +9,7 @@ GEM eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) eventmachine (1.2.7-x64-mingw32) - eventmachine (1.2.7-x86-mingw32) ffi (1.10.0-x64-mingw32) - ffi (1.10.0-x86-mingw32) forwardable-extended (2.6.0) http_parser.rb (0.6.0) i18n (0.9.5) @@ -57,7 +55,7 @@ GEM ffi (~> 1.0) rouge (3.3.0) ruby_dep (1.5.0) - safe_yaml (1.0.4) + safe_yaml (1.0.5) sass (3.7.3) sass-listen (~> 4.0.0) sass-listen (4.0.0) @@ -67,7 +65,6 @@ GEM PLATFORMS x64-mingw32 - x86-mingw32 DEPENDENCIES jekyll-archives @@ -75,10 +72,9 @@ DEPENDENCIES jekyll-paginate jekyll-seo-tag jekyll-sitemap + kramdown + rouge wdm (>= 0.1.0) -RUBY VERSION - ruby 2.6.1p33 - BUNDLED WITH - 1.17.2 + 1.16.4 diff --git a/_config.yml b/_config.yml index 737214732f..02d5d81d27 100644 --- a/_config.yml +++ b/_config.yml @@ -53,4 +53,10 @@ paginate_path: /page:num/ # Other markdown: kramdown -highlighter: rouge \ No newline at end of file + +kramdown: + input: GFM + syntax_highlighter: rouge + syntax_highlighter_opts: + block: + line_numbers: true \ No newline at end of file diff --git a/_includes/featuredbox.html b/_includes/featuredbox.html index 9d399a5e48..c4a0600b16 100644 --- a/_includes/featuredbox.html +++ b/_includes/featuredbox.html @@ -17,7 +17,15 @@
-

{{ post.title }}

+

+ {{ post.title }} + {% if post.rating %} +
+ {% include star_rating_postbox.html %} +
+ {% endif %} +

+

{{ post.excerpt | strip_html | truncatewords:25 }}

-

{{ post.title }}

+

+ {{ post.title }} + {% if post.rating %} +
+ {% include star_rating_postbox.html %} +
+ {% endif %} +

{{ post.excerpt | strip_html | truncatewords:30 }}

{% endif %} \ No newline at end of file +================================================== --> + + + +{% if page.rating %} + +{% endif %} \ No newline at end of file diff --git a/_posts/2018-01-11-customer-service.md b/_posts/2018-01-11-customer-service.md index 147d4ab4a2..ba0aadd8c8 100644 --- a/_posts/2018-01-11-customer-service.md +++ b/_posts/2018-01-11-customer-service.md @@ -1,21 +1,29 @@ --- layout: post -title: "What is Jekyll" +title: "Inception Movie" author: john categories: [ Jekyll, tutorial ] image: assets/images/11.jpg +description: "My review of Inception movie. Acting, plot and something else in this short description." featured: true hidden: true +rating: 5 --- -No more databases, comment moderation, or pesky updates to install-just your content. Markdown, Liquid, HTML & CSS go in. Static sites come out ready for deployment. Permalinks, categories, pages, posts, and custom layouts are all first-class citizens here. +Review products, books, movies, restaurant and anything you like on your Jekyll blog with Mediumish! JSON-LD ready for review property. -Sick of dealing with hosting companies? GitHub Pages are powered by Jekyll, so you can easily deploy your site using GitHub for free-custom domain name and all. +#### How to use? -## What is Jekyll? +It's actually really simple! Add the rating in your YAML front matter: -Jekyll is a simple, blog-aware, static site generator. - -You create your content as text files (Markdown), and organize them into folders. Then, you build the shell of your site using Liquid-enhanced HTML templates. Jekyll automatically stitches the content and templates together, generating a website made entirely of static assets, suitable for uploading to any server. - -Jekyll happens to be the engine behind GitHub Pages, so you can host your project’s Jekyll page/blog/website on GitHub’s servers for free. \ No newline at end of file +```html +--- +layout: post +title: "Inception Movie" +author: john +categories: [ Jekyll, tutorial ] +image: assets/images/11.jpg +description: "My review of Inception movie. Actors, directing and more." +rating: 5 +--- +``` diff --git a/_posts/2018-05-12-about-bundler.md b/_posts/2018-05-12-about-bundler.md index 40dfcfda03..5b289c0374 100644 --- a/_posts/2018-05-12-about-bundler.md +++ b/_posts/2018-05-12-about-bundler.md @@ -4,6 +4,7 @@ title: "About Bundler" author: sal categories: [ Jekyll ] image: assets/images/2.jpg +rating: 3 --- `gem install bundler` installs the bundler gem through RubyGems. You only need to install it once - not every time you create a new Jekyll project. Here are some additional details: diff --git a/_posts/2018-06-12-powerful-things-markdown-editor.md b/_posts/2018-06-12-powerful-things-markdown-editor.md index 5c54d70bef..2d0f3f594f 100644 --- a/_posts/2018-06-12-powerful-things-markdown-editor.md +++ b/_posts/2018-06-12-powerful-things-markdown-editor.md @@ -29,7 +29,64 @@ There are two types of code elements which can be inserted in Markdown, the firs } ``` -If you want to get really fancy, you can even add syntax highlighting using Rouge. +#### HTML + +```html +
  • + + + +
  • +``` + +#### CSS + +```css +.highlight .c { + color: #999988; + font-style: italic; +} +.highlight .err { + color: #a61717; + background-color: #e3d2d2; +} +``` + +#### JS + +```js +// alertbar later +$(document).scroll(function () { + var y = $(this).scrollTop(); + if (y > 280) { + $('.alertbar').fadeIn(); + } else { + $('.alertbar').fadeOut(); + } +}); +``` + +#### Python + +```python +print("Hello World") +``` + +#### Ruby + +```ruby +require 'redcarpet' +markdown = Redcarpet.new("Hello World!") +puts markdown.to_html +``` + +#### C + +```c +printf("Hello World"); +``` + + ![walking]({{ site.baseurl }}/assets/images/8.jpg) diff --git a/_sass/_syntax.scss b/_sass/_syntax.scss index f673b745c6..89be44b8e1 100644 --- a/_sass/_syntax.scss +++ b/_sass/_syntax.scss @@ -1,6 +1,6 @@ .highlight { - background: #ffffff; + background: #F7FAFB; .c { color: #999988; font-style: italic } /* Comment */ .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .k { font-weight: bold } /* Keyword */ @@ -62,3 +62,5 @@ .il { color: #009999 } /* Literal.Number.Integer.Long */ } +td.rouge-code { width: 100%;} +pre.lineno { color: #9999;} \ No newline at end of file diff --git a/assets/css/screen.css b/assets/css/screen.css index 2dc3c1c0ed..c949fdeda0 100644 --- a/assets/css/screen.css +++ b/assets/css/screen.css @@ -1,7 +1,6 @@ /* Template Name: Mediumish Copyright: Sal, WowThemes.net, https://www.wowthemes.net -Version: 1.0.24 License: https://www.wowthemes.net/freebies-license/ */ .mainheading { @@ -16,18 +15,20 @@ License: https://www.wowthemes.net/freebies-license/ text-decoration:none; } pre { - -moz-box-sizing: border-box; - box-sizing: border-box; - margin: 0 0 1.75em 0; - border: #E3EDF3 1px solid; - width: 100%; - padding: 10px; - font-family: monospace, sans-serif; - font-size: 14px; - white-space: pre; - overflow: auto; - background: #F7FAFB; - border-radius: 3px; + -moz-box-sizing: border-box; + box-sizing: border-box; + margin: 0 0 1.75em 0; + border: #E3EDF3 1px solid; + width: 100%; + padding: 10px; + font-family: monospace, sans-serif; + font-size: 14px; + white-space: pre; + overflow: auto; + background: #F7FAFB; + border-radius: 3px; + line-height: 1.6; + color:#333; } .mediumnavigation { background:rgba(255,255,255,.97); @@ -663,4 +664,7 @@ License: https://www.wowthemes.net/freebies-license/ } .sticky-top-80 { top:80px; -} \ No newline at end of file +} +.star-rating { + font-size:20px; +} diff --git a/changelog.md b/changelog.md index d7916ae6f9..961328a0d4 100644 --- a/changelog.md +++ b/changelog.md @@ -1,14 +1,20 @@ # Mediumish Jekyll Theme - Change Log +## 2019-03-01, v1.0.26 + +### Added +- Syntax line numbers + +### Fixed +- Category links with more than 1 word + ## 2019-02-14 ### Fixed - Feed site title not showing - ### Added - 404 page - ## 2019-02-10 ### Fixed