Skip to content

Layout inheritance doesn't work correcty #53

Open

Description

@ipuris

In post.html and page.html, the class is set to 'post-template' and 'page-template', respectively. But in the output html of article (post) and page, the <body> tag doesn't contain post-template or page-template, but contains home-template.

It looks like the inheritance of Jekyll doesn't work correctly, because Jasper theme code seems to be correct.
For example, post.html contains class: 'post-template',

---
layout: default
disqus: false
class: 'post-template'
---

and any specific markdown post file (e.g., 1963-08-28-i-have-a-dream.md) doesn't override any class.

---
layout: post
cover: 'assets/images/cover4.jpg'
navigation: True
title: I Have a Dream
date: 1963-08-28 10:18:00
tags: speeches
subclass: 'post tag-speeches'
logo: 'assets/images/ghost.png'
author: martin
categories: martin
---

I'm not familiar with Ruby and not fully sure this is the problem of Jasper theme or Jekyll core.

Temporarily I can use the post-template and page-template using class tag directly in the post markdown files like below, but I think it is not the fundamental solution.

---
layout: post
cover: 'assets/images/cover4.jpg'
navigation: True
title: I Have a Dream
date: 1963-08-28 10:18:00
tags: speeches
class: 'post-template'
subclass: 'post tag-speeches'
logo: 'assets/images/ghost.png'
author: martin
categories: martin
---

Please give me an advice.

Activity

  1. changed the title [-]Layout inheritance doesn't work correc[/-] [+]Layout inheritance doesn't work correcty[/+] on Jan 13, 2019
  2. haakoo commented on Sep 21, 2019

    @haakoo

    I just noticed this today too. And it's messing up the padding for the header (/meta data).

    I've been looking at he code, and it's not obvious for my C# head why it's not working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions