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 %} {% endif %}
{% endblock %} {% endblock %}
{% block styles %} {% 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 %} {% if config.theme.palette %}
{% set palette = 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 %} {% endif %}
{% include "partials/icons.html" %} {% include "partials/icons.html" %}
{% endblock %} {% endblock %}
@ -222,7 +222,7 @@
"base": base_url, "base": base_url,
"features": features, "features": features,
"translations": {}, "translations": {},
"search": "assets/javascripts/workers/search.js" | url "search": "assets/javascripts/workers/search.a264c092.min.js" | url
} -%} } -%}
{%- if config.extra.version -%} {%- if config.extra.version -%}
{%- set _ = app.update({ "version": config.extra.version }) -%} {%- set _ = app.update({ "version": config.extra.version }) -%}
@ -250,7 +250,7 @@
</script> </script>
{% endblock %} {% endblock %}
{% block scripts %} {% 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 %} {% for script in config.extra_javascript %}
{{ script | script_tag }} {{ script | script_tag }}
{% endfor %} {% endfor %}

View File

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