fralau / mkdocs-macros-plugin

Create richer and more beautiful pages in MkDocs, by using variables and calls to macros in the markdown code.
https://mkdocs-macros-plugin.readthedocs.io
Other
321 stars 50 forks source link

access theme template html from macro #121

Closed alanlivio closed 2 years ago

alanlivio commented 2 years ago

Hi. The mkdocs-macros works great when using templates inside the docs folders. But I use mkdcos-material and want to include some templates from it inside my index.md. More precisely, I want to use the social.html template. So, inside my index.md I used

{% include "partials/social.html" %}

But I receive the following error:

get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: partials/social.html

How to proceed? Best regards.

github-actions[bot] commented 2 years ago

Welcome to this project and thank you!' first issue

alanlivio commented 2 years ago

@fralau, may you help me with this one? Thank you since now.

fralau commented 2 years ago

Hi @alanlivio, mkdocs-macros is meant to automate some tasks related to the production of markdown code. It has no influence on mkdocs templates used for themes (HTML).

If you want to do something with the theme template, I suggest that you first apply the standard solutions recommended by the mkdocs team or by the author of the theme.

You might have to post your query on the appropriate location (presumably mkdocs-material).

alanlivio commented 2 years ago

Thanks @fralau. Done at here.