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

Allow to declare global (shared) css/js urls #28

Merged
merged 1 commit into from
Oct 3, 2023
Merged

Conversation

jpsca
Copy link
Owner

@jpsca jpsca commented Oct 3, 2023

Before, any URL declared in the metadata ({#css ... #} and {#js ... #}) was prepended with the component prefix:

{#css /shared/foo.css, http://example.com/cdn.css #}` 

became

<link rel="stylesheet" href="/static/components/shared/foo.css">
<link rel="stylesheet" href="/static/components/http://example.com/cdn).css">

People were even adding their static folder to be able to import their global assets.

This PR fixes this by not adding a prefix to the URLs if it starts with "/", "http://", or "https://".

@jpsca jpsca merged commit bab2ac8 into main Oct 3, 2023
3 checks passed
@jpsca jpsca deleted the global-assets branch October 19, 2024 19:21
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

Successfully merging this pull request may close these issues.

1 participant