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

Move Docus Colors to settings.json #88

Closed
atinux opened this issue Feb 22, 2021 — with Volta.net · 5 comments · Fixed by #92
Closed

Move Docus Colors to settings.json #88

atinux opened this issue Feb 22, 2021 — with Volta.net · 5 comments · Fixed by #92
Assignees
Labels
enhancement New feature or request

Comments

Copy link
Contributor

atinux commented Feb 22, 2021

I would love to be able to move the colors to the settings.json to docus won't add any key inside the Nuxt config directly.

We could leverage the CSS variables in order to give TailwindCSS custom colors on runtime: https://levelup.gitconnected.com/tailwindcss-with-css-variables-513abe2e9a5

This way, we could have HMR on the docus theme colors.

@atinux atinux added the enhancement New feature or request label Feb 22, 2021 — with Volta.net
Copy link
Contributor Author

atinux commented Feb 22, 2021

Would you want to try to implement it @farnabaz ?

@farnabaz farnabaz self-assigned this Feb 22, 2021
Copy link
Collaborator

Manifest theme_color seems an issue in migrating to CSS variable https://github.com/nuxtlabs/docus/blob/main/theme/nuxt.config.js#L51

Copy link
Contributor Author

atinux commented Feb 23, 2021

Well I guess we could anyway compute them for the nuxt.config.js since they are used for loading.color too, but mostly useful when running nuxt build.

@farnabaz farnabaz mentioned this issue Feb 23, 2021
6 tasks
Copy link
Collaborator

farnabaz commented Feb 23, 2021

loading.color works fine with css variables because it renders on the page.

What is the right way to detect path of settings.json before Nuxt initialization?

Copy link
Contributor Author

atinux commented Feb 23, 2021

I think we shall do it right inside module.js since we can have user srcDir + content/settings.json directly.

Then we can overwrite directly the user config there.

Tahul added a commit that referenced this issue Apr 20, 2022
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

Successfully merging a pull request may close this issue.

2 participants