diff --git a/README.md b/README.md index 56a080be8b..f671efd554 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Minima has been scaffolded by the `jekyll new-theme` command and therefore has a Refers to files within the `_layouts` directory, that define the markup for your theme. - `default.html` — The base layout that lays the foundation for subsequent layouts. The derived layouts inject their contents into this file at the line that says ` {{ content }} ` and are linked to this file via [FrontMatter](https://jekyllrb.com/docs/frontmatter/) declaration `layout: default`. - - `home.html` — The layout for your landing-page / home-page / index-page. + - `home.html` — The layout for your landing-page / home-page / index-page. [[More Info.](#home-layout)] - `page.html` — The layout for your documents that contain FrontMatter, but are not posts. - `post.html` — The layout for your posts. @@ -71,6 +71,25 @@ Minima comes with [`jekyll-seo-tag`](https://github.com/jekyll/jekyll-seo-tag) p ## Usage +### Home Layout + +`home.html` is a flexible HTML layout for the site's landing-page / home-page / index-page.
+ +#### Main Heading and Content-injection + +From Minima v2.2 onwards, the *home* layout will inject all content from your `index.md` / `index.html` **before** the **`Posts`** heading. This will allow you to include non-posts related content to be published on the landing page under a dedicated heading. *We recommended that you title this section with a Heading2 (`##`)*. + +Usually the `site.title` itself would suffice as the implicit 'main-title' for a landing-page. But, if your landing-page would like a heading to be explicitly displayed, then simply define a `title` variable in the document's front matter and it will be rendered with an `

` tag. + +#### Post Listing + +This section is optional from Minima v2.2 onwards.
+It will be automatically included only when your site contains one or more valid posts or drafts (if the site is configured to `show_drafts`). + +The title for this section is `Posts` by default and rendered with an `

` tag. You can customize this heading by defining a `list_title` variable in the document's front matter. + +-- + ### Customization To override the default structure and style of minima, simply create the concerned directory at the root of your site, copy the file you wish to customize to that directory, and then edit the file. diff --git a/_layouts/home.html b/_layouts/home.html index 0d9064bc8a..971bda9cb4 100644 --- a/_layouts/home.html +++ b/_layouts/home.html @@ -3,24 +3,28 @@ ---
+ {% if page.title %} +

{{ page.title }}

+ {% endif %} {{ content }} -

Posts

- - -

subscribe via RSS

+

subscribe via RSS

+ {% endif %}
diff --git a/_sass/minima/_layout.scss b/_sass/minima/_layout.scss index 121042b5c4..c20e2022d0 100644 --- a/_sass/minima/_layout.scss +++ b/_sass/minima/_layout.scss @@ -180,7 +180,11 @@ } .page-heading { - @include relative-font-size(1.25); + @include relative-font-size(2); +} + +.post-list-heading { + @include relative-font-size(1.75); } .post-list {