refactor: split out Netlify module

Creates dedicated module for Netlify deployment:

github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify

See #2754
This commit is contained in:
Geo committed 2022-06-28 19:34:26 +01:00
1 parent e186f9b782
commit a1e764ece6
6 files changed
+43 -15

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# Wowchemy Plugin for Netlify
A build plugin to integrate your Hugo site seamlessly with Netlify.
The plugin automatically generates a `_headers` and `_redirects` file at the root of the public folder to configure [HTTP headers](https://www.netlify.com/docs/headers-and-basic-auth/) and [redirects](https://www.netlify.com/docs/redirects/) on Netlify.
By default, the plugin will help secure your site with some common security headers. You can easily add or replace headers through the plugin config.
## Install
1. Edit `config/_default/config.yaml` to install the `wowchemy-plugin-netlify` module:
```yaml
module:
imports:
- path: github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify
```
## Configure
- 📚 [View the **documentation**](https://wowchemy.com/docs/hugo-tutorials/security/)
@@ -0,0 +1,19 @@
module:
mounts:
- source: src/layouts
target: layouts
mediaTypes:
text/netlify:
delimiter: ''
suffixes: ['']
outputFormats:
headers:
baseName: _headers
isPlainText: true
mediatype: text/netlify
notAlternative: true
redirects:
baseName: _redirects
isPlainText: true
mediatype: text/netlify
notAlternative: true
+3
View File
@@ -0,0 +1,3 @@
module github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify
go 1.15
-15
View File
@@ -16,21 +16,6 @@ markup:
tableOfContents:
startLevel: 2
endLevel: 3
mediaTypes:
text/netlify:
delimiter: ''
suffixes: ['']
outputFormats:
headers:
baseName: _headers
isPlainText: true
mediatype: text/netlify
notAlternative: true
redirects:
baseName: _redirects
isPlainText: true
mediatype: text/netlify
notAlternative: true
sitemap:
changefreq: weekly
module: