I got an explanation how to add a post:
Add a blog post using the npm run create command.
Example
npm run create blog/say-hello-to-doks/index.md
But there is already one index.md and I do not need another index.md, so I changed the command like that:
npm run create blog/say-hello-to-doks/test.md
But after that no matter how many posts I would create, nothing was appeared on the website. What is going on? How to create a new post?
When you create a file named index.md in a directory, that directory becomes a Leaf Bundle. Other files within the same directory become Page Resources.
If you want a directory to have multiple pages, either remove the index.md file to have a generic list page, or replace the index.md file with an _index.md file.
A directory with an _index.md file is a Branch Bundle.
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick git clone on your repo, then run hugo server in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.
If you canβt share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem youβre experiencing.
Ah! Iβve got it! I thought, that every new post in Blog page is just a new .md file and all. But in reality I need to create a new folder for every new post in Blog page and in every new folder must have the same index.md file (or not the same - I do not understand it). This index.md file is like a sceleton. Though I do not understand why do I need to create some md files except this index.md file: I cannot see them anyway.
I pulled your changes at 2021-11-07T15:21:47-08:00, then ran hugo server -D.
Error: Error building site: β/home/jmooring/temp/techwriter/content/en/blog/post2.md:13:1β: failed to render shortcode βimgβ: failed to process shortcode: β/home/jmooring/temp/techwriter/layouts/shortcodes/img.html:2:18β: execute of template failed: template: shortcodes/img.html:2:18: executing βshortcodes/img.htmlβ at <$image.Resize>: nil pointer evaluating resource.Resource.Resize
Itβs telling me thereβs a problem on line 13, column 1 of content/blog/post2.md:
So, it canβt find the image (Page Resource) that it is trying to resize. Why? Because page resources are available to Leaf Bundles and Branch Bundles, and content/blog/post2.md is neither.
You can fix this by:
Removing the shortcode call from content/blog/post2.md, OR