-
Notifications
You must be signed in to change notification settings - Fork 6
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
Load CSS files / Specify theme path in config / coding standards #11
base: master
Are you sure you want to change the base?
Conversation
I like the approach of using However, the The But provided the relative path works for all known use cases it may be simpler to stick to that rather than add the overhead of editing |
@waako, are you testing with a local node server or with a Drupal instance? We (@mherchel and I) typically access PatternLab via the same server that's serving Drupal, so we need to prepend the "theme path" to make the sources match up. But if we were using a local node server with a webroot that serves directly from the theme directory, then I could see why you wouldn't need to prepend the theme path. I've got a the changes prepared to make that setting optional, just wanted to check with you before pushing. I could be wrong, but I don't think #2 or #10 would do the trick, as we can't rely on directory names or a specific number of directories. For example, themes can live in the |
On further investigation, I realized my folly: A webserver serving directly from the patternlab directory can't access files above its webroot, so it could never serve the library files! So that must not be what you mean. And we only need to worry about accessing the patternlab output via the same webserver as Drupal. I can't see any way to make it work reliably without the config variable. Is there something I'm missing? |
I guess it might depend on your setup, it's true that our theme is based off Emulsify, same for #10 so the paths depths and folder structure may be very similar, .e.g compiled css/js is in It's about the relative path from the generated HTML files and the static assets, regardless of how you access them. Sorry if not making sense, late Friday night and about to go on holiday so wanted to get a reply in. |
This PR: