Skip to content
This repository has been archived by the owner on Apr 27, 2024. It is now read-only.

Commit

Permalink
Add subtitles support
Browse files Browse the repository at this point in the history
Fixes #3
  • Loading branch information
seanh committed Feb 17, 2020
1 parent 609baf3 commit 0c78480
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 17 deletions.
5 changes: 4 additions & 1 deletion _includes/page_header.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
{% if meta != "" %}
<p class="meta">{{ meta }}</p>
{% endif %}
<h1 class="page-header__title">{{ page.title }}</h1>
<h1>{{ page.title }}</h1>
{% if page.subtitle %}
<p class="lead">{{ page.subtitle }}</p>
{% endif %}
</header>
10 changes: 0 additions & 10 deletions _posts/2019-09-09-lead-paragraphs.md

This file was deleted.

32 changes: 32 additions & 0 deletions _posts/2019-09-09-subtitles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
subtitle: Posts can have subtitles, which appear in large text beneath the title. "Lead" paragraphs also use the same large text style.
---

Subtitles and Lead Paragraphs
=============================

To give a post a subtitle by add a `subtitle` to its [YAML front matter](https://jekyllrb.com/docs/front-matter/):

```yaml
---
title: Subtitles and Lead Paragraphs
subtitle: Posts can have subtitles, which appear in large text beneath the title.
---
```

Subtitles appear beneath the title at the top of the page, in large text.

You can also use this large text style anywhere in a page by creating a
paragraph with the CSS class `lead`. For example this:

```html
<p class="lead">This is a "lead" paragraph. It stands out more than other
paragraphs. These can go anywhere on the page, not just at the top of
posts.</p>
```

Will render like this:

<p class="lead">This is a "lead" paragraph. It stands out more than other
paragraphs. These can go anywhere on the page, not just at the top of
posts.</p>
5 changes: 0 additions & 5 deletions _sass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ body {

.page-header {
padding-top: 50px;
padding-bottom: 45px;
}

.inner-container {
Expand All @@ -99,10 +98,6 @@ body {
margin-right: auto;
}

.page-header__title {
margin-bottom: 0;
}

.content .posts-list {
list-style-type: none;
}
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ and lots of typographical extras like
[footnotes](_posts/2019-08-06-footnotes.md),
[emoji](_posts/2019-08-11-emoji.md),
[alerts](_posts/2019-09-09-alert-boxes.md),
[lead paragraphs](_posts/2019-09-09-lead-paragraphs.md),
[subtitles](_posts/2019-09-09-subtitles.md),
[badges](_posts/2019-09-13-badges-and-pills.md)
and more.

Expand Down

0 comments on commit 0c78480

Please sign in to comment.