Skip to content

Commit

Permalink
[Docs site] Styles load update (cloudflare#7772)
Browse files Browse the repository at this point in the history
* Fix local previews

* fix local build errors + typo in early hint
  • Loading branch information
kodster28 authored Feb 24, 2023
1 parent be32d33 commit b6d7f8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion content/_headers
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ https://:project.pages.dev/*
X-Robots-Tag: noindex

/*
Link: </styles.css>; rel=preload; as=style
Link: </style.css>; rel=preload; as=style
8 changes: 7 additions & 1 deletion layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
<head>
{{- partial "head.meta" (dict "Context" . "Product" .Section) -}}

<link rel="preload" href="/style.css" as="style" />
{{- if hugo.IsProduction -}}
<link rel="preload" href="/style.css" as="style" />
{{- else -}}
<link rel="stylesheet preconnect" href="/style.css" />
{{- end -}}


{{- block "styles" . -}}{{- end -}}

{{- partial "script" (dict "src" "theme.ts" "inline" true "format" "iife") -}}
Expand Down

0 comments on commit b6d7f8f

Please sign in to comment.