Merge pull request #64 from HugoSave/first-render-time
Improved site load time
This commit is contained in:
@@ -50,6 +50,11 @@ params:
|
||||
# staticPath: "" # The path to serve the static files from
|
||||
favicon: "/fav.png"
|
||||
|
||||
# Whether to serve bootstrap css and js files from CDN or not. Can be set to true, "css" or "js" to choose between
|
||||
# serving both, only the css, or only the js files through the CDN. Any other value will make so that CDN is not used.
|
||||
# Note the lack of "" in true, it should be of boolean type.
|
||||
useBootstrapCDN: false
|
||||
|
||||
theme:
|
||||
disableThemeToggle: false
|
||||
# defaultTheme: "light" # dark
|
||||
|
||||
@@ -12,13 +12,19 @@
|
||||
<body class="light" onload="loading()">
|
||||
<!-- javascripts -->
|
||||
<!-- <script src="/js/jquery-3.6.0.min.js"></script> -->
|
||||
<script src="{{ .Site.Params.staticPath }}/bootstrap-5/js/bootstrap.bundle.js"></script>
|
||||
|
||||
{{- partial "sections/header.html" . -}}
|
||||
<div id="content">
|
||||
{{- block "main" . }}{{- end }}
|
||||
</div>
|
||||
{{- partial "sections/footer/index.html" . -}}
|
||||
|
||||
{{- if (or (eq .Site.Params.UseBootstrapCDN true) (eq .Site.Params.UseBootstrapCDN "js")) -}}
|
||||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13" crossorigin="anonymous"></script>
|
||||
{{- else -}}
|
||||
<script src="{{ .Site.Params.staticPath }}/bootstrap-5/js/bootstrap.bundle.min.js"></script>
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "scripts.html" . -}}
|
||||
</body>
|
||||
|
||||
|
||||
@@ -6,9 +6,18 @@
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Alata&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
||||
rel="stylesheet">
|
||||
<link rel="preload"
|
||||
as="style"
|
||||
href="https://fonts.googleapis.com/css2?family=Alata&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
||||
>
|
||||
<link rel="stylesheet"
|
||||
href="https://fonts.googleapis.com/css2?family=Alata&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
||||
media="print" onload="this.media='all'" />
|
||||
<noscript>
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Alata&family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap"
|
||||
rel="stylesheet">
|
||||
</noscript>
|
||||
|
||||
<!-- font configuration -->
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/font.css" media="all">
|
||||
@@ -19,7 +28,11 @@
|
||||
{{ template "_internal/twitter_cards.html" . }}
|
||||
|
||||
<!-- stylesheets -->
|
||||
{{- if (or (eq .Site.Params.UseBootstrapCDN true) (eq .Site.Params.UseBootstrapCDN "css")) -}}
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
|
||||
{{- else -}}
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/bootstrap-5/css/bootstrap.min.css" media="all">
|
||||
{{- end -}}
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/header.css" media="all">
|
||||
<link rel="stylesheet" href="{{ .Site.Params.staticPath }}/css/footer.css" media="all">
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user