Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Commit

Permalink
Use relative URLs for better preview when testing locally
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Schwartz <alexander.schwartz@gmx.net>
  • Loading branch information
ahus1 authored and chrisguindon committed Apr 7, 2021
1 parent df50dba commit d3e1862
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions layouts/partials/footer.html
Expand Up @@ -75,14 +75,14 @@ <h2 class="section-title">{{ i18n "footer-other-section-text" }}</h2>
</footer>
<!-- Placed at the end of the document so the pages load faster -->
{{- with .Site.Params.js | default "https://www.eclipse.org/eclipse.org-common/themes/solstice/public/javascript/main.min.js"}}
<script src="{{ . | absURL }}"></script>
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ if isset .Site.Params "hugo_js" }}
{{- with .Site.Params.hugo_js }}
<script src="{{ . | absURL }}"></script>
<script src="{{ . | relURL }}"></script>
{{ end }}
{{ else }}
<script src="{{ "/js/solstice.hugo.js" | absURL }}"></script>
<script src="{{ "/js/solstice.hugo.js" | relURL }}"></script>
{{ end }}

<!-- Read in mustache templates registered in page scratch -->
Expand Down
10 changes: 5 additions & 5 deletions layouts/partials/head.html
Expand Up @@ -33,12 +33,12 @@
{{- end }}
<meta name="author" content="{{ .Site.Author.name }}"/>
{{- with .Params.page_favicon | default .Site.Params.favicon | default "https://www.eclipse.org/favicon.ico"}}
<link href='{{ . | absURL }}' rel='icon' type='image/x-icon'/>
<link href='{{ . | relURL }}' rel='icon' type='image/x-icon'/>
{{- end -}}
<!-- Social Media Tags -->
{{- with .Params.share_img | default .Params.image | default .Site.Params.share_img | default .Site.Params.logo }}
<meta property="og:image" content="{{ . | absURL }}" />
<meta name="twitter:image" content="{{ . | absURL }}" />
<meta property="og:image" content="{{ . | relURL }}" />
<meta name="twitter:image" content="{{ . | relURL }}" />
{{- end }}
<meta name="twitter:card" content="summary" />
{{- with .Site.Author.twitter }}
Expand All @@ -63,8 +63,8 @@
{{ end }}
{{ if ne .Page.Params.disable_css "true" }}
{{- with .Site.Params.styles | default "https://eclipse.org/eclipse.org-common/themes/solstice/public/stylesheets/quicksilver.min.css" }}
<link rel="stylesheet" href="{{ . | absURL }}">
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}
{{- end }}
{{- partial "google_tag_manager.html" . }}
{{- partial "head_variables.html" . }}
{{- partial "head_variables.html" . }}
2 changes: 1 addition & 1 deletion layouts/partials/nav_toggle.html
Expand Up @@ -36,7 +36,7 @@
{{ end }}

<a class="navbar-brand visible-xs" title="{{ $currentPageLogoTitle }}" href="{{ $currentPageLogoLink | absLangURL }}">
<img width="{{ $.Page.Params.logo_width | default $.Site.Params.logo_width | default "140"}}" class="logo-eclipse-default-mobile img-responsive" src="{{ $currentPageLogo | absURL }}" alt="{{ $currentPageLogoTitle }}" />
<img width="{{ $.Page.Params.logo_width | default $.Site.Params.logo_width | default "140"}}" class="logo-eclipse-default-mobile img-responsive" src="{{ $currentPageLogo | relURL }}" alt="{{ $currentPageLogoTitle }}" />
</a>
{{ end }}
</div>
Expand Down
6 changes: 3 additions & 3 deletions layouts/partials/navbar.html
Expand Up @@ -59,7 +59,7 @@
{{ end }}

<a title="{{ $currentPageLogoTitle }}" href="{{ $currentPageLogoLink | absLangURL }}">
<img width="{{ $.Page.Params.logo_width | default $.Site.Params.logo_width | default "140"}}" class="logo-eclipse-default img-responsive hidden-xs" src="{{ $currentPageLogo | absURL }}" alt="{{ $currentPageLogoTitle }}" />
<img width="{{ $.Page.Params.logo_width | default $.Site.Params.logo_width | default "140"}}" class="logo-eclipse-default img-responsive hidden-xs" src="{{ $currentPageLogo | relURL }}" alt="{{ $currentPageLogoTitle }}" />
</a>
{{ end }}

Expand All @@ -76,7 +76,7 @@
{{ $normalized_cta_url = printf "%s/" $normalized_cta_url }}
{{ end }}

{{ $abs_cfa := printf "%s" ($normalized_cta_url | absURL) }}
{{ $abs_cfa := printf "%s" ($normalized_cta_url | relURL) }}
{{ $is_cfa_page := 0 }}
{{ if or (eq $normalized_cta_url .Permalink) (eq $abs_cfa .Permalink) }}
{{ $is_cfa_page = 1 }}
Expand All @@ -97,4 +97,4 @@
</div>
</div>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions layouts/shortcodes/eclipsefdn_adopters.html
Expand Up @@ -14,7 +14,7 @@
{{ $ul_classes := .Get "ul_classes" | default "text-center list-inline" }}

<div id="{{ $container_id }}" class="{{ $class }}"></div>
<script src="{{ "js/eclipsefdn.adopters.js" | absURL}}"></script>
<script src="{{ "js/eclipsefdn.adopters.js" | relURL}}"></script>
<script>
eclipseFdnAdopters.getWGList({src_root: "https://api.eclipse.org/adopters", working_group: "{{ $working_group }}", ul_classes: "{{ $ul_classes }}"})
</script>
</script>

0 comments on commit d3e1862

Please sign in to comment.