mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-23 03:34:08 +01:00
Move most assets from /static to /assets
Allows to only serve the file that we actually use. Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
a493acb489
commit
e9914bf9bb
|
|
@ -16,7 +16,7 @@ load them. Example call:
|
|||
```sh
|
||||
python3 download_google_fonts_css.py \
|
||||
"https://fonts.googleapis.com/css?family=Inter:300,300i,400,400i,700,700i" \
|
||||
../../fonts \
|
||||
../../../static/fonts \
|
||||
../../fonts
|
||||
```
|
||||
|
||||
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
|
@ -134,15 +134,6 @@ sidebar_menu_compact = true
|
|||
[[module.imports]]
|
||||
path = "github.com/matrix-org/docsy"
|
||||
disable = false
|
||||
# Mounting /assets and /static as assets directories helps Hugo to generate
|
||||
# the correct URL.
|
||||
[[module.mounts]]
|
||||
source = 'assets'
|
||||
target = 'assets'
|
||||
[[module.mounts]]
|
||||
source = 'static'
|
||||
target = 'assets'
|
||||
|
||||
|
||||
# custom output formats
|
||||
|
||||
|
|
|
|||
|
|
@ -13,5 +13,5 @@
|
|||
in the document.
|
||||
|
||||
*/}}
|
||||
|
||||
<script defer language="javascript" type="text/javascript" src="{{ "js/toc.js" | urlize | relURL }}"></script>
|
||||
{{ $toc := resources.Get "js/toc.js" -}}
|
||||
<script defer language="javascript" type="text/javascript" src="{{ $toc.RelPermalink }}"></script>
|
||||
|
|
|
|||
|
|
@ -13,5 +13,6 @@
|
|||
Google Fonts manually via a script:
|
||||
https://github.com/matrix-org/matrix-spec/tree/main/static/css/fonts
|
||||
*/}}
|
||||
<link rel="preload" href="{{ "css/fonts/Inter.css" | relURL }}" as="style">
|
||||
<link rel="stylesheet" href="{{ "css/fonts/Inter.css" | relURL }}">
|
||||
{{ $inter := resources.Get "css/fonts/Inter.css" -}}
|
||||
<link rel="preload" href="{{ $inter.RelPermalink }}" as="style">
|
||||
<link rel="stylesheet" href="{{ $inter.RelPermalink }}">
|
||||
|
|
|
|||
Loading…
Reference in a new issue