I have a simple question since I’m still very new to this Grav. Simply put I want to put a home page of the Learn2 theme to have a landing on it first.
How hard is it to do one, either using another theme with landing (Woo) or making one by myself?
I have a simple question since I’m still very new to this Grav. Simply put I want to put a home page of the Learn2 theme to have a landing on it first.
How hard is it to do one, either using another theme with landing (Woo) or making one by myself?
Hi, each theme can choose to implement various “page templates”. Learn2 implements mainly chapter and docs, because it’s a documentation theme.
You need to add a “default” page template, by adding a default.html.twig
file with this content:
{% extends 'partials/base.html.twig' %}
{% block content %}
{{ page.content }}
{% endblock %}
Then you can create a page with the default
page template, and you can set that page to be the home page.
BTW the learn2 theme is structured to always show the sidebar, so if you want to hide it on the home, you might need to modify the theme accordingly, perhaps editing its templates/partials/base.html.twig
file and add a {% if page.template != 'default' %},{% endif %}
around the sidebar inclusion line
Hey, thanks for the reply! I will try out this when I can. I will post here if I need more help with this.