Skip to content

Commit

Permalink
fix-links-preview (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipVinc authored Feb 6, 2024
1 parent 875cab8 commit 0591220
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion config/_default/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
baseURL = "https://www.netket.org"
# baseURL = "https://www.netket.org"
languageCode = "en-us"
title = "NetKet"
copyright = "Copyright 2019-2022, The Netket authors - All rights reserved."
Expand Down
24 changes: 12 additions & 12 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>

<!-- Favicons -->
<link rel="apple-touch-icon" sizes="180x180" href="{{ "favicon/apple-touch-icon.png" | absURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon/favicon-32x32.png" | absURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon/favicon-16x16.png" | absURL }}">
<link rel="manifest" href="{{ "favicon/site.webmanifest" | absURL }}">
<link rel="mask-icon" href="{{ "favicon/safari-pinned-tab.svg" | absURL }}" color="#2c3e50">
<link rel="apple-touch-icon" sizes="180x180" href="{{ "favicon/apple-touch-icon.png" | relURL }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ "favicon/favicon-32x32.png" | relURL }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ "favicon/favicon-16x16.png" | relURL }}">
<link rel="manifest" href="{{ "favicon/site.webmanifest" | relURL }}">
<link rel="mask-icon" href="{{ "favicon/safari-pinned-tab.svg" | relURL }}" color="#2c3e50">
<meta name="msapplication-TileColor" content="#2c3e50">
<meta name="theme-color" content="#2c3e50">

<!-- Additional CSS -->
<link rel="stylesheet" href="{{ "css/main.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/navbar.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/carousel.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/hero.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/keyfeatures.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/panels.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/main.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/navbar.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/carousel.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/hero.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/keyfeatures.css" | relURL }}">
<link rel="stylesheet" href="{{ "css/panels.css" | relURL }}">

{{ if ( .HasShortcode "installationWidget" ) }}
<!-- Installation Widget CSS (only loaded if needed) -->
<link rel="stylesheet" href="{{ "css/installationWidget.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/installationWidget.css" | relURL }}">
{{ end }}

<!-- Page Title (for headbar) -->
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/hero.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1 class="h1 display-5 fw-bold lh-1 mb-3 hero-title">{{- $title -}}</h1>
</div>
<div class="col-0 col-lg-3 d-none d-lg-block mx-0 px-2 py-3">
{{- with $logo -}}
<img src="{{ printf "%s" . | absURL }}" class="d-block img-fluid hero-logo" alt="NetKet" loading="lazy">
<img src="{{ printf "%s" . | relURL }}" class="d-block img-fluid hero-logo" alt="NetKet" loading="lazy">
{{- end -}}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ with .Params.tags }}
<i data-feather="tag"></i>
{{ range . }}
{{ $href := print (absURL "tags/") (urlize .) }}
{{ $href := print (relURL "tags/") (urlize .) }}
<a class="btn btn-sm btn-outline-dark tag-btn" href="{{ $href }}">{{ . }}</a>
{{ end }}
{{ end }}
8 changes: 4 additions & 4 deletions layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<nav class="navbar navbar-top navbar-expand-md fixed-top bd-navbar flex-md navbar-dark bg-light">
<div class="container">
<a class="navbar-brand navbar-custom-brand" href="{{ "." | absURL}}">
<a class="navbar-brand navbar-custom-brand" href="{{ "." | relURL}}">
{{- with $navbar.logo -}}
<img class="navbar-brand-logo d-inline-block align-center" src="{{ printf "%s" . | absURL }}" loading="lazy">
<img class="navbar-brand-logo d-inline-block align-center" src="{{ printf "%s" . | relURL }}" loading="lazy">
{{- end -}}
<div class="navbar-brand-text d-inline-block align-center">
{{- .Site.Title -}}
Expand All @@ -21,7 +21,7 @@
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
{{ range .Site.Menus.main }}
<li class="nav-item mx-auto">
<a class="nav-link {{ if $.IsMenuCurrent " main " . }} active" aria-current="page{{ end }}" href="{{ .URL | absURL }}">
<a class="nav-link {{ if $.IsMenuCurrent " main " . }} active" aria-current="page{{ end }}" href="{{ .URL }}">
{{ .Pre }}
{{ .Name }}
{{ .Post }}
Expand All @@ -46,7 +46,7 @@
{{- with $navbar.button -}}
<!-- Download button -->
<li class="nav-item">
<a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ms-md-3" href="{{ printf "%s" .url | absURL }}">
<a class="btn btn-bd-download d-none d-lg-inline-block mb-3 mb-md-0 ms-md-3" href="{{ printf "%s" .url | relURL }}">
{{- .text -}}
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/script-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!-- Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>

<script src="{{ "js/main.js" | absURL }}"></script>
<script src="{{ "js/main.js" | relURL }}"></script>

{{ if ( .HasShortcode "installationWidget" ) }}
<!-- JS For the installation widget (should only load if widget is used) -->
<script src="{{ "js/installationWidget.js" | absURL }}"></script>
<script src="{{ "js/installationWidget.js" | relURL }}"></script>
{{ end }}
10 changes: 5 additions & 5 deletions layouts/partials/site-schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
"description": "{{ .Site.Params.description }}",
{{- end }}
{{ with .Site.Params.image -}}
"image": "{{ .url | absURL }}",
"image": "{{ .url | relURL }}",
{{- end }}
{{ with .Site.Params.logo -}}
"thumbnailUrl": "{{ .url | absURL }}",
"thumbnailUrl": "{{ .url | relURL }}",
{{- end }}
{{ with .Site.Copyright -}}
"license": "{{ . }}",
Expand All @@ -44,14 +44,14 @@
{{ if ge (.Param "lua.image.width") 696 -}}
"image": {
"@type": "ImageObject",
"url": "{{ .Param "lua.image.url" | absURL }}",
"url": "{{ .Param "lua.image.url" | relURL }}",
"width": {{ .Param "lua.image.width" }},
"height": {{ .Param "lua.image.height" }}
},
{{- else if ge .Site.Params.image.width 696 -}}
"image": {
"@type": "ImageObject",
"url": "{{ .Site.Params.image.url | absURL }}",
"url": "{{ .Site.Params.image.url | relURL }}",
"width": {{ .Site.Params.image.width }},
"height": {{ .Site.Params.image.height }}
},
Expand Down Expand Up @@ -79,7 +79,7 @@
"name": "{{ .name }}",
"logo": {
"@type": "ImageObject",
"url": "{{ .logo.url | absURL }}",
"url": "{{ .logo.url | relURL }}",
"width": {{ .logo.width }},
"height": {{ .logo.height }}
}
Expand Down

0 comments on commit 0591220

Please sign in to comment.