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

Update Theme Dev Guide #424

Open
lguenth opened this issue Apr 29, 2022 · 0 comments
Open

Update Theme Dev Guide #424

lguenth opened this issue Apr 29, 2022 · 0 comments
Assignees
Labels
new content New Notes being added to the Hub

Comments

@lguenth
Copy link
Contributor

lguenth commented Apr 29, 2022

Update Theme Dev Guide to include new Publish recommendations

Silver asked whether we could include the new recommended ways of testing a theme for Publish which could be included here:

https://publish.obsidian.md/hub/04+-+Guides%2C+Workflows%2C+%26+Courses/for+Theme+Designers
or here
https://publish.obsidian.md/hub/04+-+Guides%2C+Workflows%2C+%26+Courses/Guides/How+to+add+your+theme+to+the+community+theme+store
or here
https://publish.obsidian.md/hub/04+-+Guides%2C+Workflows%2C+%26+Courses/Guides/Best+Practices+and+Tips+for+Theme+Development

From Silver:

PSA: if your theme is Obsidian Publish compatible, you can update the json file to add "publish": true to your theme info, and also add a publish.css file at the root of your repository, along with obsidian.css.

https://github.com/obsidianmd/obsidian-releases/blob/master/community-css-themes.json

In future versions we'll (1) make it easy for Publish users to use the compatible themes for their sites, reducing confusion and loading unnecessary resources, and (2) make it easy for developers to test out their themes on a publish site.

Kudos to @kepano for feedback on this issue! https://forum.obsidian.md/t/publish-obsidian-app-css-should-not-be-recommended-for-use-in-publish-sites/32467
(Discord)

Just FYI: you can now do applyCss and applyCssByLink to test out your CSS on Obsidian Publish sites, so that you don't actually need to own sites to test your publish.css.

First method takes a CSS string, you can use backtick (template strings) for multiline CSS. Second method takes a link and loads the CSS, would recommend GitHub raw file URLs.
(Link)

@lguenth lguenth added the new content New Notes being added to the Hub label Apr 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new content New Notes being added to the Hub
Projects
None yet
Development

No branches or pull requests

2 participants