diff --git a/Gemfile b/Gemfile index bc0a57f38c..2cd7490d15 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source "https://rubygems.org" gem "json" -gem "jekyll", "~> 3.0" +gem "jekyll" gem "jekyll-sitemap" -gem "octopress" +gem "jekyll-feed" gem "jekyll-paginate" gem "jekyll-gist" diff --git a/Gemfile.lock b/Gemfile.lock index 98db538fc8..a2ae49bf13 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,12 +1,13 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.3.8) + addressable (2.4.0) colorator (0.1) faraday (0.9.2) multipart-post (>= 1.2, < 3) ffi (1.9.10) - jekyll (3.1.1) + ffi (1.9.10-x64-mingw32) + jekyll (3.1.6) colorator (~> 0.1) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 1.1) @@ -15,58 +16,46 @@ GEM mercenary (~> 0.3.3) rouge (~> 1.7) safe_yaml (~> 1.0) + jekyll-feed (0.5.1) jekyll-gist (1.4.0) octokit (~> 4.2) jekyll-paginate (1.1.0) jekyll-sass-converter (1.4.0) sass (~> 3.4) jekyll-sitemap (0.10.0) - jekyll-watch (1.3.1) - listen (~> 3.0) - kramdown (1.9.0) + jekyll-watch (1.4.0) + listen (~> 3.0, < 3.1) + json (1.8.3) + kramdown (1.11.1) liquid (3.0.6) - listen (3.0.5) - rb-fsevent (>= 0.9.3) - rb-inotify (>= 0.9) - mercenary (0.3.5) + listen (3.0.8) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + mercenary (0.3.6) multipart-post (2.0.0) - octokit (4.2.0) - sawyer (~> 0.6.0, >= 0.5.3) - octopress (3.0.11) - jekyll (>= 2.0) - mercenary (~> 0.3.2) - octopress-deploy - octopress-escape-code (~> 2.0) - octopress-hooks (~> 2.0) - redcarpet (~> 3.0) - titlecase - octopress-deploy (1.3.0) - colorator - octopress-escape-code (2.1.1) - jekyll (~> 3.0) - octopress-hooks (2.6.1) - jekyll (>= 2.0) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) rb-fsevent (0.9.7) - rb-inotify (0.9.5) + rb-inotify (0.9.7) ffi (>= 0.5.0) - redcarpet (3.3.4) rouge (1.10.1) safe_yaml (1.0.4) - sass (3.4.21) - sawyer (0.6.0) - addressable (~> 2.3.5) + sass (3.4.22) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) faraday (~> 0.8, < 0.10) - titlecase (0.1.1) PLATFORMS ruby + x64-mingw32 DEPENDENCIES - jekyll (~> 3.0) + jekyll + jekyll-feed jekyll-gist jekyll-paginate jekyll-sitemap - octopress + json BUNDLED WITH - 1.11.2 + 1.12.5 diff --git a/README.md b/README.md index b7751ec2b1..e8e8df8105 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,6 @@ They say three times the charm, so here is another free responsive Jekyll theme ## Getting Started -HPSTR takes advantage of SCSS and data files to make customizing easier. These features require Jekyll 2.x and will not work with older versions of Jekyll. +HPSTR takes advantage of SCSS and data files to make customizing easier. This theme requires Jekyll 3.x and will not work with older versions properly. To learn how to install and use this theme check out the [Setup Guide](https://mmistakes.github.io/hpstr-jekyll-theme/theme-setup/) for more information. \ No newline at end of file diff --git a/Rakefile.rb b/Rakefile.rb deleted file mode 100644 index e69b923c0a..0000000000 --- a/Rakefile.rb +++ /dev/null @@ -1,89 +0,0 @@ -require "rubygems" -require "bundler/setup" -require "stringex" - -## -- Config -- ## - -public_dir = "public" # compiled site directory -posts_dir = "_posts" # directory for blog files -new_post_ext = "md" # default new post file extension when using the new_post task -new_page_ext = "md" # default new page file extension when using the new_page task - - -############################# -# Create a new Post or Page # -############################# - -# usage rake new_post -desc "Create a new post in #{posts_dir}" -task :new_post, :title do |t, args| - if args.title - title = args.title - else - title = get_stdin("Enter a title for your post: ") - end - filename = "#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}" - if File.exist?(filename) - abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' - end - tags = get_stdin("Enter tags to classify your post (comma separated): ") - puts "Creating new post: #{filename}" - open(filename, 'w') do |post| - post.puts "---" - post.puts "layout: post" - post.puts "title: \"#{title.gsub(/&/,'&')}\"" - post.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M:%S %z')}" - post.puts "tags: [#{tags}]" - post.puts "image:" - post.puts " feature: " - post.puts " credit: " - post.puts " creditlink: " - post.puts "comments: " - post.puts "share: " - post.puts "---" - end -end - -# usage rake new_page -desc "Create a new page" -task :new_page, :title do |t, args| - if args.title - title = args.title - else - title = get_stdin("Enter a title for your page: ") - end - filename = "#{title.to_url}.#{new_page_ext}" - if File.exist?(filename) - abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' - end - tags = get_stdin("Enter tags to classify your page (comma separated): ") - puts "Creating new page: #{filename}" - open(filename, 'w') do |page| - page.puts "---" - page.puts "layout: page" - page.puts "permalink: /#{title.to_url}/" - page.puts "title: \"#{title}\"" - page.puts "modified: #{Time.now.strftime('%Y-%m-%d %H:%M')}" - page.puts "tags: [#{tags}]" - page.puts "image:" - page.puts " feature: " - page.puts " credit: " - page.puts " creditlink: " - page.puts "share: " - page.puts "---" - end -end - -def get_stdin(message) - print message - STDIN.gets.chomp -end - -def ask(message, valid_options) - if valid_options - answer = get_stdin("#{message} #{valid_options.to_s.gsub(/"/, '').gsub(/, /,'/')} ") while !valid_options.include?(answer) - else - answer = get_stdin(message) - end - answer -end \ No newline at end of file diff --git a/_config.yml b/_config.yml index 4bc7487212..b7f5831d9e 100644 --- a/_config.yml +++ b/_config.yml @@ -3,7 +3,7 @@ description: Describe your website here. disqus_shortname: reading_time: true words_per_minute: 200 -# Your site's domain goes here (eg: //mmistakes.github.io, http://mademistakes.com, etc) +# Your site's domain goes here (eg: https://mmistakes.github.io, http://yourdomain.com, etc) # When testing locally leave blank or use http://localhost:4000 url: @@ -43,6 +43,7 @@ gems: - jekyll-sitemap - jekyll-paginate - jekyll-gist + - jekyll-feed sass: sass_dir: _sass style: compressed @@ -54,28 +55,35 @@ permalink: /:categories/:title/ paginate: 5 kramdown: + input: GFM auto_ids: true footnote_nr: 1 entity_output: as_char toc_levels: 1..6 enable_coderay: false - coderay: - coderay_line_numbers: nil - coderay_line_numbers_start: 1 - coderay_tab_width: 4 - coderay_bold_every: 10 - coderay_css: class - -# Octopress -# Default extensions -post_ext: md -page_ext: md -# Found in _templates/ -post_layout: post -page_layout: page -# Format titles with titlecase? -titlecase: true - -include: [".htaccess"] -exclude: ["lib", "config.rb", "Capfile", "config", "Gemfile", "Gemfile.lock", "README.md", "LICENSE", "log", "Rakefile", "Rakefile.rb", "tmp", "less", "*.sublime-project", "*.sublime-workspace", "test", "spec", "Gruntfile.js", "package.json", "node_modules"] +include: + - .htaccess +exclude: + - "*.less" + - "*.sublime-project" + - "*.sublime-workspace" + - .asset-cache + - .bundle + - .jekyll-assets-cache + - .sass-cache + - CHANGELOG + - Capfile + - Gemfile + - Gruntfile.js + - LICENSE + - README + - Rakefile + - config + - gulpfile.js + - lib + - log + - node_modules + - package.json + - spec + - tmp diff --git a/_posts/2011-03-10-sample-post.md b/_posts/2011-03-10-sample-post.md index 6b4c236947..a075a8c919 100644 --- a/_posts/2011-03-10-sample-post.md +++ b/_posts/2011-03-10-sample-post.md @@ -70,15 +70,15 @@ HTML and CSS are our tools. Mauris a a ## Code Snippets -Syntax highlighting via Pygments +Syntax highlighting via Rouge -{% highlight css %} +```css #container { float: left; margin: 0 -240px 0 0; width: 100%; } -{% endhighlight %} +``` Non Pygments code example @@ -90,9 +90,9 @@ Non Pygments code example Make any link standout more when applying the `.btn` class. -{% highlight html %} +```html Success Button -{% endhighlight %} +```
Primary Button
Success Button
diff --git a/_posts/2013-05-22-sample-post-images.md b/_posts/2013-05-22-sample-post-images.md index 08700a560c..7c411202b0 100644 --- a/_posts/2013-05-22-sample-post-images.md +++ b/_posts/2013-05-22-sample-post-images.md @@ -20,13 +20,13 @@ Here are some examples of what a post with images might look like. If you want t Apply the `half` class like so to display two images side by side that share the same caption. -{% highlight html %} +```html
Caption describing these two images.
-{% endhighlight %} +``` And you'll get something that looks like this: @@ -42,14 +42,14 @@ And you'll get something that looks like this: Apply the `third` class like so to display three images side by side that share the same caption. -{% highlight html %} +```html
Caption describing these three images.
-{% endhighlight %} +``` And you'll get something that looks like this: @@ -71,16 +71,14 @@ and fill the block with any number of links to images. You can mix relative and Here is the block you might want to use: -{% highlight jinja %} -{% raw %} -{% capture images %} +```liquid +{% raw %}{% capture images %} /images/abstract-10.jpg /images/abstract-11.jpg http://upload.wikimedia.org/wikipedia/en/2/24/Lenna.png {% endcapture %} -{% include gallery images=images caption="Test images" cols=3 %} -{% endraw %} -{% endhighlight %} +{% include gallery images=images caption="Test images" cols=3 %}{% endraw %} +``` Parameters: diff --git a/_posts/2013-06-25-video-post.md b/_posts/2013-06-25-video-post.md index 0ea69a0354..9a0d217373 100644 --- a/_posts/2013-06-25-video-post.md +++ b/_posts/2013-06-25-video-post.md @@ -5,12 +5,10 @@ description: "Custom written post descriptions are the way to go... if you're no tags: [sample post, video] --- - + Video embeds are responsive and scale with the width of the main content block with the help of [FitVids](http://fitvidsjs.com/). -Not sure if this only effects Kramdown or if it's an issue with Markdown in general. But adding YouTube video embeds causes errors when building your Jekyll site. To fix add a space between the ` -{% endhighlight %} \ No newline at end of file +```html + +``` \ No newline at end of file diff --git a/_posts/2013-08-16-code-highlighting-post.md b/_posts/2013-08-16-code-highlighting-post.md index 66329f2947..ccf93da47c 100644 --- a/_posts/2013-08-16-code-highlighting-post.md +++ b/_posts/2013-08-16-code-highlighting-post.md @@ -2,7 +2,7 @@ layout: post title: Syntax Highlighting Post description: "Demo post displaying the various ways of highlighting code in Markdown." -modified: 2016-02-01 +modified: 2016-06-01T15:27:45-04:00 tags: [sample post, code, highlighting] image: feature: abstract-10.jpg @@ -18,28 +18,26 @@ Syntax highlighting is a feature that displays source code, in different colors To modify styling and highlight colors edit `/_sass/_syntax.scss`. -{% highlight css %} +```css #container { float: left; margin: 0 -240px 0 0; width: 100%; } -{% endhighlight %} +``` -{% highlight html %} -{% raw %} -{% endraw %} +``` -{% highlight ruby %} +```ruby module Jekyll class TagIndex < Page def initialize(site, base, dir, tag) @@ -57,21 +55,19 @@ module Jekyll end end end -{% endhighlight %} +``` ### Standard Code Block - {% raw %} - {% endraw %} ### Fenced Code Blocks diff --git a/_posts/2013-10-26-background-image.md b/_posts/2013-10-26-background-image.md index 5992f9d5e0..95d3c17d57 100644 --- a/_posts/2013-10-26-background-image.md +++ b/_posts/2013-10-26-background-image.md @@ -9,10 +9,10 @@ image: Here be a sample post with a custom background image. To utilize this "feature" just add the following YAML to a post's front matter. -{% highlight yaml %} +```yaml image: background: filename.png -{% endhighlight %} +``` This little bit of YAML makes the assumption that your background image asset is in the `/images` folder. If you place it somewhere else or are hotlinking from the web, just include the full http(s):// URL. Either way you should have a background image that is tiled. diff --git a/_templates/archive b/_templates/archive deleted file mode 100644 index 8b48d35609..0000000000 --- a/_templates/archive +++ /dev/null @@ -1,6 +0,0 @@ ---- -layout: post-index -title: {{ title }} -permalink: -description: ---- \ No newline at end of file diff --git a/_templates/page b/_templates/page deleted file mode 100644 index 09652ad655..0000000000 --- a/_templates/page +++ /dev/null @@ -1,12 +0,0 @@ ---- -layout: {{ layout }} -title: {{ title }} -date: {{ date }} -modified: -description: -image: - feature: - credit: - creditlink: -share: ---- diff --git a/_templates/post b/_templates/post deleted file mode 100644 index 7b7427baec..0000000000 --- a/_templates/post +++ /dev/null @@ -1,14 +0,0 @@ ---- -layout: {{ layout }} -title: {{ title }} -modified: -categories: {{ dir }} -description: -tags: [] -image: - feature: - credit: - creditlink: -comments: -share: ---- \ No newline at end of file diff --git a/feed.xml b/feed.xml deleted file mode 100644 index 905ec7c59d..0000000000 --- a/feed.xml +++ /dev/null @@ -1,38 +0,0 @@ ---- -layout: null ---- - - -{{ site.title }} -Jekyll - - -{{ site.time | date_to_xmlschema }} -{{ site.url }}/ - - {{ site.owner.name }} - {{ site.url }}/ - {% if site.owner.email %}{{ site.owner.email }}{% endif %} - -{% for post in site.posts limit:20 %} - - - <![CDATA[{{ post.title | cdata_escape }}]]> - - {{ site.url }}{{ post.id }} - {% if post.modified %}{{ post.modified | to_xmlschema }}T00:00:00-00:00 - {{ post.date | date_to_xmlschema }} - {% else %}{{ post.date | date_to_xmlschema }} - {{ post.date | date_to_xmlschema }}{% endif %} - - {{ site.owner.name }} - {{ site.url }} - {{ site.owner.email }} - - - {{ post.content | xml_escape }} - {% include feed-footer.html %} - - -{% endfor %} - diff --git a/theme-setup/index.md b/theme-setup/index.md index c54611940c..43cb696b8c 100644 --- a/theme-setup/index.md +++ b/theme-setup/index.md @@ -7,6 +7,7 @@ image: credit: dargadgetz creditlink: http://www.dargadgetz.com/ios-7-abstract-wallpaper-pack-for-iphone-5-and-ipod-touch-retina/ share: true +modified: 2016-06-01T15:14:43-04:00 --- General notes and suggestions for customizing **HPSTR**. @@ -45,17 +46,17 @@ The preferred method for running Jekyll is with `bundle exec`, but if you're wil > >However, this is unreliable and is the source of considerable pain. Even if it looks like it works, it may not work in the future or on another machine. -{% highlight text %} +```bash bundle exec jekyll build bundle exec jekyll serve -{% endhighlight %} +``` --- ## Folder Structure -{% highlight bash %} +```bash hpstr-jekyll-theme/ ├── _includes | ├── browser-upgrade.html # prompt to upgrade browser on < IE8 @@ -82,7 +83,7 @@ hpstr-jekyll-theme/ ├── posts/ # all posts ├── tags/ # all posts grouped by tag └── index.html # home page with pagination -{% endhighlight %} +``` --- @@ -94,17 +95,17 @@ Most of the variables found here are used in the .html files found in `_includes Create a [Disqus](http://disqus.com) account and change `disqus_shortname` in `_config.yml` to the Disqus *shortname* you just setup. By default comments appear on all post and pages if you assigned a shortname. To disable commenting on a post or page, add the following to its YAML Front Matter: -{% highlight yaml %} +```yaml comments: false -{% endhighlight %} +``` ### Social Share Links To disable Facebook, Twitter, and Google+ share links on a post or page, add the following to its front matter: -{% highlight yaml %} +```yaml share: false -{% endhighlight %} +``` ### Owner/Author Information @@ -118,45 +119,21 @@ Your Google Analytics ID goes here along with meta tags for [Google Webmaster To To add additional links in the drop down menu edit `_data/navigation.yml`. Use the following format to set the URL and title for as many links as you'd like. *External links will open in a new window.* -{% highlight yaml %} +```yaml - title: Portfolio url: /portfolio/ - title: Made Mistakes url: http://mademistakes.com -{% endhighlight %} +``` --- -## Adding New Content with Octopress +## Adding New Content -While completely optional, I've included Octopress and some starter templates to automate the creation of new posts and pages. To take advantage of it start by installing the [Octopress](https://github.com/octopress/octopress) gem if it isn't already. +Posts are stored in the `_posts` directory and named according to the `YEAR-MONTH-DAY-title.MARKUP` format as per [the usual](https://jekyllrb.com/docs/posts/). -{% highlight bash %} -$ gem install octopress -{% endhighlight %} - -### New Post - -Default command - -{% highlight bash %} -$ octopress new post "Post Title" -{% endhighlight %} - -Default works great if you want all your posts in one directory, but if you're like me and want to group them into subfolders like `/posts`, `/portfolio`, etc. Then this is the command for you. By specifying the DIR it will create a new post in that folder and populate the `categories:` YAML with the same value. - -{% highlight bash %} -$ octopress new post "New Portfolio Post Title" --dir portfolio -{% endhighlight %} - -### New Page - -To create a new page use the following command. - -{% highlight bash %} -$ octopress new page new-page/ -{% endhighlight %} +To streamline the creation of posts and pages, [Jekyll::Compose](https://github.com/jekyll/jekyll-compose) and [Octopress](https://github.com/octopress/octopress) are great plugins you can install to automate this process. --- @@ -174,27 +151,27 @@ A good rule of thumb is to keep feature images nice and wide so you don't push t The two layouts make the assumption that the feature images live in the *images* folder. To add a feature image to a post or page just include the filename in the front matter like so. -{% highlight yaml %} +```yaml image: feature: feature-image-filename.jpg thumb: thumbnail-image.jpg #keep it square 200x200 px is good -{% endhighlight %} +``` If you want to apply attribution to a feature image use the following YAML front matter on posts or pages. Image credits appear directly below the feature image with a link back to the original source. -{% highlight yaml %} +```yaml image: feature: feature-image-filename.jpg credit: Michael Rose #name of the person or site you want to credit creditlink: http://mademistakes.com #url to their site or licensing -{% endhighlight %} +``` By default the `
` containing feature images is set to have a minimum height of 400px with CSS. Anything taller is hidden with an `overflow: hidden` declaration. You can customize the height of the homepage feature image and those appearing on posts/pages by modifying the following variables in `/_sass/_variables.scss`. -{% highlight sass %} +```scss $feature-image-height: 400px; // min 150px recommended $front-page-feature-image-height: 400px; // min 150px recommended -{% endhighlight %} +``` #### Post/Page Thumbnails for OG and Twitter Cards @@ -208,12 +185,6 @@ Here's an example of what a tweet to your site could look like if you activate T Video embeds are responsive and scale with the width of the main content block with the help of [FitVids](http://fitvidsjs.com/). -Not sure if this only effects Kramdown or if it's an issue with Markdown in general. But adding YouTube video embeds causes errors when building your Jekyll site. To fix add a space between the ` -{% endhighlight %} - ### Twitter Cards Twitter cards make it possible to attach images and post summaries to Tweets that link to your content. Summary Card meta tags have been added to `head.html` to support this, you just need to [validate and apply your domain](https://dev.twitter.com/docs/cards) to turn it on. @@ -232,9 +203,9 @@ For example if you wanted a red background instead of white you'd change `$bodyc To modify the site's JavaScript files I setup a Grunt build script to lint/concatenate/minify all scripts into `scripts.min.js`. [Install Node.js](http://nodejs.org/), then [install Grunt](http://gruntjs.com/getting-started), and then finally install the dependencies for the theme contained in `package.json`: -{% highlight bash %} +```bash npm install -{% endhighlight %} +``` From the theme's root, use `grunt` to concatenate JavaScript files and optimize `.jpg`, `.png` and `.svg` files in the `images/` folder.