Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Jekyll 4, add docs for Front Matter layout defaults #11

Merged
merged 8 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
source "https://rubygems.org"

gem "webrick", "~> 1.7"
gem "just-the-hm-docs", ">= 1.0.1.rc1"
gem "jekyll", "~> 4.3.2"
gem "webrick", "~> 1.8"
gem "just-the-hm-docs", github: "humanmade/just-the-hm-docs"
10 changes: 4 additions & 6 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'jekyll serve'. If you change this file, please restart the server process.
# "jekyll serve". If you change this file, please restart the server process.

# Site settings
# These are used to personalize your new site. If you look in the HTML files,
Expand All @@ -17,8 +17,8 @@ title: Just the HM Docs
tagline: A Jekyll template for documenting Human Made open source projects
description: A modern, highly customizable, responsive Jekyll template for documentation
author: Human Made
baseurl: '/just-the-hm-docs' # the subpath of your site, e.g. /blog
url: 'https://humanmade.github.io' # the base hostname & protocol for your site, e.g. http://example.com
baseurl: "/just-the-hm-docs" # the subpath of your site, e.g. /blog
url: "https://humanmade.github.io" # the base hostname & protocol for your site, e.g. http://example.com

# Set a path/url to a logo that will be displayed instead of the title
logo: "/assets/icons/hm-logo.svg"
Expand Down Expand Up @@ -99,10 +99,8 @@ heading_anchors: true

# Aux links for the upper right navigation
aux_links:
Human Made:
- 'https://humanmade.com'
Just the HM Docs on GitHub:
- 'https://github.com/humanmade/just-the-hm-docs'
- "https://github.com/humanmade/just-the-hm-docs"

# Makes Aux links open in a new tab. Default is false
aux_links_new_tab: false
Expand Down
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ nav_order: 99

# Changelog

## v1.0.2

- Update Jekyll version to 4.3.2
- Update Webrick to 1.8
- Add docs for setting Front Matter layout defaults
- Use GitHub hosted theme

## v1.0.1

- Fix Sass compiling bug
Expand Down
13 changes: 13 additions & 0 deletions docs/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,16 @@ layout: default
```

{% endraw %}

### Defining a default layout

To properly load a layout template with all of its includes and styles, you must define which layout you wish to use. Just the HM Docs does this by defining the layout in page front matter, as shown above. If you wish to set a default layout and not explicitly state the layout in each template, you must add the following Front Matter defaults to your `_config.yml` file:

```
defaults:
-
scope:
path: "" # an empty string here means all files in the project
values:
layout: "default"
```
4 changes: 2 additions & 2 deletions just-the-hm-docs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Gem::Specification.new do |spec|
spec.name = "just-the-hm-docs"
spec.version = "1.0.1.rc1"
spec.version = "1.0.2.rc1"
spec.authors = ["Human Made"]
spec.email = ["[email protected]"]

Expand All @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
spec.executables << 'just-the-hm-docs'

spec.add_development_dependency "bundler", "~> 2.3.5"
spec.add_runtime_dependency "jekyll", ">= 3.8.5"
spec.add_runtime_dependency "jekyll", ">= 4.3.2"
spec.add_runtime_dependency "jekyll-seo-tag", ">= 2.0"
spec.add_runtime_dependency "rake", ">= 12.3.1"
end