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

Charmhub docs don't work with channels. #1475

Open
evilnick opened this issue Jan 31, 2023 · 3 comments
Open

Charmhub docs don't work with channels. #1475

evilnick opened this issue Jan 31, 2023 · 3 comments

Comments

@evilnick
Copy link

evilnick commented Jan 31, 2023

Problem:

A charm with docs which vary from channel to channel cannot easily link to multiple pages.

The expected behaviour is that links in the discourse posts are mapped to 'docs' pages. For example

[Relate your MongoDB to other applications](/t/charmed-mongodb-tutorial-relate-your-mongodb-deployment/8629)

should get remapped in the docs part of charmhub to

https://charmhub.io/mongodb/docs/relate-mongodb

...as per whatever is in the docs index page.

However, for docs on a particular channel of a charm, e.g. https://charmhub.io/mongodb?channel=dpe/edge
this behaviour doesn't work. Looking at docs on charmhub for this specific channel, all the links are mapped to the 'default' latest channel of docs. Even editing the mapping table to add, e.g. ?channel=dpe/edge to the links doesn't work, as this data gets stripped off somewhere in the process (though interestingly, that DOES work for links within the page).

Even if passing data did work, this wouldn't be an ideal solution because it would require a different index topic for each channel, as well as possibly different near-identical posts to cover differences, and may also result in unpredictable behaviour depending on whether the channels are specific.

For a (non) working example, see https://charmhub.io/mongodb?channel=dpe/edge

@steverydz
Copy link
Contributor

This has now been fixed and is in production

@steverydz steverydz reopened this Feb 1, 2023
@steverydz
Copy link
Contributor

Reopening as links in the main text still don't have the channel

@deusebio
Copy link
Contributor

This seems to have broken again in the navigation table, which was fixed in the PR above. For links in the text there is a workaround which consists of hardcoding channel information. But this does not work for navigation tables, that has basically broken all the charm documentation on non-default tracks

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

No branches or pull requests

3 participants