From 67ea9ab7fd9a2a0fa3898186f9e060145311e699 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 29 Jun 2017 09:27:36 +0530 Subject: [PATCH 1/3] Increase flexibility of 'home' layout --- _layouts/home.html | 32 ++++++++++++++++++-------------- _sass/minima/_layout.scss | 6 +++++- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/_layouts/home.html b/_layouts/home.html index 0d9064b..971bda9 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 121042b..c20e202 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 { From 7f44ba75c4140ed9a6ab7737ff1c5ed31729f912 Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Thu, 29 Jun 2017 18:11:07 +0530 Subject: [PATCH 2/3] add documentation for flexible 'home' layout --- README.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 182ee5d..f36ac3a 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. @@ -68,6 +68,25 @@ This directory can include sub-directories to manage assets of similar type, and ## 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. From cfe8460d381b50a6004708fd31fac1603305442a Mon Sep 17 00:00:00 2001 From: Ashwin Maroli Date: Fri, 28 Jul 2017 20:26:18 +0530 Subject: [PATCH 3/3] remove redundant entries in gemspec --- minima.gemspec | 3 --- 1 file changed, 3 deletions(-) diff --git a/minima.gemspec b/minima.gemspec index e9f6f6e..567efbe 100644 --- a/minima.gemspec +++ b/minima.gemspec @@ -16,9 +16,6 @@ Gem::Specification.new do |spec| f.match(%r{^(assets|_(includes|layouts|sass)/|(LICENSE|README)((\.(txt|md|markdown)|$)))}i) end - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } - spec.add_runtime_dependency "jekyll", "~> 3.3" spec.add_development_dependency "bundler", "~> 1.12" end