Gatsby-theme-novela: Display blog post subtitle in the article page

Created on 5 Jan 2020  路  3Comments  路  Source: narative/gatsby-theme-novela

Is your feature request related to a problem? Please describe.
I migrated my blog from Jekyll. All my posts have a title and a subtitle (an excerpt). It would be great to display the subtitle in the Article page optionally.

Describe the solution you'd like
At the moment, I shadowed your Article.Hero component. The subtitle is read from the excerpt attribute and is placed above an author. It's a dirty hack currently. It would be great to turn this as a flag in config or maybe check for an optional attribute in the article MDX.

Here's an image from my site:
proposed-view

And here's a screenshot from Medium, where article subtitle is supported:
medium

I can prepare a PR with the change. However, it would be great if you suggest a way how to integrate best with your theme.

Thanks!

feature-request help wanted

Most helpful comment

I also thought about global theme option. I will take a look into it. Thanks!

All 3 comments

I'm on the fence on this one, but if you'd like to implement it as a config option that could be a possibility. You'll have to pass the except into the article template and check if the user has set the theme config to enable postSubtitles (or whatever you'd like to name the config option.

  • [ ] Add config option to theme
  • [ ] Update article template / title
  • [ ] Add documentation and example of how to implement

My initial thought it to make it a theme option (instead of per post). But that's up to you. For example in your case if all your posts have it it might be annoying to have to add it to every post you create. The excerpt is mandatory in Novela.

I also thought about global theme option. I will take a look into it. Thanks!

No problem! Feel free to ask questions if you decide to give it a shot and run into problems.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dgovil picture dgovil  路  3Comments

jorgeorejas picture jorgeorejas  路  3Comments

slorber picture slorber  路  3Comments

alfieqashwa picture alfieqashwa  路  4Comments

eugenejeonme picture eugenejeonme  路  3Comments