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

Adds page configuration for description #690

Merged
merged 2 commits into from
Aug 8, 2020
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ nav-short | By default, the navigation bar gets shorter after scrolling down t
gh-repo   | If you want to show GitHub buttons at the top of a post, this sets the GitHub repo name (eg. `daattali/beautiful-jekyll`). You must also use the `gh-badge` parameter to specify what buttons to show.
gh-badge | Select which GitHub buttons to display. Available options are: [star, watch, fork, follow]. You must also use the `gh-repo` parameter to specify the GitHub repo.
layout | What type of page this is (default is `post` for blog posts and `page` for other pages). See _Page types_ section below for more information.
description | A longer description of page or blog post that is used for your meta description content.

## Advanced parameters

Expand Down
8 changes: 5 additions & 3 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<title>{% if page.use-site-title %}{{ site.title }} {{ site.title-separator | default: '-' }} {{ site.description }}{% elsif page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>

{% if site.author %}
<meta name="author" content="{{ site.author }}">
{% endif %}

{% if page.subtitle %}

{% if page.description %}
<meta name="description" content="{{ page.description }}">
{% elsif page.subtitle %}
<meta name="description" content="{{ page.subtitle }}">
{% endif %}

Expand Down