Skip to content

Commit

Permalink
load CSS/JS from jsDelivr
Browse files Browse the repository at this point in the history
  • Loading branch information
christianspecht committed Nov 7, 2024
1 parent 038fc67 commit ec2968a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ buildnumber = "123456"
# HTML header ASCII art: https://discourse.gohugo.io/t/how-to-add-ascii-art-as-comments-to-head/1084
headercommentblock = "\u003c\u0021\u002d\u002d\n\n \u005f\u003d\u003d\u002f \u0069 \u0069 \u005c\u003d\u003d\u005f\n \u002f\u0058\u0058\u002f \u007c\u005c\u005f\u005f\u005f\u002f\u007c \u005c\u0058\u0058\u005c\n \u002f\u0058\u0058\u0058\u0058\u005c \u007c\u0058\u0058\u0058\u0058\u0058\u007c \u002f\u0058\u0058\u0058\u0058\u005c\n \u007c\u0058\u0058\u0058\u0058\u0058\u0058\u005c\u005f \u005f\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u005f \u005f\u002f\u0058\u0058\u0058\u0058\u0058\u0058\u007c\n \u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0078\u0078\u0078\u0078\u0078\u0078\u0078\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0078\u0078\u0078\u0078\u0078\u0078\u0078\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\n\u007c\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u007c\n\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\n\u007c\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u007c\n \u0058\u0058\u0058\u0058\u0058\u0058\u002f\u005e\u005e\u005e\u005e\u0022\u005c\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u0058\u002f\u005e\u005e\u005e\u005e\u005e\u005c\u0058\u0058\u0058\u0058\u0058\u0058\n \u007c\u0058\u0058\u0058\u007c \u005c\u0058\u0058\u0058\u002f\u005e\u005e\u005c\u0058\u0058\u0058\u0058\u0058\u002f\u005e\u005e\u005c\u0058\u0058\u0058\u002f \u007c\u0058\u0058\u0058\u007c\n \u005c\u0058\u0058\u005c \u005c\u0058\u002f \u005c\u0058\u0058\u0058\u002f \u005c\u0058\u002f \u002f\u0058\u0058\u002f\n \u0022\u005c \u0022 \u005c\u0058\u002f \u0022 \u002f\u0022\n \n\u002d\u002d\u003e"

useCdn = true

[permalinks]
posts = '/:year/:month/:day/:slug/'

Expand Down
14 changes: 7 additions & 7 deletions src/themes/custom-bootstrap/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="{{ "/feed/atom/index.xml" | absURL }}" />
<link rel="canonical" href="{{ .Permalink }}" />
<!-- Le styles -->
<link href="{{ "/css/bootstrap.min.css" | absURL }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ "/css/bootstrap-responsive.min.css" | absURL }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ if .Site.Params.useCdn }}https://cdn.jsdelivr.net/gh/christianspecht/blog@master/src/themes/custom-bootstrap/static/css/bootstrap.min.css{{ else }}{{ "/css/bootstrap.min.css" | absURL }}{{ end }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ if .Site.Params.useCdn }}https://cdn.jsdelivr.net/gh/christianspecht/blog@master/src/themes/custom-bootstrap/static/css/bootstrap-responsive.min.css{{ else }}{{ "/css/bootstrap-responsive.min.css" | absURL }}{{ end }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ "/css/cs.css" | absURL }}" rel="stylesheet">
<link href="{{ "/libs/font-awesome/6.4.0/css/fontawesome.min.css" | absURL }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ "/libs/font-awesome/6.4.0/css/brands.min.css" | absURL }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ "/libs/font-awesome/6.4.0/css/solid.min.css" | absURL }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ if .Site.Params.useCdn }}https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/fontawesome.min.css{{ else }}{{ "/libs/font-awesome/6.4.0/css/fontawesome.min.css" | absURL }}{{ end }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ if .Site.Params.useCdn }}https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/brands.min.css{{ else }}{{ "/libs/font-awesome/6.4.0/css/brands.min.css" | absURL }}{{ end }}" rel="stylesheet" crossorigin="anonymous">
<link href="{{ if .Site.Params.useCdn }}https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/solid.min.css{{ else }}{{ "/libs/font-awesome/6.4.0/css/solid.min.css" | absURL }}{{ end }}" rel="stylesheet" crossorigin="anonymous">

<!-- Fav and touch icons -->
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://avatar.christianspecht.de/cs144.jpeg">
Expand Down Expand Up @@ -178,7 +178,7 @@
<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="{{ "/js/jquery.min.js" | absURL }}" crossorigin="anonymous"></script>
<script src="{{ "/js/bootstrap.min.js" | absURL }}" crossorigin="anonymous"></script>
<script src="{{ if .Site.Params.useCdn }}https://cdn.jsdelivr.net/npm/[email protected]/tmp/jquery.min.js{{ else }}{{ "/js/jquery.min.js" | absURL }}{{ end }}" crossorigin="anonymous"></script>
<script src="{{ if .Site.Params.useCdn }}https://cdn.jsdelivr.net/gh/christianspecht/blog@master/src/themes/custom-bootstrap/static/js/bootstrap.min.js{{ else }}{{ "/js/bootstrap.min.js" | absURL }}{{ end }}" crossorigin="anonymous"></script>
</body>
</html>

0 comments on commit ec2968a

Please sign in to comment.