rochacbruno / marmite

Markdown makes sites - A Static Site Generator for Blogs
https://rochacbruno.github.io/marmite/
GNU Affero General Public License v3.0
340 stars 19 forks source link

[feat] hero #87

Closed rochacbruno closed 4 days ago

rochacbruno commented 6 days ago

A hero section is a highlighted section on the page front-page, for blogs it may be useful to highlight author social links and expose a short version of the about/bio.

Example:

Screenshot_20241027_101330

Implementation

marmite.yaml

extra:
  hero: hero.md

Then, when rendering the site, if site.extra.hero is defined, marmite will parse the markdown on hero.md and make it available on global context on site.includes.hero, so in the template

{%if site.includes.hero is defined %}
{{site.includes.hero}}
...