Fixed asset URLs after restructuring

This commit is contained in:
squidfunk 2023-09-20 14:26:05 +02:00
parent 48c0e8bbbf
commit 1a102a0f7f
No known key found for this signature in database
GPG Key ID: 5ED40BC4F9C436DF
2 changed files with 7 additions and 7 deletions

View File

@ -44,10 +44,10 @@
{% endif %}
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/main.30068a00.min.css' | url }}">
{% if config.theme.palette %}
{% set palette = config.theme.palette %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/palette.85d0ee34.min.css' | url }}">
{% endif %}
{% include "partials/icons.html" %}
{% endblock %}
@ -222,7 +222,7 @@
"base": base_url,
"features": features,
"translations": {},
"search": "assets/javascripts/workers/search.js" | url
"search": "assets/javascripts/workers/search.a264c092.min.js" | url
} -%}
{%- if config.extra.version -%}
{%- set _ = app.update({ "version": config.extra.version }) -%}
@ -250,7 +250,7 @@
</script>
{% endblock %}
{% block scripts %}
<script src="{{ 'assets/javascripts/bundle.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.4e0fa4ba.min.js' | url }}"></script>
{% for script in config.extra_javascript %}
{{ script | script_tag }}
{% endfor %}

View File

@ -169,7 +169,7 @@ const sources$ = copyAll("**/*.py", {
const stylesheets$ = resolve("**/[!_]*.scss", { cwd: "src" })
.pipe(
mergeMap(file => zip(
of(ext(file, ".css").replace("overrides/", "")),
of(ext(file, ".css").replace(/(overrides|templates)\//, "")),
transformStyle({
from: `src/${file}`,
to: ext(`${base}/${file}`, ".css")
@ -181,7 +181,7 @@ const stylesheets$ = resolve("**/[!_]*.scss", { cwd: "src" })
const javascripts$ = resolve("**/{custom,bundle,search}.ts", { cwd: "src" })
.pipe(
mergeMap(file => zip(
of(ext(file, ".js").replace("overrides/", "")),
of(ext(file, ".js").replace(/(overrides|templates)\//, "")),
transformScript({
from: `src/${file}`,
to: ext(`${base}/${file}`, ".js")
@ -210,7 +210,7 @@ const manifest$ = merge(
scan((prev, mapping) => (
mapping.reduce((next, [key, value]) => (
next.set(key, value.replace(
new RegExp(`${base}\\/(overrides\\/)?`),
new RegExp(`${base}\\/(overrides|templates)\\/`),
""
))
), prev)