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

@docsearch/css: Provide Sass files too #2006

Closed
XhmikosR opened this issue Aug 2, 2023 · 5 comments
Closed

@docsearch/css: Provide Sass files too #2006

XhmikosR opened this issue Aug 2, 2023 · 5 comments

Comments

@XhmikosR
Copy link

XhmikosR commented Aug 2, 2023

Describe the problem

We are building our docs with Hugo, which by default is using libsass. I'm having trouble including styles.css in our docs Sass from node_modules, probably because of a libsass issue.

Describe the solution

Include the source files too with a scss extension.


It would greatly help us build and include docsearch CSS instead of using a CDN or instead of trying to switch to Dart Sass in Hugo.

Thanks in advance!

@XhmikosR
Copy link
Author

XhmikosR commented Mar 3, 2024

Is there any chance someone looks at this? It would greatly help us.

I understand you are using postcss, but there's no other way to include the CSS with Hugo unless it's a .scss file.

@levimichael
Copy link
Contributor

levimichael commented Mar 6, 2024

@XhmikosR let me know if the addition in this PR would be sufficient! #2201

Though unless I'm mistaken, its possible to import a plain .css file in your own .scss file, no?
https://sass-lang.com/documentation/at-rules/import/#importing-css

@XhmikosR
Copy link
Author

XhmikosR commented Mar 6, 2024

@levimichael thank you, yes! I just tested it locally by copying the style.css to style.scss.

Though unless I'm mistaken, its possible to import a plain .css file in your own .scss file, no?
https://sass-lang.com/documentation/at-rules/import/#importing-css

Unfortunately, that works only with Dart Sass. By default, Hugo bundles the (deprecated) libsass. But libsass requires no extra installation steps and is included with the hugo extended version. So, this issue is the only one blocking us in twbs/bootstrap#38993 and this way we don't need to switch to Dart Sass for our docs yet.

@levimichael
Copy link
Contributor

Ah okay, got it! I'm having a little trouble getting the release going (my first time triggering it on our side). It might be next week by the time I can get it sorted, FYI.

@levimichael
Copy link
Contributor

@XhmikosR we just realeased v3.6.0 which includes style.scss.

Feel free to check out the rest of the release in the notes: https://github.com/algolia/docsearch/releases/tag/v3.6.0

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

No branches or pull requests

2 participants