How Do I ... is a simple collection of useful snippets for developers. Sometimes you don't want to read through a long explanation, and just need to see the code to get a refresher. That's what this is for!
The project is a static site generated by Hugo. To start development, first install Hugo, and then run the server locally:
hugo server
To create a new post, run the command below, replacing the category and file name as appropriate.
hugo new posts/category/file-name.md
In the metadata at the top of the file, ensure that the post has at least a title
, slug
and tags
(with a single tag).
Want to share your own questions, or improve existing ones? Pull requests are very welcome!
The key thing to remember with any question is that the answer should be very short, with only code, and maybe some links for more detailed reading. Only add other text if it is needed to clarify the answer.
The site is automatically deployed using GitHub pages to https://howdoi.menardi.dev every time there is a push to main
. This is done by a GitHub Action which builds the app and commits the built version of the site to the gh-pages
branch.