--- publish: true --- # `hub.yaml` proposal for theme designers We want to propose a way for you to be able to enhance your hub note without the hassle of making PRs to the hub or having to keep things updated on two places. ## Current workflow As you may know, some of the hub content is populated via scripts. For themes, there are two sources of information we use: - What you submitted to the `obsidian-releases` repo, e.g. ```json { "name": "Shimmering Focus", "author": "pseudometa", "repo": "chrisgrieser/shimmering-focus", "screenshot": "docs/images/Promo%20Screenshot/promo-screenshot.png", "modes": ["dark", "light"], "branch": "main" }, ``` - Your `obsidian.css` file to determine if you use the Style settings plugin and to see if you've listed any [compatible plugins](https://publish.obsidian.md/hub/04+-+Guides%2C+Workflows%2C+%26+Courses/Guides/Adding+plugin+compatibility+for+themes+to+the+Obsidian+Hub). This is covers the very basic information for most themes, but - is not very user-friendly when trying to find themes that have X (which themes support asides? highlights?) and users have to try out the themes to find out - limits you to a single screenshot - requires manual edits on your side if you want to add text or other features not mentioned in style settings or list sponsorship information - content you add to the hub is outside to your theme repo and will easily get out of date - adding or updating any content you do add to the hub requires you to go through the fork and PR workflow, which adds friction and makes it less likely that you do either - requires manual work in the hub repo when there are manual changes to make sure the scripts haven't removed manually added content and handling other edge cases (at least for now) ## Proposal Our proposal is to add an optional `hub.yaml` file at the root of theme repos to add some of this information. Note that all entries are optional, so maintenance and effort can be managed by each theme designer based on their theme's complexity and requirements. We'll cover some of the basics with examples below, but you can find the full file with all the options further down in the [[#Template]] section. ### Link to the theme's documentation The contents of the `hub.yaml` for a theme that **only** wants to add a link to the theme's documentation in its hub note would be as simple as: ```yaml docs: https://minimal.guide/ # Link to the theme documentation ``` ### Hub note contents Similarly, if you wanted to have some control on the contents of your theme note, you can use the `hub_content` key to list which markdown documents to "import" to the hub. Generally, to avoid having to maintain two sets of docs (one for your theme and one for the hub), you could reuse a markdown file with an overview that has links to your docs. For example, with the contents of `hub.yaml` as show below: ```yaml hub_content: # List of markdown documents to be included as is to the hub relative to the root of the repo. - docs/theme_overview.md ``` And the contents of `theme_overview.md`: ```markdown ## My theme overview This is a small description of my theme. You can find more information about the following features in the documentation: - [Callouts](www.mytheme.com/callouts) - [checkboxes](www.mytheme.com/checkboxes) Report issues by clicking [here](www.github.com/octocat/mytheme/issues). ``` ### Theme features The main goal of adding a list of features is to help compare themes based on what they offer, to save one having to try them out. Keep in mind that themes (especially large ones) have many many features, and it's not our intention to make an exhaustive list of **all** the things your theme can do. Instead, ==ideally the features you list are a way to pitch to (new) users what makes your theme unique==. For that, the idea is to parse the `feature` key to identify some of the frequently sought-after features with a controlled vocabulary and automatically add links to pre-defined categories in the hub. The controlled vocabulary is based on the feature list proposed by pseudometa and extended by argentum: | Key | Hub note | Description | |----|-----|------| | `color_schemes` | `[[Themes with additional color schemes]]` | Theme has additional color schemes | `tables` | `[[Themes with special table support]]` | Dedicated cssclasses for tables |`mobile` | `[[Themes with mobile support]]` | Does the theme provide mobile support (both phones and tablets)? | `publish` | `[[Themes with Obsidian Publish support]]` |Does the theme have publish support? |`print` | `[[Themes with PDF export support]]` | Adds CSS to customize the appearance of the PDF exports |`gutter` | `[[Themes with gutter features]]` |Does the theme add custom indicators or other features to the gutter? |`snippets` | `[[Themes with official snippets]]` | Does your theme provide additional snippets to customize parts of your theme outside of the style settings plugin? | `images` | `[[Themes with image handling options]]` | Does your theme add any image-handling features, e.g. zooming, galleries, aligning/wrapping around text, etc. |`highlights` | `[[Themes with custom highlights]]` | Additional colours or ways to achieve the core `==highlight==` behaviour |`asides` | `[[Themes with side notes]]` | Any features related to the `