Setting an info box under the title based on meta information provided #5789
-
I am trying to configure something for an internal site where we provide the below on a file ---
title: Page name
jira: abc-123
---
# Page name
## Header 2
Content And on the page it will render an Admonitions (Which I will make in HTML) below the title of the page. So far for testing I have the below which renders it above the title {% extends "base.html" %}
{% block content %}
<h1> test</h1>
<!-- Add scripts that need to run before here -->
{{ page.content }}
<!-- Add scripts that need to run afterwards here -->
{% endblock %}
No matter what I try I cant seem to get this working in the right location. I've set something similar up before where it notifies you if the page has expired, but it too struggles from the same issue Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@squidfunk Sorry to be really annoying and tag you here, but do you have any idea on how I can achieve this? I want it to look like the below I've tried following the documentation and using chatGPT but had no luck. I can work out the HTML etc to put there, just need to know how to target the space between the title and the start of the document |
Beta Was this translation helpful? Give feedback.
You would have to omit using
h1
titles in your documents, because then you can put your code / custom logic here. If the title is included in the Markdown file, there's no way to achieve this using templates, because theh1
is part of the content.