diff --git a/.gitignore b/.gitignore index 37912fe..a3f12b7 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ __pycache__ result .hugo_build.lock +resources/_gen diff --git a/app/e11sync/settings.py b/app/e11sync/settings.py index ea03db4..8d0a3ea 100644 --- a/app/e11sync/settings.py +++ b/app/e11sync/settings.py @@ -114,10 +114,9 @@ STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.AppDirectoriesFinder", ] -_storage = 'django.contrib.staticfiles.storage' STORAGES = { "staticfiles": { - "BACKEND": _storage + ".ManifestStaticFilesStorage", + "BACKEND": 'lib.staticfiles.ManifestStaticFilesStorageSha256' }, } diff --git a/app/lib/staticfiles.py b/app/lib/staticfiles.py new file mode 100644 index 0000000..48a50ee --- /dev/null +++ b/app/lib/staticfiles.py @@ -0,0 +1,17 @@ +from hashlib import sha256 + +from django.contrib.staticfiles.storage import ManifestStaticFilesStorage + + +class ManifestStaticFilesStorageSha256(ManifestStaticFilesStorage): + def file_hash(self, name, content=None): + """ + Return a hash of the file with the given name and optional content. + """ + if content is None: + return None + hasher = sha256(usedforsecurity=False) + for chunk in content.chunks(): + hasher.update(chunk) + return hasher.hexdigest() + diff --git a/blog/assets/grids-responsive.css b/blog/assets/grids-responsive.css new file mode 120000 index 0000000..a7d8bf1 --- /dev/null +++ b/blog/assets/grids-responsive.css @@ -0,0 +1 @@ +../../static/grids-responsive.css \ No newline at end of file diff --git a/blog/assets/pure.css b/blog/assets/pure.css new file mode 120000 index 0000000..1e0a97e --- /dev/null +++ b/blog/assets/pure.css @@ -0,0 +1 @@ +../../static/pure.css \ No newline at end of file diff --git a/blog/assets/style.scss b/blog/assets/style.scss new file mode 120000 index 0000000..8bc72e7 --- /dev/null +++ b/blog/assets/style.scss @@ -0,0 +1 @@ +../../static/style.scss \ No newline at end of file diff --git a/blog/config.yaml b/blog/config.yaml index a606a84..05d5471 100644 --- a/blog/config.yaml +++ b/blog/config.yaml @@ -6,11 +6,11 @@ author: Motiejus Jakštys Menus: main: - Name: Sign Up - URL: / + URL: ../ - Name: Blog - URL: /blog/ + URL: / - Name: Contact - URL: /contact/ + URL: ../contact/ permalinks: log: '/:year/:slug/' Params: diff --git a/blog/content/contact.md b/blog/content/contact.md new file mode 100644 index 0000000..35df990 --- /dev/null +++ b/blog/content/contact.md @@ -0,0 +1,9 @@ +--- +title: "Contact" +description: "11sync.net contact details" +--- + +- **Email**: [hello@11sync.net](mailto:hello@11sync.net) +- **Libera.chat**: [#11sync on Libera Chat](https://web.libera.chat/#11sync) + +Unless otherwise stated, ©Motiejus Jakštys. [CC-BY-ND-4.0](https://creativecommons.org/licenses/by-nd/4.0/). diff --git a/blog/themes/default/layouts/_default/baseof.html b/blog/themes/default/layouts/_default/baseof.html index 57d8a74..6f53c04 100644 --- a/blog/themes/default/layouts/_default/baseof.html +++ b/blog/themes/default/layouts/_default/baseof.html @@ -4,7 +4,7 @@ {{ partial "html-meta.html" . -}}