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
With loadSidebar enabled, in docs/_sidebar.md, we have:
- Getting started
- [Quick start](/quickstart)
- [Writing more pages](/more-pages)
- [Custom navbar](/custom-navbar)
- [Cover page](/cover)
...
The first line of /quickstart is # Quick start, and the first line of /custom-navbar is # Custom navbar, etc.
It would be great if we do not have to manually write these lines, since they can be inferred from the sidebar.
It has 3 advantages at least:
Save a line in each subpage, of course.
Whenever we want to change the header for a subpage, we only need to modify it in the sidebar, not both places. And the inconsistency can be avoided naturally.
For example, at the moment, docsify has Writing more pages for /more-pages in the sidebar, while the first line of /more-pages.md is More pages. Such inconsistency may not be desireable.
Be consistent with the behavior of Github Wiki.
In Github Wiki, a page named Changelog, which is actually a file Changelog.md, will have the header 'Changelog' automatically. We do not have to add a line # Changelog in the content. See here for an example.
If this feature is implemented, we will be able to directly use Github Wiki for docsify. For example, the md file for the link above is 'https://raw.githubusercontent.com/wiki/liulex/Snipaste-Feedback/Changelog.md'. We can alias /Changelog to it. Then we can have a Github Wiki (for community edit) and a doscify generated site at the same time!
In case I haven't made myself clear, the logic of this feature (maybe named autoHeader) is:
If loadSidebar and autoHeader are both enabled, for each link in _sidebar.md, prepend a header to the page before converting it to html.
For example, if [Quick start](/quickstart) is in _sidebar.md, we prepend a line # Quick start into /quickstart.md before we render /quickstart.md into html.
The text was updated successfully, but these errors were encountered:
And since the file names of Github Wiki are case-sensitive, I would still need to write some aliases after I set basePath. So I am satisfied the current configs. 😄
Take
docisfy
as an example:With
loadSidebar
enabled, indocs/_sidebar.md
, we have:The first line of
/quickstart
is# Quick start
, and the first line of/custom-navbar
is# Custom navbar
, etc.It would be great if we do not have to manually write these lines, since they can be inferred from the sidebar.
It has 3 advantages at least:
Writing more pages
for/more-pages
in the sidebar, while the first line of/more-pages.md
isMore pages
. Such inconsistency may not be desireable.Changelog
, which is actually a fileChangelog.md
, will have the header 'Changelog' automatically. We do not have to add a line# Changelog
in the content. See here for an example./Changelog
to it. Then we can have a Github Wiki (for community edit) and a doscify generated site at the same time!In case I haven't made myself clear, the logic of this feature (maybe named
autoHeader
) is:If
loadSidebar
andautoHeader
are both enabled, for each link in_sidebar.md
, prepend a header to the page before converting it to html.For example, if
[Quick start](/quickstart)
is in_sidebar.md
, we prepend a line# Quick start
into/quickstart.md
before we render/quickstart.md
into html.The text was updated successfully, but these errors were encountered: