Skip to content

Loosen restrictions on symbolic links #39

Closed

Description

@lazka

Context

I'm trying to migrate from mkdocs to zensical. Looks very nice so far!

Bug description

I have in my nav this:

nav:
   - components/supporting-software/blob-library/README.md

where "blob-library" is a symlink to another directory which contains the README.md

This results in the entry showing up with the name "none" in the sidebar, and clicking on it results in a 404. Both with "serve" and "build".

With mkdocs this just worked.

Related links

Reproduction

https://github.com/digital-blueprint/handbook/tree/main

Steps to reproduce

uv add zensical
uv run zensical serve

Browser

No response

Before submitting

Activity

  1. added
    needs investigation
    on Nov 10, 2025
  2. lazka commented on Nov 10, 2025

    @lazka
    Author

    If wanted I can provide a more minimal repro repo.

  3. squidfunk commented on Nov 10, 2025

    @squidfunk
    Member

    Yes please, that would be great. I think what you refer to is that a symlink points outside of the docs directory. This is actually by-design, since we do not allow symlinks to sources that are not directly managed by Zensical right now. However, the symlink probably points to another file in your project's directory, so we might think about allowing that in a future release.

  4. added
    needs input
    and removed
    needs investigation
    on Nov 10, 2025
  5. Valerie-ts commented on Nov 10, 2025

    @Valerie-ts

    Hi,
    I'd also really appreciate symlink support for the whole project directory in the future. Because:
    We are currently still using MkDocs Mateial with the projects plugin to build multiple projects inside our repository. These projects sometimes use the same images, so we've been using symlinks to make our shared image folder (located in the root directory) available inside each project - so that we don't have to maintain multiple versions of the same images :)

  6. lazka commented on Nov 10, 2025

    @lazka
    Author

    Yeah, it's linking to a directory outside of the docs dir. I have multiple repos included as git submodules and link their docs directories together to get a unified build for all of them. I could move the submodules inside, but the problem there was that it would detect all those unrelated .md files, at least with mkdocs. I'll retest this.

  7. lazka commented on Nov 11, 2025

    @lazka
    Author

    Here is an example with all variations I could think of: https://github.com/lazka/zensical-test

    I noticed that symlinks to internal directories work (symlinks to files don't), so I might give that a try. As long as there is a way to exclude unrelated files I can work with that.

    It would also be nice if it would warn or fail if a file can not be included due to this.

  8. squidfunk commented on Nov 11, 2025

    @squidfunk
    Member

    Thanks for providing the example. I think we will lift the symbolic link requirement in that you will be able to create symlinks to files within the folder that the configuration filer resides. This might take some time, since we need to refactor the respective functionality, so please don't expect a fix this week. Issues like this one are the reason we released rather early – to better learn about specific requirements in order to not paint ourselves into a corner ☺️

    I noticed that symlinks to internal directories work (symlinks to files don't), so I might give that a try. As long as there is a way to exclude unrelated files I can work with that.

    Could you specify? Symlinks outside of the docs dir should not work. Symlinks within the docs dir to files or directories should work.

    It would also be nice if it would warn or fail if a file can not be included due to this.

    Agreed.

  9. changed the title [-]Symlinks don't work as with mkdocs[/-] [+]Loosen restrictions on symbolic links[/+] on Nov 11, 2025
  10. lazka commented on Nov 11, 2025

    @lazka
    Author

    Could you specify? Symlinks outside of the docs dir should not work. Symlinks within the docs dir to files or directories should work.

    In the example there is a link-internal-file.md -> ./internal/internal.md and going to link-internal-file.md results in a 404. Unless I'm missing something.

  11. added
    change request
    and removed
    needs input
    on Nov 11, 2025
  12. squidfunk commented on Nov 19, 2025

    @squidfunk
    Member

    Thank you for raising this change request. We've evaluated it carefully, and accepted it into our public backlog as a new backlog item for further consideration. We also prioritized your change request and assessed its impact on the ecosystem. Please understand, that we cannot give exact dates or an ETA for when the functionality you requested will be available.

    How you can follow up

    • Subscribe to the backlog item to receive updates – we lock all backlog items to reduce the noise through notifications to an absolute minimum. If you subscribe to the backlog item, you're immediately notified when its status changes.

    • Watch the public backlog repository to receive updates when we add new items – if you want to be notified when we make changes to the backlog, you can of course subscribe to the repository to get notified on all status changes.

    How we work

    If you're interested in the role of the backlog in our development process, please refer to our documentation on how we work. In this guide, we answer the most frequently asked questions, including:

    • How we select change requests for implementation
    • How your change request will be implemented
    • How we work with the community
  13. lazka commented on Mar 26, 2026

    @lazka
    Author

    I've worked this around now by moving the submodules (using "git mv") into my doc root, adjusting the symlinks to them, and adding the submodules to exclude_docs in the mkdocs config. Since zensical is happy to follow internal symlinks that makes everything work as before.

    I'm happy with that.

  14. squidfunk commented on Mar 27, 2026

    @squidfunk
    Member

    @lazka thanks for the update and sharing your workaround. We're still planning work on loosening restrictions in the future.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    change request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions