Browse Source

docs(config/_default): migrate deploy from s3_website to hugo deploy

http://localhost:1313/post/hugo-deploy-migrate-s3-website/
pull/198/head
Josh Habdas 2 years ago
parent
commit
bbda6c05c7
Signed by: jhabdas GPG Key ID: B148B31154C75A74
9 changed files with 217 additions and 193 deletions
  1. +0
    -1
      .gitignore
  2. +0
    -2
      docs/.gitignore
  3. +0
    -124
      docs/config.toml
  4. +60
    -0
      docs/config/_default/config.toml
  5. +25
    -0
      docs/config/_default/languages.toml
  6. +49
    -0
      docs/config/_default/menus.toml
  7. +20
    -0
      docs/config/_default/outputs.toml
  8. +63
    -0
      docs/config/_default/params.toml
  9. +0
    -66
      docs/s3_website.yml

+ 0
- 1
.gitignore View File

@ -1,3 +1,2 @@
.DS_Store
node_modules
data/npm

+ 0
- 2
docs/.gitignore View File

@ -1,5 +1,3 @@
.DS_Store
.env
public
resources
content/validate.md

+ 0
- 124
docs/config.toml View File

@ -1,124 +0,0 @@
#
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
#
# This file is part of After Dark.
#
# After Dark is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# After Dark is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
baseurl = "https://after-dark.habd.as/" # Controls base URL sitewide
title = "After Dark" # Homepage title and page title suffix
paginate = 37 # Number of items to show before paginating
copyright = "Copyright &copy; Josh Habdas. Licensed under <a target=\"_blank\" rel=\"external noopener license\" href=\"https://www.gnu.org/licenses/agpl.html\">AGPL-3.0-or-later</a>."
# Controls default theme and theme components
theme = [
"after-dark" # AGPL-3.0-or-later
]
disableLiveReload = false # Optional, set true to disable live reload
enableRobotsTXT = true # Suggested, enable robots.txt file
pygmentsCodefences = true # Suggested, highlight fenced code blocks
pygmentsUseClasses = true # Required for custom syntax highlighting
sectionPagesMenu = "main" # Enable menu system for lazy bloggers
footnoteReturnLinkContents = "↩" # Provides a nicer footnote return link
[languages.en]
languageCode = "en-US" # Controls site language
languageName = "English"
[languages.id]
languageCode = "id-ID" # Controls site language
languageName = "Indonesia"
[outputs]
home = ["HTML", "RSS", "JSON"]
[params]
description = "After Dark is free and open-source software you can use to create a website, blog or app." # Suggested, controls default description meta
author = "Josh Habdas" # Optional, controls author name display on posts
hide_author = true # Optional, set true to suppress author name on posts
has_cookies = false # Optional, set true to disable cookie disclaimer
disable_csp = true # Optional, set true to disable content security policy
images = [
"https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png"
] # Suggested, controls default Open Graph images
[params.layout.menu.main]
hidden = false # Optional, set false or remove to show section menu
[params.security.csp.directives]
workerSrc = [
"'self'",
"blob:"
]
connectSrc = [
"'self'",
"wss:",
"data:"
]
mediaSrc = [
"https://jhabdas.keybase.pub"
]
imgSrc = [
"'self'",
"data:",
"https://*.unsplash.com"
]
scriptSrc = [
"'self'",
"'unsafe-inline'",
"'unsafe-eval'",
"https:",
"'sha512-2t0yyNrUdtn9WGIoBVxq5vtoJQYfoDQDbqRPpOb75f1hiL39DGLdJKDrGP60fBhXfrFeKyVhzWJvHvLgln/ElA=='",
"'sha512-hno7WeTIciCJSjg/myjyK30HYkrcGCVwo4g4SpUalvrs3r2lS7bPNIQwbCNypKbg7BZ1sA4AsGnk6Gq4NOKpGA=='",
"'sha512-ISTAV0GadOIz/NXXHOS&#43;eCM0ysXVVHhQTlvA6LJxz/DeA5yIxm0Vqf5IE&#43;WH0yuuXkayAKtoZkQ326nch5f/fg=='",
"'sha512-/uSbYvALRP8DT0ll9zazZRCrY2NZuNudmKGLZF0AjiwYn7xJxM8dGpnaszOca4opMlgpVBgRh5tdAqxQCQ0qrA=='",
"'strict-dynamic'"
]
[params.seo.webmaster_verifications]
yandex = "4006a8813cbb9fdb" # https://webmaster.yandex.com/
[[menu.main]]
name = "Overview"
weight = 1
identifier = "home"
url = "/"
[[menu.main]]
name = "Features"
weight = 2
identifier = "feature"
url = "/feature/"
[[menu.main]]
name = "Modules"
weight = 3
identifier = "module"
url = "/module/"
[[menu.main]]
name = "Shortcodes"
weight = 4
identifier = "shortcode"
url = "/shortcode/"
[[menu.main]]
name = "Extras"
weight = 5
identifier = "extra"
url = "/extra/"
[[menu.main]]
name = "Search"
weight = 6
identifier = "search"
url = "/search/"

+ 60
- 0
docs/config/_default/config.toml View File

@ -0,0 +1,60 @@
#
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
#
# This file is part of After Dark.
#
# After Dark is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# After Dark is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
baseurl = "https://after-dark.habd.as/" # Controls base URL sitewide
title = "After Dark" # Homepage title and page title suffix
paginate = 37 # Number of items to show before paginating
copyright = "Copyright &copy; Josh Habdas. Licensed under <a target=\"_blank\" rel=\"external noopener license\" href=\"https://www.gnu.org/licenses/agpl.html\">AGPL-3.0-or-later</a>."
# Controls default theme and theme components
theme = [
"after-dark" # AGPL-3.0-or-later
]
disableLiveReload = false # Optional, set true to disable live reload
enableRobotsTXT = true # Suggested, enable robots.txt file
pygmentsCodefences = true # Suggested, highlight fenced code blocks
pygmentsUseClasses = true # Required for custom syntax highlighting
sectionPagesMenu = "main" # Enable menu system for lazy bloggers
footnoteReturnLinkContents = "↩" # Provides a nicer footnote return link
[deployment]
order = [".mp4", ".gif$", ".png$", ".jpg$", ".bpg$", ".svg$"]
[[deployment.targets]]
name = "s3-aws"
URL = "s3://after-dark.habd.as?region=us-east-1"
cloudFrontDistributionID = "E15C0TR21AL7CY"
[[deployment.matchers]]
pattern = "^.+\\.(js|css|svg|ttf|woff|woff2|eot|png|gif|pdf)$"
cacheControl = "max-age=630720000, no-transform, public"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(mp4|jpg|jpeg|bpg)$"
cacheControl = "max-age=630720000, no-transform, public" # cache static assets for 20 years
gzip = false
[[deployment.matchers]]
pattern = "^.+\\.(html|xml|json)$"
cacheControl = "max-age=300, no-transform, public" # cache output formats for 5 minutes
gzip = true

+ 25
- 0
docs/config/_default/languages.toml View File

@ -0,0 +1,25 @@
#
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
#
# This file is part of After Dark.
#
# After Dark is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# After Dark is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
[en]
languageCode = "en-US" # Controls site language
languageName = "English"
[id]
languageCode = "id-ID" # Controls site language
languageName = "Indonesia"

+ 49
- 0
docs/config/_default/menus.toml View File

@ -0,0 +1,49 @@
#
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
#
# This file is part of After Dark.
#
# After Dark is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# After Dark is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
[[main]]
name = "Overview"
weight = 1
identifier = "home"
url = "/"
[[main]]
name = "Features"
weight = 2
identifier = "feature"
url = "/feature/"
[[main]]
name = "Modules"
weight = 3
identifier = "module"
url = "/module/"
[[main]]
name = "Shortcodes"
weight = 4
identifier = "shortcode"
url = "/shortcode/"
[[main]]
name = "Extras"
weight = 5
identifier = "extra"
url = "/extra/"
[[main]]
name = "Search"
weight = 6
identifier = "search"
url = "/search/"

+ 20
- 0
docs/config/_default/outputs.toml View File

@ -0,0 +1,20 @@
#
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
#
# This file is part of After Dark.
#
# After Dark is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# After Dark is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
home = ["HTML", "RSS", "JSON"]

+ 63
- 0
docs/config/_default/params.toml View File

@ -0,0 +1,63 @@
#
# Copyright (C) 2019 Josh Habdas <jhabdas@protonmail.com>
#
# This file is part of After Dark.
#
# After Dark is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# After Dark is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
description = "After Dark is free and open-source software you can use to create a website, blog or app." # Suggested, controls default description meta
author = "Josh Habdas" # Optional, controls author name display on posts
hide_author = true # Optional, set true to suppress author name on posts
has_cookies = false # Optional, set true to disable cookie disclaimer
disable_csp = true # Optional, set true to disable content security policy
images = [
"https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png"
] # Suggested, controls default Open Graph images
[layout.menu.main]
hidden = false # Optional, set false or remove to show section menu
[security.csp.directives]
workerSrc = [
"'self'",
"blob:"
]
connectSrc = [
"'self'",
"wss:",
"data:"
]
mediaSrc = [
"https://jhabdas.keybase.pub"
]
imgSrc = [
"'self'",
"data:",
"https://*.unsplash.com"
]
scriptSrc = [
"'self'",
"'unsafe-inline'",
"'unsafe-eval'",
"https:",
"'sha512-2t0yyNrUdtn9WGIoBVxq5vtoJQYfoDQDbqRPpOb75f1hiL39DGLdJKDrGP60fBhXfrFeKyVhzWJvHvLgln/ElA=='",
"'sha512-hno7WeTIciCJSjg/myjyK30HYkrcGCVwo4g4SpUalvrs3r2lS7bPNIQwbCNypKbg7BZ1sA4AsGnk6Gq4NOKpGA=='",
"'sha512-ISTAV0GadOIz/NXXHOS&#43;eCM0ysXVVHhQTlvA6LJxz/DeA5yIxm0Vqf5IE&#43;WH0yuuXkayAKtoZkQ326nch5f/fg=='",
"'sha512-/uSbYvALRP8DT0ll9zazZRCrY2NZuNudmKGLZF0AjiwYn7xJxM8dGpnaszOca4opMlgpVBgRh5tdAqxQCQ0qrA=='",
"'strict-dynamic'"
]
[seo.webmaster_verifications]
yandex = "4006a8813cbb9fdb" # https://webmaster.yandex.com/

+ 0
- 66
docs/s3_website.yml View File

@ -1,66 +0,0 @@
s3_id: <%= ENV['S3_ACCESS_KEY_ID'] %>
s3_secret: <%= ENV['S3_SECRET_KEY'] %>
s3_bucket: after-dark.habd.as
# Below are examples of all the available configurations.
# See README for more detailed info on each of them.
site: public
index_document: index.html
error_document: 404.html
# cache static assets for 20 years
max_age:
"js/*": 630720000
"fonts/*": 630720000
"images/*": 630720000
"*": 300
gzip:
- .html
- .js
- .css
- .xml
# gzip_zopfli: true
# See http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region for valid endpoints
# s3_endpoint: ap-northeast-1
# ignore_on_server: that_folder_of_stuff_i_dont_keep_locally
# exclude_from_upload:
# - those_folders_of_stuff
# - i_wouldnt_want_to_upload
s3_reduced_redundancy: true
cloudfront_distribution_id: <%= ENV['CLOUDFRONT_DISTRIBUTION_ID'] %>
cloudfront_distribution_config:
default_cache_behavior:
min_ttl: <%= 60 * 60 * 24 %>
http_version: http2
aliases:
quantity: 1
items:
- after-dark.habd.as
# cloudfront_invalidate_root: true
cloudfront_wildcard_invalidation: true
# concurrency_level: 5
# redirects:
# index.php: /
# about.php: about.html
# music-files/promo.mp4: http://www.youtube.com/watch?v=dQw4w9WgXcQ
# routing_rules:
# - condition:
# key_prefix_equals: blog/some_path
# redirect:
# host_name: blog.example.com
# replace_key_prefix_with: some_new_path/
# http_redirect_code: 301

Loading…
Cancel
Save