Browse Source

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

http://localhost:1313/post/hugo-deploy-migrate-s3-website/
Josh Habdas 2 months ago
parent
commit
bbda6c05c7
Signed by: Josh Habdas <jhabdas@protonmail.com> GPG Key ID: B148B31154C75A74

+ 0
- 1
.gitignore View File

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

+ 0
- 2
docs/.gitignore View File

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

+ 0
- 124
docs/config.toml View File

@@ -1,124 +0,0 @@
1
-#
2
-# Copyright (C) 2019  Josh Habdas <jhabdas@protonmail.com>
3
-#
4
-# This file is part of After Dark.
5
-#
6
-# After Dark is free software: you can redistribute it and/or modify
7
-# it under the terms of the GNU Affero General Public License as published
8
-# by the Free Software Foundation, either version 3 of the License, or
9
-# (at your option) any later version.
10
-#
11
-# After Dark is distributed in the hope that it will be useful,
12
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
-# GNU Affero General Public License for more details.
15
-#
16
-# You should have received a copy of the GNU Affero General Public License
17
-# along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
-#
19
-
20
-baseurl = "https://after-dark.habd.as/" # Controls base URL sitewide
21
-title = "After Dark" # Homepage title and page title suffix
22
-paginate = 37 # Number of items to show before paginating
23
-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>."
24
-
25
-# Controls default theme and theme components
26
-theme = [
27
-  "after-dark" # AGPL-3.0-or-later
28
-]
29
-
30
-disableLiveReload = false # Optional, set true to disable live reload
31
-enableRobotsTXT = true # Suggested, enable robots.txt file
32
-
33
-pygmentsCodefences = true # Suggested, highlight fenced code blocks
34
-pygmentsUseClasses = true # Required for custom syntax highlighting
35
-
36
-sectionPagesMenu = "main" # Enable menu system for lazy bloggers
37
-footnoteReturnLinkContents = "↩" # Provides a nicer footnote return link
38
-
39
-[languages.en]
40
-  languageCode = "en-US" # Controls site language
41
-  languageName = "English"
42
-[languages.id]
43
-  languageCode = "id-ID" # Controls site language
44
-  languageName = "Indonesia"
45
-
46
-[outputs]
47
-  home = ["HTML", "RSS", "JSON"]
48
-
49
-[params]
50
-  description = "After Dark is free and open-source software you can use to create a website, blog or app." # Suggested, controls default description meta
51
-  author = "Josh Habdas" # Optional, controls author name display on posts
52
-  hide_author = true # Optional, set true to suppress author name on posts
53
-  has_cookies = false # Optional, set true to disable cookie disclaimer
54
-  disable_csp = true # Optional, set true to disable content security policy
55
-  images = [
56
-    "https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png"
57
-  ] # Suggested, controls default Open Graph images
58
-
59
-[params.layout.menu.main]
60
-  hidden = false # Optional, set false or remove to show section menu
61
-
62
-[params.security.csp.directives]
63
-  workerSrc = [
64
-    "'self'",
65
-    "blob:"
66
-  ]
67
-  connectSrc = [
68
-    "'self'",
69
-    "wss:",
70
-    "data:"
71
-  ]
72
-  mediaSrc = [
73
-    "https://jhabdas.keybase.pub"
74
-  ]
75
-  imgSrc = [
76
-    "'self'",
77
-    "data:",
78
-    "https://*.unsplash.com"
79
-  ]
80
-  scriptSrc = [
81
-    "'self'",
82
-    "'unsafe-inline'",
83
-    "'unsafe-eval'",
84
-    "https:",
85
-    "'sha512-2t0yyNrUdtn9WGIoBVxq5vtoJQYfoDQDbqRPpOb75f1hiL39DGLdJKDrGP60fBhXfrFeKyVhzWJvHvLgln/ElA=='",
86
-    "'sha512-hno7WeTIciCJSjg/myjyK30HYkrcGCVwo4g4SpUalvrs3r2lS7bPNIQwbCNypKbg7BZ1sA4AsGnk6Gq4NOKpGA=='",
87
-    "'sha512-ISTAV0GadOIz/NXXHOS&#43;eCM0ysXVVHhQTlvA6LJxz/DeA5yIxm0Vqf5IE&#43;WH0yuuXkayAKtoZkQ326nch5f/fg=='",
88
-    "'sha512-/uSbYvALRP8DT0ll9zazZRCrY2NZuNudmKGLZF0AjiwYn7xJxM8dGpnaszOca4opMlgpVBgRh5tdAqxQCQ0qrA=='",
89
-    "'strict-dynamic'"
90
-  ]
91
-
92
-[params.seo.webmaster_verifications]
93
-  yandex = "4006a8813cbb9fdb" # https://webmaster.yandex.com/
94
-
95
-[[menu.main]]
96
-  name = "Overview"
97
-  weight = 1
98
-  identifier = "home"
99
-  url = "/"
100
-[[menu.main]]
101
-  name = "Features"
102
-  weight = 2
103
-  identifier = "feature"
104
-  url = "/feature/"
105
-[[menu.main]]
106
-  name = "Modules"
107
-  weight = 3
108
-  identifier = "module"
109
-  url = "/module/"
110
-[[menu.main]]
111
-  name = "Shortcodes"
112
-  weight = 4
113
-  identifier = "shortcode"
114
-  url = "/shortcode/"
115
-[[menu.main]]
116
-  name = "Extras"
117
-  weight = 5
118
-  identifier = "extra"
119
-  url = "/extra/"
120
-[[menu.main]]
121
-  name = "Search"
122
-  weight = 6
123
-  identifier = "search"
124
-  url = "/search/"

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

@@ -0,0 +1,60 @@
1
+#
2
+# Copyright (C) 2019  Josh Habdas <jhabdas@protonmail.com>
3
+#
4
+# This file is part of After Dark.
5
+#
6
+# After Dark is free software: you can redistribute it and/or modify
7
+# it under the terms of the GNU Affero General Public License as published
8
+# by the Free Software Foundation, either version 3 of the License, or
9
+# (at your option) any later version.
10
+#
11
+# After Dark is distributed in the hope that it will be useful,
12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+# GNU Affero General Public License for more details.
15
+#
16
+# You should have received a copy of the GNU Affero General Public License
17
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
+#
19
+
20
+baseurl = "https://after-dark.habd.as/" # Controls base URL sitewide
21
+title = "After Dark" # Homepage title and page title suffix
22
+paginate = 37 # Number of items to show before paginating
23
+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>."
24
+
25
+# Controls default theme and theme components
26
+theme = [
27
+  "after-dark" # AGPL-3.0-or-later
28
+]
29
+
30
+disableLiveReload = false # Optional, set true to disable live reload
31
+enableRobotsTXT = true # Suggested, enable robots.txt file
32
+
33
+pygmentsCodefences = true # Suggested, highlight fenced code blocks
34
+pygmentsUseClasses = true # Required for custom syntax highlighting
35
+
36
+sectionPagesMenu = "main" # Enable menu system for lazy bloggers
37
+footnoteReturnLinkContents = "↩" # Provides a nicer footnote return link
38
+
39
+[deployment]
40
+  order = [".mp4", ".gif$", ".png$", ".jpg$", ".bpg$", ".svg$"]
41
+
42
+[[deployment.targets]]
43
+  name = "s3-aws"
44
+  URL = "s3://after-dark.habd.as?region=us-east-1"
45
+  cloudFrontDistributionID = "E15C0TR21AL7CY"
46
+
47
+[[deployment.matchers]]
48
+  pattern = "^.+\\.(js|css|svg|ttf|woff|woff2|eot|png|gif|pdf)$"
49
+  cacheControl = "max-age=630720000, no-transform, public"
50
+  gzip = true
51
+
52
+[[deployment.matchers]]
53
+  pattern = "^.+\\.(mp4|jpg|jpeg|bpg)$"
54
+  cacheControl = "max-age=630720000, no-transform, public" # cache static assets for 20 years
55
+  gzip = false
56
+
57
+[[deployment.matchers]]
58
+  pattern = "^.+\\.(html|xml|json)$"
59
+  cacheControl = "max-age=300, no-transform, public" # cache output formats for 5 minutes
60
+  gzip = true

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

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

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

@@ -0,0 +1,49 @@
1
+#
2
+# Copyright (C) 2019  Josh Habdas <jhabdas@protonmail.com>
3
+#
4
+# This file is part of After Dark.
5
+#
6
+# After Dark is free software: you can redistribute it and/or modify
7
+# it under the terms of the GNU Affero General Public License as published
8
+# by the Free Software Foundation, either version 3 of the License, or
9
+# (at your option) any later version.
10
+#
11
+# After Dark is distributed in the hope that it will be useful,
12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+# GNU Affero General Public License for more details.
15
+#
16
+# You should have received a copy of the GNU Affero General Public License
17
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
+#
19
+
20
+[[main]]
21
+  name = "Overview"
22
+  weight = 1
23
+  identifier = "home"
24
+  url = "/"
25
+[[main]]
26
+  name = "Features"
27
+  weight = 2
28
+  identifier = "feature"
29
+  url = "/feature/"
30
+[[main]]
31
+  name = "Modules"
32
+  weight = 3
33
+  identifier = "module"
34
+  url = "/module/"
35
+[[main]]
36
+  name = "Shortcodes"
37
+  weight = 4
38
+  identifier = "shortcode"
39
+  url = "/shortcode/"
40
+[[main]]
41
+  name = "Extras"
42
+  weight = 5
43
+  identifier = "extra"
44
+  url = "/extra/"
45
+[[main]]
46
+  name = "Search"
47
+  weight = 6
48
+  identifier = "search"
49
+  url = "/search/"

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

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

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

