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

can publish-spa support publish with theme data installed from thememarket #8

Open
AlucPro opened this issue May 31, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@AlucPro
Copy link

AlucPro commented May 31, 2023

If i want to publish logseq with a theme, now the only way to custom my css style is editing custom.css.
Can this repo support ability to publish with theme installed from theme market?

Maybe can add a config field like this:

- with
  - theme: xxx
@logseq-cldwalker
Copy link
Contributor

Hi. Unfortunately themes are plugins which are only supported on desktop so this would take some work. Fortunately one workaround you can do is to add a one-liner to your logseq/export.css. From a logseq-dev-theme example, that css file would contain:

@import url("https://cdn.jsdelivr.net/gh/pengx17/logseq-dev-theme@main/custom.css");

To configure your own theme you would need to change pengx17/logseq-dev-theme@main/custom.css to match your theme. The format of that string is GITHUB-USER/GITHUB-REPO/@BRANCH/FILE. GITHUB-USER and GITHUB-REPO are just from the theme's github repo url. BRANCH is the default branch which is usually 'main' or 'master'. FILE is the name of the primary custom css file usually 'custom.css'.

For anyone interested, I'm open to a contribution for this with tests. Of the 4 variables above, user and repo are easy to obtain from the name and file from the package.json. Branch is a little trickier and may require interacting with the github api

@logseq-cldwalker logseq-cldwalker added the enhancement New feature or request label May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants