-
Notifications
You must be signed in to change notification settings - Fork 25
Add support for sub sections (anchor links) #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ <h3 class="panel-title"> | |
<div class="list-group"> | ||
{% for article in part.articles %} | ||
{% if article.path != readme.file.path %} | ||
<a href="{{ article.path|resolveFile }}" class="list-group-item"> | ||
<a href="{{ article.path|resolveFile }}{{ article.anchor }}" class="list-group-item"> | ||
<i class="fa fa-file-o" aria-hidden="true"></i> {{ article.title }} | ||
</a> | ||
{% endif %} | ||
|
@@ -53,7 +53,7 @@ <h3 class="panel-title">{{ "FAQ_RELATED_ARTICLES"|t }}</h3> | |
{% for related in page.related %} | ||
{% set relatedArticle = getArticleByPath(related) %} | ||
{% if relatedArticle %} | ||
<a href="{{ relatedArticle.path|resolveFile }}" class="list-group-item">{{ relatedArticle.title }}</a> | ||
<a href="{{ relatedArticle.path|resolveFile }}{{ relatedArticle.anchor }}" class="list-group-item">{{ relatedArticle.title }}</a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will find the first article with matching path, and use this article's anchor. But that's not really what we would like here. If we have several articles pointing to the same file, we should expect the So we should do something like Do you have a use-case for this? |
||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. I'll happily merge this