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

Process hub.yaml details #161

Open
claremacrae opened this issue Dec 11, 2021 · 5 comments
Open

Process hub.yaml details #161

claremacrae opened this issue Dec 11, 2021 · 5 comments
Assignees
Labels

Comments

@claremacrae
Copy link
Contributor

No description provided.

@claremacrae
Copy link
Contributor Author

Credit to @argenos for this idea, and for knowing how it's intended to work...

@claremacrae claremacrae assigned claremacrae and argenos and unassigned claremacrae Mar 4, 2022
@argenos
Copy link
Contributor

argenos commented Mar 24, 2022

I can't dig out the comment from Discord, but the rough idea was to have a hub.yaml file at the root of plugin or theme repos.
This would overwrite any information from the manifest.json or the obsidian-releases repository, and makes it much simpler to handle edge cases (e.g. two authors collaborating on plugins, or original author vs maintainer, custom content in plugin pages, etc).

Below is an initial example for plugins, but we could design something similar for themes:

docs: # Link to the plugin documentation
hub_content: [], # List of markdown documents to be included as is to the hub.
needs_theming: true, # Whether your plugin needs custom CSS by theme designers
features: # Help categorization and parsing
  commands : [], # List of files where the hub should parse addCommand docs
  suggestions: [], # List of files where to parse the EditorSuggest docs
  actions: [] # List of files where the hub should parse URI Actions docs
  toolbar: true # if your plugin adds a new toolbar
  sidebar: true # if your plugin **only** adds a new pane to the sidebar. If your plugin has a `custom_view` that can be dragged to the sidebar, set `sidebar: False` and `custom_view: True`.
  statusbar: true # if your plugin adds an element to the statusbar
  codeblock_syntax: true # if your plugin adds custom syntax to Obsidian using codeblocks
  file_type: true # Adds support for other file types (i.e. not markdown `.md`)
  custom_view: true # If your plugin adds Custom views on the note panes, e.g. Kanban. Rendering of codeblock syntax is not included here, see `codeblock_syntax` instead.
  subscription: false # Set to true if your plugin requires an active subscription to use this plugin, e.g. Todoist, Readwise
plugin_dependencies: [] # List of the IDs of the plugins it depends on.

@argenos
Copy link
Contributor

argenos commented Apr 27, 2022

From our pairing session on Saturday:

  • Most of the issues on Make automated edits of Author/People pages less error-prone #348 stem from scripted changes, adding the hub.yaml we could interpret these as a trusted source of information, make the PRs separately and merge without reviewing (as those are intentional changes by the author). This includes updates/fixes to:
    • description
    • typos or escaping special characters
    • capitalization
    • changes of ownership
    • website
    • additional plugin/theme features or note contents
  • Author pages tend to have some of the heaviest manual edits (links, handles, sponsorship information and other non-scripted contributions), but we need to come up with a solution to avoid people having to update author info in the hub.yaml file of 10 different repos for those things that can be scripted. Options we discussed:
    • point to author info on another repo (e.g. the first plugin). Note: This workflow is potentially going to be confusing
    • Author info is optional, if filled out in a single repo it's sufficient
    • Last plugin/theme wins (which is what currently happens -> to avoid unnecessary changes, first plugin/theme could reduce the number of times this happens)

@argenos
Copy link
Contributor

argenos commented Apr 27, 2022

Based on the points above, I've made some changes to the original proposal:

docs: # Link to the plugin documentation
hub_content: [], # List of markdown documents to be included as is to the hub relative to the root of the repo.
authors: # More than one author is possible, start a new line with - 
    - github: # GitHub user names of the people who created the plugin or theme
      websites: [] # Links to personal websites (optional)
      discord:
      twitter:
      youtube:
      sponsorships:
          buymeacoffee: # Add username to kofi or buy me a coffee here
          paypal: 
          github:
          patreon:
          others: [] # List of formatted markdown strings
maintainers: [] # GitHub user names of those maintaining the plugin (leave empty if it's the same as author)

plugin:
    needs_theming: true, # Whether your plugin needs custom CSS by theme designers
    features: # Help categorization and parsing
        commands : [], # List of files where the hub should parse addCommand docs
        suggestions: [], # List of files where to parse the EditorSuggest docs
        actions: [] # List of files where the hub should parse URI Actions docs
        toolbar: true # if your plugin adds a new toolbar
        sidebar: true # if your plugin **only** adds a new pane to the sidebar. If your plugin has a `custom_view` that can be dragged to the sidebar, set `sidebar: False` and `custom_view: True`.
        statusbar: true # if your plugin adds an element to the statusbar
        codeblock_syntax: true # if your plugin adds custom syntax to Obsidian using codeblocks
        file_type: true # Adds support for other file types (i.e. not markdown `.md`)
        custom_view: true # If your plugin adds Custom views on the note panes, e.g. Kanban. Rendering of codeblock syntax is not included here, see `codeblock_syntax` instead.
        subscription: false # Set to true if your plugin requires an active subscription to use this plugin, e.g. Todoist, Readwise
    plugin_dependencies: [] # List of the IDs of the plugins it depends on.


theme:
    features: []
    plugin_support: [] # IDs of the plugins that have been styled by this theme
    modes:
        - Dark
        - Light
    snippets: [] # Path to css snippets relative to the root of the repo. We could parse the css similar to style settings
    color_schemes: []

@claremacrae
Copy link
Contributor Author

From one of the Python intro sessions: Important: We need to consider how we would sanitise content we embed, in particular to prevent serving up malicious links.

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

No branches or pull requests

2 participants