Skip to content

Misleading GitHub Link in navbar and broken edit links #415

Open

Description

@gerbsen

The GitHub link in https://docs.scs.community works well if you are within a page actually managed within this repo. If you are viewing e.g. a standard and want to change it, you are redirected to the wrong repository (docs not standards). Also the „Edit this page” links e.g. on the operators section link to the wrong file: https://github.com/SovereignCloudStack/docs/tree/main/docs/03-container/components/container-registry/docs/quickstart.md.

I've AI-generated a fix for both which works like this:

  1. npm install runs getDocs.js, which copies docs from the repos listed in docs.package.json. While copying, it writes each file's source repo, path and branch to docs.sources.json.
  2. populateStds.js then adds the pages it generates, such as /standards/iaas/scs-0102, to that file and marks them as coming from the standards repo.
  3. During the build, the new plugin docusaurus-plugin-source-repo reads docs.sources.json. It matches every doc page's URL to its source repo and publishes that map as global data.
  4. The navbar GitHub item, now type: 'custom-sourceRepo', looks up the current URL in that map. It links to the matching repo, or falls back to SovereignCloudStack/docs if the page isn't listed.
  5. The operator docs' editUrl uses the same file to build "Edit this page" links that open the file in its source repo.

Before sharing any slop I wanted to get some feedback if this problem is already known and how you think it should be tackled.

Activity

  1. mbuechse commented on Nov 10, 2026

    @mbuechse
    Contributor

    This problem has been known for a while (several years I estimate). Of course, one can try to solve it, but this solution here is quite involved and needs quite the brains to be maintained, particularly taking into account that most people working on the docs won't have years of experience with this repo. So if we no longer want to ignore the problem, I suggest we find a simple way to remove the buttons in question.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions