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
[RFC] Add info/docs page for each plugin #432
base: main
Are you sure you want to change the base?
Conversation
Related to #428 |
What do you think about moving the idea of
becomes
Less config files sounds like a good thing. |
This sounds like a very good idea, I considered something similar but wasn't sure exactly how to implement it. Would also probably make the logic of the loading of files a little simpler. |
From the technical side, I can see a couple of downsides to that:
Both are solvable problems, just things to keep in mind. The advantages seem to outweigh those challenges. Since it's only the title, is there any reason to not just always use <title>.md? I.e. use the filename as the title and just remove the file extension. Filenames can have spaces and most special characters in Linux so it's not too hard to write titles with good punctuation (unlike Windows). |
I want files to be able to fall back to the original language's version of that file if they don't exist in your language. If they're named that way there's no clear way to fall back for individual files. If it isn't considered particularly important, then that could be fine. (it could obviously still fall back to the original language's folder if your language doesn't exist at all) Also, I just remembered the reason why I didn't do it the frontmatter way, because it gives no clear order and I'd like devs to be able to order their pages, and if possible add seperators between pages in the list. I think a consistent order is probably reasonably important. |
Yes, I agree the navbar ordering would be best inside a top-level config file, like
I think reading the titles into some struct can be a one-time effort, e.g. when the plugin is loaded. We're also talking about docs pages, which will propably never go beyond 10 per plugin, so I don't think we run into scalability issues here. |
add `onDocsClick` param for custom Titleviews
Just thought I'd throw in that "perfect is the enemy of good" here. This ultimately is a basic feature and personally I'd settle for a single file readme.md for each plugin. Honestly that should suffice (and should be required, imo), rather than a multipage multifile tabulated novel. Translations are understandable but beyond that, it's a plugin of a plugin. If you need to write a book about it, just link to your github. /shrug As for 'add a setting somewhere for whether to show the button or not', no file present = no button displayed, solved. Also, I'd like to see whatever this description is on the store page as well as after the plugin is installed, so whatever that looks like that'd be awesome. My 2 cents you didn't ask for ;) |
This is now waiting for some plugin API changes so the docs folder can easily be included (or not included).
Resolves #428
Adds an info button to the top of each plugin. When pressed it'll load one or more markdown files.
Current folder layout is this
or this if you don't want translations
docs.json: (These are the default values if the file is missing or incomplete)
If the docs.json file is missing/broken, it'll just display every file in the folder.
If a language's folder is missing, it'll just use the
default_language
's folder.If a page is present in the
default_language
's folder, but not in the user's language, then it'll display the default language's page.If the docs folder is missing, it'll just display the readme file.
in each file there's a bit of (optional) frontmatter that determines the name used in the sidebar
if it isn't there then the default is the filename without the extension
In each file, you can link to images/videos in the
/assets
folder of your plugin with/decky/assets/filename
.changes that I still need to make are:
As the [RFC] implies, please share any feedback.
Pictures: