Add support for using as a Hugo module (#534)
* Add support for using as a Hugo module
Fixes #502
* Don't need/want the theme directory with modules
* Fix go.{mod,sum} files
* Set go version and hugo version everywhere
Co-authored-by: Luiz F. A. de Prá <luizdepra@users.noreply.github.com>
4 files modified
5 files added
| | |
| | | - [Ziwei Pan](https://github.com/PanZiwei/) |
| | | - [Viktar Patotski](https://github.com/xp-vit) |
| | | - [cuso4-5h2o](https://www.cuso4.me) |
| | | - [freeformz](https://icanhazdowntime.org) |
| New file |
| | |
| | | baseURL = "https://example.com/" |
| | | |
| | | [module] |
| | | [module.hugoVersion] |
| | | min = "0.77.0" |
| | |
| | | baseURL = "http://www.example.com" |
| | | title = "johndoe" |
| | | theme = "hugo-coder" |
| | | languageCode = "en" |
| | | defaultContentLanguage = "en" |
| | | paginate = 20 |
| | |
| | | # Enable Disqus comments |
| | | # disqusShortname = "yourdiscussshortname" |
| | | |
| | | [module] |
| | | [[module.imports]] |
| | | path = "github.com/luizdepra/hugo-coder" |
| | | |
| | | [params] |
| | | author = "John Doe" |
| | | description = "John Doe's personal website" |
| New file |
| | |
| | | module github.com/luizdepra/exampleSite |
| | | |
| | | go 1.16 |
| | | |
| | | require github.com/luizdepra/hugo-coder v0.0.0-20210316001240-32ffc536aa93 // indirect |
| New file |
| | |
| | | github.com/luizdepra/hugo-coder v0.0.0-20210316001240-32ffc536aa93 h1:mTXlzQ5p3ancH7W300Bur7PDScXd2ZKqEdZBM3TTQTE= |
| | | github.com/luizdepra/hugo-coder v0.0.0-20210316001240-32ffc536aa93/go.mod h1:6nu/OxeF5LLM5MBhpzTM40kZi80qCHPm2IXxHI0H+KA= |
| New file |
| | |
| | | module github.com/luizdepra/hugo-coder |
| | | |
| | | go 1.16 |
| | |
| | | [build] |
| | | HUGO_VERSION = "0.77.0" |
| | | HUGO_THEME = "repo" |
| | | GO_VERSION = "1.16.2" |
| | | publish = "exampleSite/public" |
| | | command = "cd exampleSite && hugo --themesDir=../.. --baseURL $URL" |
| | | |
| | | [context.production.environment] |
| | | HUGO_VERSION = "0.73.0" |
| | | HUGO_THEME = "repo" |
| | | |
| | | [context.deploy-preview] |
| | | command = "cd exampleSite && hugo --themesDir=../.. --buildFuture --buildDrafts --baseURL $DEPLOY_PRIME_URL" |
| | | |
| | | [context.deploy-preview.environment] |
| | | HUGO_VERSION = "0.73.0" |
| | | HUGO_THEME = "repo" |
| | |
| | | "single-column", |
| | | "syntax-highlighting" |
| | | ] |
| | | min_version = "0.73.0" |
| | | min_version = "0.77.0" |
| | | |
| | | [author] |
| | | name = "Luiz F. A. de Prá" |