Auto-published article


This is a test article to demonstrate how to automatically publish articles using a pre-commit hook.

How it works

  1. Create a new markdown file in the src/content/blog directory.
  2. Ensure the markdown frontmatter does not contain a draft field or that the draft field is set to false.
  3. Ensure the markdown frontmatter does not contain a pubDate field.
  4. Commit the changes to the repository.
  5. The pre-commit hook will automatically add a pubDate field to the markdown frontmatter with the current date and time.
  6. The article will be auto-published on the site when the changes are pushed to the repository.

Conclusion

This is a simple way to auto-publish articles on your site using a pre-commit hook. It can save you time and effort by automating the publishing process.

Headshot of David Septimus

Hi, I'm Dave. I'm a software engineer based in Denver. You can follow me on Twitter or see some of my work on GitHub.