mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
fix: serve halfmoon css through addPassthroughCopy (#799)
Serve halfmoon CSS files through eleventry's addPassthroughCopy instead of template file, avoiding serving additional HTML bloat. Network usage wise, this changes from one 423 KiB uncompressed response to two responses 380 KiB total Followup to https://codeberg.org/Codeberg/Documentation/pulls/655 Solves https://codeberg.org/Codeberg/Documentation/pulls/655#issuecomment-7361962 Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/799 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
parent
e0fe2eaa66
commit
d7889e5ad6
3 changed files with 3 additions and 6 deletions
|
|
@ -20,7 +20,8 @@
|
|||
<link rel="preload" href="https://fonts.codeberg.org/dist/inter/Inter%20Web/inter.css" as="style" />
|
||||
<link rel="preload" href="https://fonts.codeberg.org/dist/fontawesome6/css/svg-with-js.css" as="style" />
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/halfmoon.css">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/halfmoon/halfmoon.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/halfmoon/cores/halfmoon.modern.css">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/codeberg-docs.css" />
|
||||
<!-- Syntax highlighting -->
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
permalink: halfmoon.css
|
||||
---
|
||||
{% include "../node_modules/halfmoon/css/halfmoon.min.css" %}
|
||||
{% include "../node_modules/halfmoon/css/cores/halfmoon.modern.css" %}
|
||||
|
|
@ -23,6 +23,7 @@ export default function (eleventyConfig) {
|
|||
});
|
||||
|
||||
eleventyConfig.addPassthroughCopy('assets');
|
||||
eleventyConfig.addPassthroughCopy({ 'node_modules/halfmoon/css': '/assets/css/halfmoon' });
|
||||
eleventyConfig.addPassthroughCopy('fonts');
|
||||
|
||||
// Font Awesome Icons
|
||||
|
|
|
|||
Loading…
Reference in a new issue