Skip to content

[FEATURE] Running the macro from templates #43

@rafalschmidt97

Description

@rafalschmidt97

Describe the solution you'd like
A clear and concise description of what you want to happen.

Hi, is it possible to run {{ blog_content }} macro from .html instead of .md?

Imagine instead of doing:

home.md

---
template: home.html <-- my custom
title: Blog
---

Hello folks!

{{ blog_content }}

with

home.html

{% extends "main.html" %}
<!-- Content -->
{% block content %}
  {{ page.content }} 
   here will be my custom logic
{% endblock content %}

I would like to move {{ blog_content }} outside of home.md:

home.md

---
template: home.html <-- my custom
title: Blog
---

Hello folks!

with

home.html

{% extends "main.html" %}
<!-- Content -->
{% block content %}
  {{ page.content }} 
   here will be my custom logic
   {{ blog_content }}
{% endblock content %}

I couldn't manage to include the plugin templates (not found):

{% extends "blog.html" %}
{% include "plugins/mkdocs-blogging-plugin/templates/blog.html" %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions