sitemap to handle dynamic urls #2103
amitu
started this conversation in
Ideas & RFCs
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Background
Sitemap feature is for site owners to organise the site, especially so the header can show appropriate navigation links as selected.
Basically there is a global toc tree that you can access using the
sitemap
processor:As you can see in the returned JSON:
Notice the
is-active
flag, this is set based on current page, our processor looks for the current URL in the entire sub tree, and the entire subtree corresponding to current URL is markedis-active: true
, which can be used by the site-header to highlight things.Apps And Dynamic URLs
Now that we have fastn app feature, some apps support dynamic URLs. Actually even without app, our dynamic urls feature we can have dynamic URLs, which can not be listed in our static sitemap file.
So we want to allow dynamic URLs in sitemap entries:
Or the future planned "unified url-mappings feature":
In both above example we see
foo
as the "id" given to the dynamic URL pattern.We can then refer to this
foo
the way we mentioned in the Linking usingid
syntax:Beta Was this translation helpful? Give feedback.
All reactions