diff options
author | sonic182 <johander1822@gmail.com> | 2022-03-30 00:34:46 +0300 |
---|---|---|
committer | sonic182 <johander1822@gmail.com> | 2022-03-30 00:34:46 +0300 |
commit | 20580ecfcec02cf7b209be23c4bf84f2ef9c3af1 (patch) | |
tree | d544cc13febe055acd2d5cea9c1a27666e61d9f1 | |
parent | ebaf9cf5b331ea81681caa1a4f9e13665ebf797a (diff) |
static param
-rw-r--r-- | exampleSite/config.yaml | 1 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 4 | ||||
-rw-r--r-- | layouts/index.html | 8 | ||||
-rw-r--r-- | layouts/partials/head.html | 14 |
4 files changed, 14 insertions, 13 deletions
diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index e0494ab..7a919d6 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -41,6 +41,7 @@ Menus: params:
title: "Hugo Profile"
description: Text about my cool site
+ static: ""
favicon: "/fav.png"
theme:
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0e75fb7..e668a5a 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -12,7 +12,7 @@ <body class="light" onload="loading()"> <!-- javascripts --> <!-- <script src="/js/jquery-3.6.0.min.js"></script> --> - <script src="/bootstrap-5/js/bootstrap.bundle.js"></script> + <script src="{{ .Site.Params.Statics }}/bootstrap-5/js/bootstrap.bundle.js"></script> {{- partial "sections/header.html" . -}} <div id="content"> @@ -22,4 +22,4 @@ {{- partial "scripts.html" . -}} </body> -</html>
\ No newline at end of file +</html> diff --git a/layouts/index.html b/layouts/index.html index 5806a58..ade2bac 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,10 +1,10 @@ {{ define "head" }}
<meta name="description" content={{ .Site.Params.description }}>
-<link rel="stylesheet" href="/css/index.css" media="all">
-<link rel="stylesheet" href="/css/projects.css" media="all">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/css/index.css" media="all">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/css/projects.css" media="all">
<!-- fontawesome -->
-<script defer src="/fontawesome-5/all-5.15.4.js"></script>
+<script defer src="{{ .Site.Params.Statics }}/fontawesome-5/all-5.15.4.js"></script>
{{ end }}
{{ define "title" }}
@@ -19,4 +19,4 @@ {{- partial "sections/projects.html" . -}}
{{- partial "sections/achievements.html" . -}}
{{- partial "sections/contact.html" . -}}
-{{ end }}
\ No newline at end of file +{{ end }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 305552a..78d73fc 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -11,7 +11,7 @@ rel="stylesheet">
<!-- font configuration -->
-<link rel="stylesheet" href="/css/font.css" media="all">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/css/font.css" media="all">
<!-- Internal templates -->
{{ template "_internal/google_analytics_async.html" . }}
@@ -19,16 +19,16 @@ {{ template "_internal/twitter_cards.html" . }}
<!-- stylesheets -->
-<link rel="stylesheet" href="/bootstrap-5/css/bootstrap.min.css" media="all">
-<link rel="stylesheet" href="/css/header.css" media="all">
-<link rel="stylesheet" href="/css/footer.css" media="all">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/bootstrap-5/css/bootstrap.min.css" media="all">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/css/header.css" media="all">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/css/footer.css" media="all">
<!-- theme -->
-<link rel="stylesheet" href="/css/theme.css" media="all">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/css/theme.css" media="all">
<!-- Custom Styles -->
{{ if .Site.Params.customCSS }}
-<link rel="stylesheet" href="/style.css">
+<link rel="stylesheet" href="{{ .Site.Params.Statics }}/style.css">
{{ end }}
<style>
@@ -54,4 +54,4 @@ line-height: {{ .Site.Params.font.lineHeight | default "1.5" }};
text-align: {{ .Site.Params.font.textAlign | default "left" }};
}
-</style>
\ No newline at end of file +</style>
|