-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle relative non-root baseURL (#25)
This PR add support for non-root baseURL. By non-root, we mean URLs which are of the type example.com/path. Prior to this, one could only use either apex domain (also known as a root, bare, or naked domain) like example.com or subdomain like www.example.com for baseURL. Co-authored-by: Vladyslav Shurbin <2917600-kusyka911@users.noreply.gitlab.com>
- Loading branch information
Showing
32 changed files
with
129 additions
and
83 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<browserconfig> | ||
<msapplication> | ||
<tile> | ||
<square70x70logo src="{{ (resources.Get "/icons/mstile-70x70.png").RelPermalink }}"/> | ||
<square150x150logo src="{{ (resources.Get "/icons/mstile-150x150.png").RelPermalink }}"/> | ||
<square310x310logo src="{{ (resources.Get "/icons/mstile-310x310.png").RelPermalink }}"/> | ||
<wide310x150logo src="{{ (resources.Get "/icons/mstile-310x150.png").RelPermalink }}"/> | ||
<TileColor>{{ .TileColor | default "#2d89ef" }}</TileColor> | ||
</tile> | ||
</msapplication> | ||
</browserconfig> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "{{ .name }}", | ||
"short_name": "{{ .short_name }}", | ||
"start_url": "{{ .start_url }}", | ||
"theme_color": "{{ .theme_color }}", | ||
"background_color": "{{ .background_color }}", | ||
"display": "{{ .display }}", | ||
"icons": [ | ||
{ | ||
"src": "{{ (resources.Get "/icons/android-chrome-192x192.png").RelPermalink }}", | ||
"sizes": "192x192", | ||
"type": "image/png" | ||
}, | ||
{ | ||
"src": "{{ (resources.Get "/icons/android-chrome-512x512.png").RelPermalink }}", | ||
"sizes": "512x512", | ||
"type": "image/png" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{{ | ||
$ctx := merge (.Site.Params.browserconfig | default dict) | ||
(dict | ||
"TileColor" (.Site.Params.browserconfig.TileColor | default "#2d89ef" ) | ||
) | ||
}} | ||
<meta name="msapplication-config" content="{{ (resources.Get "icons/browserconfig.xml" | resources.ExecuteAsTemplate "browserconfig.xml" $ctx).RelPermalink }}"> | ||
<meta name="msapplication-TileColor" content="{{ $ctx.TileColor }}"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{{ define "partials/hugo-blog-awesome/manifest-background-color" }} | ||
{{ $bg := ""}} | ||
{{ if isset .Site.Params.webmanifest "background_color" }} | ||
{{ $bg = .Site.Params.webmanifest.background_color }} | ||
{{ else if eq .Site.Params.defaultColor "dark" }} | ||
{{ $bg = "#131418" }} | ||
{{ else }} | ||
{{ $bg = "#ffffff"}} | ||
{{ end}} | ||
{{ return $bg }} | ||
{{ end }} | ||
|
||
{{ $background_color := partial "hugo-blog-awesome/manifest-background-color" . }} | ||
|
||
{{ | ||
$ctx := merge (.Site.Params.webmanifest | default dict) | ||
(dict | ||
"name" (.Site.Params.webmanifest.name | default .Site.Params.sitename | default .Site.Title) | ||
"short_name" (.Site.Params.webmanifest.short_name | default .Site.Params.sitename | default .Site.Title) | ||
"start_url" (.Site.Params.webmanifest.start_url | default .Site.Home.Permalink) | ||
"theme_color" (.Site.Params.webmanifest.theme_color | default "#434648") | ||
"background_color" $background_color | ||
"display" (.Site.Params.webmanifest.display | default "standalone") | ||
) | ||
}} | ||
<link rel="manifest" href="{{ (resources.Get "icons/site.webmanifest" | resources.ExecuteAsTemplate "site.webmanifest" $ctx).Permalink }}"> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.