Skip to content
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

support the the ":include" helper, or similar, for _sidebar and _navbar. #1978

Open
trusktr opened this issue Jan 26, 2023 · 1 comment
Open

Comments

@trusktr
Copy link
Member

trusktr commented Jan 26, 2023

Feature request

What problem does this feature solve?

To include an external page, one must create a new markdown file with the [include](//foo.com/foo ':include') inside of it, then they can link to the local file from the sidebar. That's a lot of work.

What does the proposed API look like?

An update would allow us to include directly from sidebar or navbar, like so:

<!-- _sidebar.md -->

- Menu:
  - [Page from outside](https://outside.com/foo.md ":include")

This would cause the sidebar link to load the content from the outside location, and we don't need to make a wrapper file.

How should this be implemented in your opinion?

Need to update the sidebar and navbar compilers to support features like main compiler. The code is already duplicated twice between client renderer and server renderer, and we don't want more duplicates, so we would need to consolidate code and re-use it well.

Are you willing to work on this yourself?

@Koooooo-7
Copy link
Member

Personally, I think this config is not a common requirement for us.
The sidebar is made for the whole site in one place, I can not image why user need re-user/separate it from sidebar.md and create a for-sidebar.md to siderbar.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants