For example on the tips and tricks page there's a section that shows how to create a button, which states:
def define_env(env):
# import the predefined macro
fix_url = env.variables.fix_url # make relative urls point to root
@env.macro
def button(label, url):
"Add a button"
url = fix_url(url)
HTML = """<a class='button' href="%s">%s</a>"""
return HTML % (url, label)
the env.variables.fix_url will need to be changed to env.macros.fix_url.
I wanted to create a pull request for this using the edit button of the website, but the url returns a 404.
Clicking on the pencil sends me to https://github.com/fralau/mkdocs_macros_plugin/edit/master/docs/tips.md while the actual page is at https://github.com/fralau/mkdocs_macros_plugin/edit/master/webdoc/docs/tips.md.
I believe adding edit_uri: edit/master/webdoc/docs/ to the mkdocs.yml file will fix this issue.
Hello,
I think #87 will require a documentation fix.
For example on the tips and tricks page there's a section that shows how to create a button, which states:
the
env.variables.fix_url
will need to be changed toenv.macros.fix_url
.I wanted to create a pull request for this using the edit button of the website, but the url returns a 404. Clicking on the pencil sends me to
https://github.com/fralau/mkdocs_macros_plugin/edit/master/docs/tips.md
while the actual page is athttps://github.com/fralau/mkdocs_macros_plugin/edit/master/webdoc/docs/tips.md
.I believe adding
edit_uri: edit/master/webdoc/docs/
to themkdocs.yml
file will fix this issue.