refactor: reflect renamed default branch

site.Params.edit_page.repo_branch will now also default to `main` if unset.
This commit is contained in:
George Cushen 2021-02-19 09:04:29 +00:00
commit f37581febe
9 changed files with 13 additions and 13 deletions

2
.github/stale.yml vendored
View file

@ -15,7 +15,7 @@ staleLabel: stale
markComment: |
This issue has been automatically marked as stale because it has not had any recent activity. The resources of the project maintainers are limited, and so we are asking for your help.
If this is a **bug** and you can still reproduce this error on the <code>master</code> branch, consider contributing a Pull Request with a fix.
If this is a **bug** and you can still reproduce this error on the <code>main</code> branch, consider contributing a Pull Request with a fix.
If this is a **feature request**, and you feel that it is still relevant and valuable, please tell us why or contribute a Pull Request for review.

View file

@ -3,10 +3,10 @@ name: Continuous Integration
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
build:

View file

@ -13,10 +13,10 @@ name: "CodeQL"
on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]
schedule:
- cron: '27 23 * * 5'

View file

@ -34,7 +34,7 @@ To help us develop this template and software sustainably under the MIT license,
## Features
[![Screenshot](https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/master/academic.png)](https://wowchemy.com)
[![Screenshot](https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/main/academic.png)](https://wowchemy.com)
**Key features:**
@ -60,7 +60,7 @@ Wowchemy comes with **automatic day (light) and night (dark) mode** built-in. Al
Choose a stunning theme for your site and [customize it](https://wowchemy.com/docs/customization/#custom-theme) to your liking:
[![Themes](https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/master/themes.png)](https://wowchemy.com/templates/)
[![Themes](https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/main/themes.png)](https://wowchemy.com/templates/)
[Browse more templates and themes...](https://wowchemy.com/templates/)
@ -76,6 +76,6 @@ Feel free to _star_ the project on [Github](https://github.com/wowchemy/wowchemy
Copyright 2016-present [George Cushen](https://georgecushen.com).
Released under the [MIT](https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/LICENSE.md) license.
Released under the [MIT](https://github.com/wowchemy/wowchemy-hugo-modules/blob/main/LICENSE.md) license.
[![Analytics](https://ga-beacon.appspot.com/UA-78646709-2/wowchemy-hugo-modules/readme?pixel)](https://github.com/igrigorik/ga-beacon)

View file

@ -2,7 +2,7 @@
* Wowchemy: The Website Builder for Hugo
* Designed by @GeorgeCushen
* https://wowchemy.com/
* License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/LICENSE.md
* License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/main/LICENSE.md
**************************************************/
@import 'helpers/all';

View file

@ -11,7 +11,7 @@
{{/* Initialise Wowchemy. */}}
{{ $js_license := printf "/*! Wowchemy v%s | https://wowchemy.com/ */\n" site.Data.wowchemy.version }}
{{ $js_license := $js_license | printf "%s/*! Copyright 2016-present George Cushen (https://georgecushen.com/) */\n" }}
{{ $js_license := $js_license | printf "%s/*! License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/LICENSE.md */\n" }}
{{ $js_license := $js_license | printf "%s/*! License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/main/LICENSE.md */\n" }}
{{ $js_bundle_head := $js_license | resources.FromString "js/bundle-head.js" }}
{{ $wcDarkLightEnabled := site.Params.day_night | default false }}
{{ $wcIsSiteThemeDark := not (.Scratch.Get "light") | default false }}

View file

@ -11,7 +11,7 @@
{{ $content_dir = cond site.IsMultiLingual (cond (ne .Site.LanguagePrefix "") (printf "%s%s" $content_dir .Site.LanguagePrefix) $content_dir) $content_dir }}
{{end}}
<p class="edit-page">
<a href="{{site.Params.edit_page.repo_url}}/edit/{{site.Params.edit_page.repo_branch | default "master"}}/{{$content_dir}}/{{.File.Path}}">
<a href="{{site.Params.edit_page.repo_url}}/edit/{{site.Params.edit_page.repo_branch | default "main"}}/{{$content_dir}}/{{.File.Path}}">
<i class="fas fa-pen pr-2"></i>{{ i18n "edit_page" | default "Edit this page" }}
</a>
</p>

View file

@ -158,7 +158,7 @@
{{ $license := printf "/*! Wowchemy v%s | https://wowchemy.com/ */\n" site.Data.wowchemy.version }}
{{ $license := $license | printf "%s/*! Copyright 2016-present George Cushen (https://georgecushen.com/) */\n" }}
{{ $license := $license | printf "%s/*! License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/LICENSE.md */\n" }}
{{ $license := $license | printf "%s/*! License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/main/LICENSE.md */\n" }}
{{ $css_bundle_head := $license | resources.FromString "css/bundle-head.css" }}
{{ $css_options := dict "targetPath" "css/wowchemy.css" }}
{{- if hugo.IsProduction -}}

View file

@ -120,7 +120,7 @@
{{ $js_license := printf "/*! Wowchemy v%s | https://wowchemy.com/ */\n" site.Data.wowchemy.version }}
{{ $js_license := $js_license | printf "%s/*! Copyright 2016-present George Cushen (https://georgecushen.com/) */\n" }}
{{ $js_license := $js_license | printf "%s/*! License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/master/LICENSE.md */\n" }}
{{ $js_license := $js_license | printf "%s/*! License: https://github.com/wowchemy/wowchemy-hugo-modules/blob/main/LICENSE.md */\n" }}
{{ $js_bundle_head := $js_license | resources.FromString "js/bundle-head.js" }}
{{ $js_params := dict "hugoEnvironment" hugo.Environment "codeHighlighting" ($scr.Get "highlight_enabled" | default false) "searchEnabled" (in (slice "wowchemy" "algolia") $search_provider) }}
{{ $js_academic := resources.Get "js/wowchemy.js" | js.Build (dict "targetPath" (printf "%s/js/wow-core.js" .Lang ) "params" $js_params) }}