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

Readme Access #428

Open
3 tasks done
VioletStorm opened this issue Apr 19, 2023 · 11 comments · May be fixed by #432
Open
3 tasks done

Readme Access #428

VioletStorm opened this issue Apr 19, 2023 · 11 comments · May be fixed by #432
Assignees
Labels
feature request a request for a feature, no guarantee of addition

Comments

@VioletStorm
Copy link

Please confirm

  • I have searched existing issues
  • This issue is not a duplicate of an existing one
  • This is not a request for a plugin

Feature Request Description

If a plugin has a readme, it can be viewed without needing to go through with a file manager.

Further Description

When a plugin has been opened from the list, an ℹ️ button is next to the plugin name up top. When pressed, it shows the text within the readme file, URLs are hyperlinked.

@VioletStorm VioletStorm added the feature request a request for a feature, no guarantee of addition label Apr 19, 2023
@PartyWumpus
Copy link
Member

PartyWumpus commented Apr 19, 2023

This sounds pretty good, but I think instead of the readme, it should be possible to have multiple pages, and have translation support built in.

My current idea is: Each plugin can have a docs folder that contains several folders, each representing a page. Each folder then contains one or more markdown pages, with each one being a different language.

The pages are displayed with a SidebarNavigation component. Maybe there's a .json file somewhere that represents the order the pages are displayed in the sidebar?

The displayed page name has to go into the markdown file so it can be translated. Maybe first line is the title?

If multiple pages is unreasonable then they can just put the markdown files directly into the docs folder.

If there isn't a docs folder then it can just fall back onto the readme.md.

react-markdown seems to do a pretty good job, so probably use that.

The multiple pages thing isn't particularly needed, but I'd quite like to include translation support in this.

When I have some free time I'll do some tinkering with getting this working, because I'd really like this (no promises though!).

@KP2048
Copy link
Contributor

KP2048 commented Apr 19, 2023

~/homebrew/docs/{plugin}/{language code}/{page}.md

@KP2048
Copy link
Contributor

KP2048 commented Apr 19, 2023

Or maybe
~/homebrew/plugins/{plugin}/docs/{language code}/{page}.md

@VioletStorm
Copy link
Author

Or maybe
~/homebrew/plugins/{plugin}/docs/{language code}/{page}.md

It'd be this yeah, and if /docs doesn't exist it would instead use /readme.md (case independent of course), or so I gather from PartyWumpus! ☺️

@PartyWumpus
Copy link
Member

PartyWumpus commented Apr 19, 2023

~/homebrew/plugins/{plugin}/docs/{language code}/{page}.md

I think this one is best, as the data is only ever going to change when the plugin updates and it reduces the extra file management stuff required from decky

@KP2048
Copy link
Contributor

KP2048 commented Apr 19, 2023

Decky could add a parameterized route at /docs/:plugin and it would be a sidebar navigation with each page as a tab. Obviously localized and the default locale would be English when there isn't a translation for a page because internet

@KP2048
Copy link
Contributor

KP2048 commented Apr 19, 2023

Devs could set up crowdin for their repos so that people can translate the docs

@AAGaming00
Copy link
Member

Devs could set up crowdin for their repos so that people can translate the docs

We could also perhaps offer plugin developers space on our Weblate instance.

@KP2048
Copy link
Contributor

KP2048 commented Apr 19, 2023

Does weblate support markdown?

@PartyWumpus
Copy link
Member

Does weblate support markdown?

Weblate does not appear to support markdown

Also, my work in progress version is now up (#432), although it will not work for now unless you manually modify it to remove the i18next depedency.

@KP2048
Copy link
Contributor

KP2048 commented Apr 23, 2023

Weblate does not appear to support markdown

Technically no, but it does support text files

@JohnnyCrazy JohnnyCrazy linked a pull request May 31, 2023 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request a request for a feature, no guarantee of addition
Projects
Status: 🏗 In progress
Development

Successfully merging a pull request may close this issue.

4 participants