module: update & fix update script

Update script now reads the Wowchemy module's config.yaml rather than config.toml
This commit is contained in:
George Cushen 2020-11-05 23:40:06 +00:00
parent 9e4469443a
commit 4e0577f52a
6 changed files with 25 additions and 31 deletions

View file

@ -1,5 +1,5 @@
# Configuration of Hugo # Configuration of Hugo
# Guide: https://sourcethemes.com/academic/docs/get-started/ # Guide: https://wowchemy.com/docs/get-started/
# Hugo Documentation: https://gohugo.io/getting-started/configuration/#all-configuration-settings # Hugo Documentation: https://gohugo.io/getting-started/configuration/#all-configuration-settings
# #
# This file is formatted using TOML syntax - learn more at https://learnxinyminutes.com/docs/toml/ # This file is formatted using TOML syntax - learn more at https://learnxinyminutes.com/docs/toml/
@ -10,7 +10,7 @@ title = "Academic"
# The URL of your site. # The URL of your site.
# End your URL with a `/` trailing slash, e.g. `https://example.com/`. # End your URL with a `/` trailing slash, e.g. `https://example.com/`.
baseurl = "/" baseurl = ""
# Enter a copyright notice to display in the site footer. # Enter a copyright notice to display in the site footer.
# To display a copyright symbol, type `©`. For current year, type `{year}`. # To display a copyright symbol, type `©`. For current year, type `{year}`.
@ -47,13 +47,6 @@ ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "
home = [ "HTML", "RSS", "JSON", "WebAppManifest" ] home = [ "HTML", "RSS", "JSON", "WebAppManifest" ]
section = [ "HTML", "RSS" ] section = [ "HTML", "RSS" ]
[mediaTypes."application/manifest+json"]
suffixes = ["webmanifest"]
[outputFormats.WebAppManifest]
mediaType = "application/manifest+json"
rel = "manifest"
# Configure the Markdown renderer. # Configure the Markdown renderer.
[markup] [markup]
defaultMarkdownHandler = "goldmark" defaultMarkdownHandler = "goldmark"
@ -68,7 +61,7 @@ ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "
[imaging] [imaging]
resampleFilter = "lanczos" resampleFilter = "lanczos"
quality = 90 quality = 75
anchor = "smart" # Anchor for cropping. Options include Smart and Center. anchor = "smart" # Anchor for cropping. Options include Smart and Center.
# Taxonomies. # Taxonomies.

View file

@ -29,8 +29,8 @@
weight = 60 weight = 60
# Link to a PDF of your resume/CV from the menu. # Link to a PDF of your resume/CV from the menu.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below. # To enable, copy your resume/CV to `static/media/cv.pdf` and uncomment the lines below.
# [[main]] # [[main]]
# name = "CV" # name = "CV"
# url = "files/cv.pdf" # url = "media/cv.pdf"
# weight = 70 # weight = 70

View file

