From 7bd7a83100cf2c96b3f3dfa0b2433591c6534d69 Mon Sep 17 00:00:00 2001 From: Curtis Timson Date: Fri, 29 Mar 2019 15:03:46 +0000 Subject: Hugo Build Version in Code (#60) * Add .env file * Upgrade hugo version to 0.54.0 * Add netlify.toml to exampleSite * Update netlify.toml * Bump major version * Remove unused scripts section of package json * Add [context.branch-deploy.environment] * Move netlify.toml to root of repo * Add themesDir to configs * Remove theme property * Remove commented code * Readd theme property to config * Add build commands to code * Add themesDir to netlify command * Add hugo-theme-massively symlink * Update netlify command * Update netlify toml * Update min_version in theme toml --- README.md | 10 ++++++++++ exampleSite/config-prod.toml | 2 +- exampleSite/config.toml | 7 ++----- netlify.toml | 7 +++++++ package-lock.json | 2 +- package.json | 5 +---- theme.toml | 2 +- 7 files changed, 23 insertions(+), 12 deletions(-) create mode 100644 netlify.toml diff --git a/README.md b/README.md index b5ef9d5..c1e0cbd 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,20 @@ The cover image URL is hard-coded, therefore to replace this add an image to the ### Example Site Production Deployment + +#### Production Deployment + ``` $ hugo --config config-prod.toml ``` +#### Running Locally + +``` +$ hugo server --themesDir ../.. +``` + + ## Original Theme Credits - [Massively by HTML5 UP](https://html5up.net/massively) diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml index 6373b92..8be62f8 100644 --- a/exampleSite/config-prod.toml +++ b/exampleSite/config-prod.toml @@ -1,7 +1,7 @@ languageCode = "en-us" title = "Massively" baseURL = "https://hugo-theme-massively.netlify.com/" -theme = "../.." +theme = "hugo-theme-massively" googleanalytics = "" disqusShortname = "" diff --git a/exampleSite/config.toml b/exampleSite/config.toml index fc0dfba..c8cf5cc 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -1,7 +1,7 @@ languageCode = "en-us" title = "Massively" baseURL = "http://localhost:1313/" -theme = "../.." +theme = "hugo-theme-massively" googleanalytics = "" disqusShortname = "" @@ -14,7 +14,7 @@ disqusShortname = "" # foldername = "post" # pagesize = "6" # featuredpost = "true" - + [languages] [languages.en] languageName = "English" @@ -24,6 +24,3 @@ disqusShortname = "" #[languages.fr] # languageName = "Français" # title = "Massively - Version Française" - -# [params] -# DateFormat = "2.1.2006" \ No newline at end of file diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..6c869bb --- /dev/null +++ b/netlify.toml @@ -0,0 +1,7 @@ +[build] + publish = "exampleSite/public" + command = "cd exampleSite && hugo --gc --themesDir ../.. --config config-prod.toml" + +[build.environment] + HUGO_VERSION = "0.54.0" + HUGO_THEME = "repo" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0fb0cf9..b5edaf3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { "name": "hugo-theme-massively", - "version": "4.3.0", + "version": "5.0.0", "lockfileVersion": 1 } diff --git a/package.json b/package.json index db6f344..e54ee7e 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,8 @@ { "name": "hugo-theme-massively", - "version": "4.3.0", + "version": "5.0.0", "description": "HTML5 UP theme Massively for Hugo", "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, "repository": { "type": "git", "url": "git+https://github.com/curttimson/hugo-theme-massively.git" diff --git a/theme.toml b/theme.toml index f422033..12d4963 100644 --- a/theme.toml +++ b/theme.toml @@ -5,7 +5,7 @@ description = "An elegant open-source and mobile-first theme" homepage = "https://html5up.net/uploads/demos/massively/index.html" tags = ["blog", "html5up"] features = ["blog"] -min_version = 0.20 +min_version = "0.54.0" [author] name = "Curtis Timson" -- cgit v1.2.3