@@ -0,0 +1,63 @@
1
+#
2
+# Copyright (C) 2019  Josh Habdas <jhabdas@protonmail.com>
3
+#
4
+# This file is part of After Dark.
5
+#
6
+# After Dark is free software: you can redistribute it and/or modify
7
+# it under the terms of the GNU Affero General Public License as published
8
+# by the Free Software Foundation, either version 3 of the License, or
9
+# (at your option) any later version.
10
+#
11
+# After Dark is distributed in the hope that it will be useful,
12
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
+# GNU Affero General Public License for more details.
15
+#
16
+# You should have received a copy of the GNU Affero General Public License
17
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
18
+#
19
+
20
+description = "After Dark is free and open-source software you can use to create a website, blog or app." # Suggested, controls default description meta
21
+author = "Josh Habdas" # Optional, controls author name display on posts
22
+hide_author = true # Optional, set true to suppress author name on posts
23
+has_cookies = false # Optional, set true to disable cookie disclaimer
24
+disable_csp = true # Optional, set true to disable content security policy
25
+images = [
26
+  "https://after-dark.habd.as/images/screenshots/after-dark-v6.15.0-homepage-fs8.png"
27
+] # Suggested, controls default Open Graph images
28
+
29
+[layout.menu.main]
30
+  hidden = false # Optional, set false or remove to show section menu
31
+
32
+[security.csp.directives]
33
+  workerSrc = [
34
+    "'self'",
35
+    "blob:"
36
+  ]
37
+  connectSrc = [
38
+    "'self'",
39
+    "wss:",
40
+    "data:"
41
+  ]
42
+  mediaSrc = [
43
+    "https://jhabdas.keybase.pub"
44
+  ]
45
+  imgSrc = [
46
+    "'self'",
47
+    "data:",
48
+    "https://*.unsplash.com"
49
+  ]
50
+  scriptSrc = [
51
+    "'self'",
52
+    "'unsafe-inline'",
53
+    "'unsafe-eval'",
54
+    "https:",
55
+    "'sha512-2t0yyNrUdtn9WGIoBVxq5vtoJQYfoDQDbqRPpOb75f1hiL39DGLdJKDrGP60fBhXfrFeKyVhzWJvHvLgln/ElA=='",
56
+    "'sha512-hno7WeTIciCJSjg/myjyK30HYkrcGCVwo4g4SpUalvrs3r2lS7bPNIQwbCNypKbg7BZ1sA4AsGnk6Gq4NOKpGA=='",
57
+    "'sha512-ISTAV0GadOIz/NXXHOS&#43;eCM0ysXVVHhQTlvA6LJxz/DeA5yIxm0Vqf5IE&#43;WH0yuuXkayAKtoZkQ326nch5f/fg=='",
58
+    "'sha512-/uSbYvALRP8DT0ll9zazZRCrY2NZuNudmKGLZF0AjiwYn7xJxM8dGpnaszOca4opMlgpVBgRh5tdAqxQCQ0qrA=='",
59
+    "'strict-dynamic'"
60
+  ]
61
+
62
+[seo.webmaster_verifications]
63
+  yandex = "4006a8813cbb9fdb" # https://webmaster.yandex.com/

+ 0
- 66
docs/s3_website.yml View File

@@ -1,66 +0,0 @@
1
-s3_id: <%= ENV['S3_ACCESS_KEY_ID'] %>
2
-s3_secret: <%= ENV['S3_SECRET_KEY'] %>
3
-s3_bucket: after-dark.habd.as
4
-
5
-# Below are examples of all the available configurations.
6
-# See README for more detailed info on each of them.
7
-
8
-site: public
9
-
10
-index_document: index.html
11
-error_document: 404.html
12
-
13
-# cache static assets for 20 years
14
-max_age:
15
-  "js/*": 630720000
16
-  "fonts/*": 630720000
17
-  "images/*": 630720000
18
-  "*": 300
19
-
20
-gzip:
21
-  - .html
22
-  - .js
23
-  - .css
24
-  - .xml
25
-# gzip_zopfli: true
26
-
27
-# See http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region for valid endpoints
28
-# s3_endpoint: ap-northeast-1
29
-
30
-# ignore_on_server: that_folder_of_stuff_i_dont_keep_locally
31
-
32
-# exclude_from_upload:
33
-#   - those_folders_of_stuff
34
-#   - i_wouldnt_want_to_upload
35
-
36
-s3_reduced_redundancy: true
37
-
38
-cloudfront_distribution_id: <%= ENV['CLOUDFRONT_DISTRIBUTION_ID'] %>
39
-
40
-cloudfront_distribution_config:
41
-  default_cache_behavior:
42
-    min_ttl: <%= 60 * 60 * 24 %>
43
-  http_version: http2
44
-  aliases:
45
-    quantity: 1
46
-    items:
47
-      - after-dark.habd.as
48
-
49
-# cloudfront_invalidate_root: true
50
-
51
-cloudfront_wildcard_invalidation: true
52
-
53
-# concurrency_level: 5
54
-
55
-# redirects:
56
-#   index.php: /
57
-#   about.php: about.html
58
-#   music-files/promo.mp4: http://www.youtube.com/watch?v=dQw4w9WgXcQ
59
-
60
-# routing_rules:
61
-#   - condition:
62
-#       key_prefix_equals: blog/some_path
63
-#     redirect:
64
-#       host_name: blog.example.com
65
-#       replace_key_prefix_with: some_new_path/
66
-#       http_redirect_code: 301

Loading…
Cancel
Save