@ -1,17 +1,17 @@
# SITE SETUP # SITE SETUP
# Guide: https://sourcethemes.com/academic/docs/get-started/ # Guide: https://wowchemy.com/docs/get-started/
# Documentation: https://sourcethemes.com/academic/docs/ # Documentation: https://wowchemy.com/docs/
# #
# This file is formatted using TOML syntax - learn more at https://learnxinyminutes.com/docs/toml/ # This file is formatted using TOML syntax - learn more at https://learnxinyminutes.com/docs/toml/
# Each configuration section is defined by a name in square brackets (e.g. `[search]`). # Each config section after this section is defined by a name in square brackets (e.g. `[search]`).
############################ ############################
## Theme ## Theme
############################ ############################
# Choose a theme. # Choose a theme.
# Latest themes (may require updating): https://sourcethemes.com/academic/themes/ # Guide to color themes: https://wowchemy.com/docs/customization/#color-themes
# Browse built-in themes in `themes/academic/data/themes/` # Browse the latest built-in font sets at https://github.com/wowchemy/wowchemy-hugo-modules/tree/master/wowchemy/themes/
# Browse user installed themes in `data/themes/` # Browse user installed themes in `data/themes/`
theme = "minimal" theme = "minimal"
@ -19,8 +19,8 @@ theme = "minimal"
day_night = true day_night = true
# Override the theme's font set (optional). # Override the theme's font set (optional).
# Latest font sets (may require updating): https://sourcethemes.com/academic/themes/ # Guide to font sets: https://wowchemy.com/docs/customization/#fonts
# Browse built-in font sets in `themes/academic/data/fonts/` # Browse the latest built-in font sets at https://github.com/wowchemy/wowchemy-hugo-modules/tree/master/wowchemy/data/fonts
# Browse user installed font sets in `data/fonts/` # Browse user installed font sets in `data/fonts/`
font = "" font = ""
@ -55,7 +55,7 @@ description = ""
############################ ############################
# Enable source code highlighting? true/false # Enable source code highlighting? true/false
# Documentation: https://sourcethemes.com/academic/docs/writing-markdown-latex/#highlighting-options # Documentation: https://wowchemy.com/docs/writing-markdown-latex/#highlighting-options
highlight = true highlight = true
highlight_languages = ["r"] # Add support for highlighting additional languages highlight_languages = ["r"] # Add support for highlighting additional languages
# highlight_style = "github" # For supported styles, see https://cdnjs.com/libraries/highlight.js/ # highlight_style = "github" # For supported styles, see https://cdnjs.com/libraries/highlight.js/
@ -75,10 +75,10 @@ privacy_pack = false
# Enable visitors to edit pages? # Enable visitors to edit pages?
# `repo` defines the repository URL. `editable` defines which page types can be edited. # `repo` defines the repository URL. `editable` defines which page types can be edited.
edit_page = {repo_url = "https://github.com/gcushen/hugo-academic", content_dir = "", repo_branch = "master", editable = {docs = true, page = false, post = false}} edit_page = {repo_url = "", content_dir = "", repo_branch = "main", editable = {page = false, post = false, book = false}}
# Show related content at the bottom of pages? # Show related content at the bottom of pages?
show_related = {docs = true, page = false, post = true, project = true, publication = true, talk = true} show_related = {book = true, page = false, post = true, project = true, publication = true, talk = true}
############################ ############################
## Contact details ## Contact details
@ -133,7 +133,7 @@ twitter = ""
## Regional Settings ## Regional Settings
############################ ############################
# Date and time format (refer to https://sourcethemes.com/academic/docs/customization/#date-format ) # Date and time format (refer to https://wowchemy.com/docs/customization/#date-format )
# Examples: "Mon, Jan 2, 2006" or "2006-01-02" # Examples: "Mon, Jan 2, 2006" or "2006-01-02"
date_format = "Jan 2, 2006" date_format = "Jan 2, 2006"
# Examples: "3:04 pm" or "15:04" # Examples: "3:04 pm" or "15:04"
@ -185,7 +185,7 @@ plugins_js = []
# Configuration of publication pages. # Configuration of publication pages.
[publications] [publications]
# Date format (refer to https://sourcethemes.com/academic/docs/customization/#date-format ) # Date format (refer to https://wowchemy.com/docs/customization/#date-format )
# Examples: "Mon, Jan 2, 2006" or "2006-01-02" # Examples: "Mon, Jan 2, 2006" or "2006-01-02"
date_format = "January 2006" date_format = "January 2006"
@ -277,11 +277,11 @@ plugins_js = []
## Content Management System ## Content Management System
############################ ############################
[cms] [cms]
# See https://sourcethemes.com/academic/docs/install/#install-with-web-browser # See https://wowchemy.com/docs/install/
netlify_cms = true netlify_cms = true
############################ ############################
## Icon Pack Extensions ## Icon Pack Extensions
############################ ############################
[icon.pack] [icon.pack]
ai = false # Academicons icon pack https://jpswalsh.github.io/academicons/ ai = true # Academicons icon pack https://jpswalsh.github.io/academicons/

2
go.mod
View file

@ -4,5 +4,5 @@ go 1.15
require ( require (
github.com/wowchemy/wowchemy-hugo-modules/netlify-cms-academic v0.0.0-20201016182837-be0fa17ac006 // indirect github.com/wowchemy/wowchemy-hugo-modules/netlify-cms-academic v0.0.0-20201016182837-be0fa17ac006 // indirect
github.com/wowchemy/wowchemy-hugo-modules/wowchemy v0.0.0-20201016182837-be0fa17ac006 // indirect github.com/wowchemy/wowchemy-hugo-modules/wowchemy v0.0.0-20201102170205-80fce98e72a9
) )

3
go.sum
View file

@ -1,2 +1,3 @@
github.com/wowchemy/wowchemy-hugo-modules/netlify-cms-academic v0.0.0-20201016182837-be0fa17ac006/go.mod h1:TU3QDPUdBSQnvDP5QVCwjAkBIdVMS/bKFA8jr3eI5AY= github.com/wowchemy/wowchemy-hugo-modules/netlify-cms-academic v0.0.0-20201016182837-be0fa17ac006/go.mod h1:TU3QDPUdBSQnvDP5QVCwjAkBIdVMS/bKFA8jr3eI5AY=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy v0.0.0-20201016182837-be0fa17ac006/go.mod h1:H22qfH9qj3FWwsk7+bAZpmT24yRGNQURah2/IRwjbn8= github.com/wowchemy/wowchemy-hugo-modules/wowchemy v0.0.0-20201102170205-80fce98e72a9 h1:Xlur4C1LriYTITcDsTo5Sl/eyxyspJhccS0EYXcRacA=
github.com/wowchemy/wowchemy-hugo-modules/wowchemy v0.0.0-20201102170205-80fce98e72a9/go.mod h1:H22qfH9qj3FWwsk7+bAZpmT24yRGNQURah2/IRwjbn8=

View file

@ -24,8 +24,8 @@ function update_wowchemy () {
function update_netlify () { function update_netlify () {
# - Update Netlify.toml with required Hugo version # - Update Netlify.toml with required Hugo version
if [ -f ./netlify.toml ]; then if [ -f ./netlify.toml ]; then
curl -o "tmp_get_version" https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/master/wowchemy/config.toml curl -o "tmp_get_version" https://raw.githubusercontent.com/wowchemy/wowchemy-hugo-modules/master/wowchemy/config.yaml
version=$(sed -n 's/^[[:space:]]*min = //p' "tmp_get_version" | tr -d '"') version=$(sed -n 's/^[[:space:]]*min: //p' "tmp_get_version" | tr -d "'")
version="${version}" version="${version}"
echo "Set Netlify Hugo version to v${version}" echo "Set Netlify Hugo version to v${version}"
sed -i.bak -e "s/HUGO_VERSION = .*/HUGO_VERSION = \"$version\"/g" ./netlify.toml && rm -f ./netlify.toml.bak sed -i.bak -e "s/HUGO_VERSION = .*/HUGO_VERSION = \"$version\"/g" ./netlify.toml && rm -f ./netlify.toml.bak
@ -38,7 +38,7 @@ update_wowchemy
update_netlify update_netlify
echo echo
echo "If there are breaking changes, the config and/or front matter of content" \ echo "If there are breaking changes, the site structure, config, and/or front matter of content" \
"may need upgrading by following the steps in the relevant consecutive release notes." "may need upgrading by following the steps in the relevant consecutive release notes."
echo echo
echo "View the update guide at: https://wowchemy.com/docs/update/" echo "View the update guide at: https://wowchemy.com/docs/update/"