-
Notifications
You must be signed in to change notification settings - Fork 119
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
docs: adapt built in acetate helper to fix sticky links #334
Conversation
@jgravois you could also just not use the link helper rather than replicating it and changing it inside your project. This seems to work pretty well:
|
@@ -211,4 +236,84 @@ module.exports = function(acetate) { | |||
: []; | |||
return `npm install ${package.name} ${peers.join(" ")}`; | |||
}); | |||
|
|||
acetate.helper( | |||
"link", |
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.
@jgravois this should already be built into Acetate. http://acetate.io/documentation/built-in-helpers/ > Link Helper. Is something wrong with that version? The follwoing should just work in templates {% link '/guide/', 'Guide' %}
thanks @paulcpederson. doing that for each of the individual 'link`s in the API reference sidebar probably is a better option than hacking on the built in helper. @patrickarlt i wouldn't say there's anything wrong with what is built into
this was the best idea we could come up with to host the doc at https://esri.github.io/arcgis-rest-js/. there's likely a way to configure the raw source to achieve both lofty goals simultaneously, but the exact path eludes me. |
figured it out in #341 |
ISSUES CLOSED: #284
🎩 tip to @paulcpederson for pointing out that its actually a helper built right into acetate that helps us set the
is-active
class automatically when a page loads.it feels like a wretched hack to me to copy/paste the entire helper (and its dependencies) into this library, but i couldn't think of a more clever way to extend the logic in the comparisons.
@paulcpederson also mentioned that we might should be using
{{ relativePath }}
in this website to make our lives easier, but i couldn't get that option to behave either.