diff --git a/blog/config.toml b/blog/config.toml index 951d3ba..ecada08 100644 --- a/blog/config.toml +++ b/blog/config.toml @@ -1,5 +1,5 @@ baseURL = "http://example.org/" -title = "Tech blog" +title = "panaetius.io" theme = "hugo-theme-chunky-poster" paginate = 2 languageCode = "en" @@ -15,6 +15,12 @@ name = "Home" url = "/" weight = 10 +[[menu.main]] +identifier = "about" +name = "About" +url = "/about/" +weight = 0 + [taxonomies] category = "categories" tag = "tags" @@ -23,15 +29,21 @@ author = "authors" [params] author = "Daniel Tomlinson" -description = "Lorem ipsum dolor sit amets. Lorem ipsum dolor sit amets." - homepageImage = "/images/homepage.svg" +description = "Tech blog showcasing Python" +homepageImage = "/images/homepage.svg" share = true showLanguageSwitcher = false +# Custom CSS and JS. Relative to /static/css and /static/js respectively. +customCSS = [] +customJS = [] [params.prismJS] enable = true -# theme = "nord" +# theme = "nord" [params.commento] enable = true url = "https://commento.panaetius.co.uk/js/commento.js" + +[imaging] +resampleFilter = "Lanczos" diff --git a/blog/content/about.md b/blog/content/about.md new file mode 100644 index 0000000..7b4bc91 --- /dev/null +++ b/blog/content/about.md @@ -0,0 +1,7 @@ +--- +title: 'Our Difference' +button: 'About us' +weight: 2 +--- + +Lorem ipsum dolor sit amet, et essent mediocritatem quo, choro volumus oporteat an mei. ipsum dolor sit amet, et essent mediocritatem quo, diff --git a/blog/content/homepage/index.md b/blog/content/homepage/index.md new file mode 100644 index 0000000..01ffa31 --- /dev/null +++ b/blog/content/homepage/index.md @@ -0,0 +1,3 @@ +--- +headless : true +--- diff --git a/blog/content/images/.DS_Store b/blog/content/images/.DS_Store index bc55eca..5008ddf 100644 Binary files a/blog/content/images/.DS_Store and b/blog/content/images/.DS_Store differ diff --git a/blog/content/images/Untitled 3.png b/blog/content/images/Untitled 3.png deleted file mode 100644 index 6f4bb18..0000000 Binary files a/blog/content/images/Untitled 3.png and /dev/null differ diff --git a/blog/content/images/data_report.svg b/blog/content/images/data_report.svg new file mode 100644 index 0000000..e8ce809 --- /dev/null +++ b/blog/content/images/data_report.svg @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blog/content/images/first_post.png b/blog/content/images/first_post.png deleted file mode 100644 index 984a77d..0000000 Binary files a/blog/content/images/first_post.png and /dev/null differ diff --git a/blog/content/images/first_post.svg b/blog/content/images/first_post.svg index b8eb9f9..5569faa 100644 --- a/blog/content/images/first_post.svg +++ b/blog/content/images/first_post.svg @@ -1,83 +1,83 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/blog/content/images/homepage.png b/blog/content/images/homepage.png deleted file mode 100644 index 5bdc47c..0000000 Binary files a/blog/content/images/homepage.png and /dev/null differ diff --git a/blog/content/post/first_post.md b/blog/content/post/first_post.md index c874a9c..fc84758 100644 --- a/blog/content/post/first_post.md +++ b/blog/content/post/first_post.md @@ -1,7 +1,7 @@ --- title: "First Post" date: "2020-05-04T02:14:50+01:00" -images: ["/images/Untitled 3.png"] +images: ["/images/first_post.svg"] draft: true authors: ["Daniel Tomlinson"] tags: ["Introduction"] diff --git a/blog/content/post/second_post.md b/blog/content/post/second_post.md index d9db18d..3dff399 100644 --- a/blog/content/post/second_post.md +++ b/blog/content/post/second_post.md @@ -1,7 +1,7 @@ --- title: "Second Post" date: "2020-05-05T02:14:50+01:00" -images: ["/images/Untitled 3.png"] +images: ["/images/data_report.svg"] draft: true authors: ["Daniel Tomlinson"] tags: ["Introduction"] diff --git a/blog/themes/hugo-theme-chunky-poster b/blog/themes/hugo-theme-chunky-poster index 5a73549..9f430f3 160000 --- a/blog/themes/hugo-theme-chunky-poster +++ b/blog/themes/hugo-theme-chunky-poster @@ -1 +1 @@ -Subproject commit 5a73549e0f8f855e8a5274f93e3fdaad317b9445 +Subproject commit 9f430f33f81f97d1604a2a304cbbfadc72389507 diff --git a/hugo.md b/hugo.md index e9f7f4d..860017b 100644 --- a/hugo.md +++ b/hugo.md @@ -55,6 +55,8 @@ Add the theme to the `config.toml` file: theme = "hugo-theme-chunky-poster" ``` +If you want to edit the theme, you should fork the theme, and commit it to a new repo. Then add the theme from the new repo as a submodule. Any merges upstreaming can then be done into your fork. + ### Adding content Use the command `hugo new folder/content.md`. You can manually create the file, but this command will insert some metadata for you automatically. @@ -128,6 +130,8 @@ On pages where the content does fill the full height, the footer won't go to the The hight to subtract should be the exact height of the footer. +Alternatively you can follow this commit here which sets the footer to sticky: . + #### Commento You can add the url to the commento `.js` file in the `config.toml`. @@ -251,3 +255,57 @@ A really useful feature is the ability to quickly generate a link to another pag [Neat]({{< ref "blog/neat.md" >}}) [Who]({{< relref "about.md#who" >}}) ``` + +### Image processing + +You can edit and insert images dynamically with front matter. See for an example. + +You can apply additional filtering, apply blur, resize etc: . + +### Adding images to content + +Good blog post explaining different ways to utilise Hugo's features: . + +### Working with parameters and front matter + +You can define data in your front matter, say a list of images or a single image path. + +In the `html` of the post, you can then access these variables: + +```hugo +{{- with $page.Params.images -}} + {{- $images := . -}} + {{- with $page.Site.GetPage "section" "images" -}} + {{- with .Resources.GetMatch (strings.TrimPrefix "/images/" (index $images 0)) -}} + {{- $image := . -}} +
+
+ {{ $page.Title }} +
+``` + +You can use `{{- with $page.Params.images -}}` to open a `with` block in a list. + +You can set a variable to whatever the `with` block is referencing by immediately doing a `{{- $images:= . -}}`. + +The `-` on both sides trims any whitespace in the outputted HTML. + +## Email + +### Sending email with AWS SES + +You can use SES to send emails for software/clients that request email credentials (commento is one example). + +The main documentation page is here: . + +A IAM user for sending emails is: + +```yaml +IAM User: ses-smtp-user.20200505-212533 +SMTP Username: AKIA23D4RF6O2UKDMTCW +SMTP Password: BIx9F8PR7g1K9oObHQGElHmf3nIjCkUhJpu4GP3O3/Yq +``` + +You should verify an email (or domain ) that you own with AWS: . + +An example `docker-compose` for compose app sending emails with SES is here: . diff --git a/tasks.todo b/tasks.todo index ad66c7d..b6c3ca4 100644 --- a/tasks.todo +++ b/tasks.todo @@ -3,7 +3,7 @@ Projects: Tasks: Images: ✔ Add image to homepage + document @done (5/5/2020, 4:09:20 AM) - ☐ Add image to post + document + ✔ Add image to post + document @done (5/5/2020, 7:32:50 PM) Animate: ☐ Add animate on scroll @@ -27,3 +27,13 @@ Tasks: Sidebar: ☐ Add a table of contents to the side. + + Content: + ☐ Add a series taxonomy + Notes: + Needs it's own page listing all series + Each series needs its own page with image and intro + TOC (https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/) + + Email: + ☐ Configure AWS SES for sending emails with commento. + Document the steps + links to AWS documentation.