You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% include 'contribute.html' with {'relative_path': current_page.url | split(base_url) | last } %}
Then in contribute.html, I have this:
<p>
This website is <a href="https://github.com/botwiki/botwiki.org">open source</a>. <a href="https://github.com/botwiki/botwiki.org/tree/master/content{{relative_path}}.md">Click here</a> to edit this page.
</p>
This obviously doesn't work, since some files are index.md and some are, for example, holidaybot4000.md.
Also, I believe that from the snippet above it should also be clear what I'm trying to do.
The only solution I can think of is something like a custom Twig function, but I can't really see how to add one.
Hi,
I was wondering if there was a way to get the filename of a "blog post" ?
In fact, I'd like to get the page.url and to remove the filename from it to make a link to the upper level.
Let's says I have a blog post here : http://example.com/tuto/test
I'd like to get the link: http://example.com/tuto/
Is there a way this using some kind of page.filename or using a Twig filter ?
Thanks in advance.
The text was updated successfully, but these errors were encountered: