Using Dates from Paths

Demonstrating how DSBG gets dates from the path.

This post shows how DSBG can automatically extract the date from the file path, and use this path to also extract the tags for the article.

If no date is defined in frontmatter or file metadata, DSBG will try to use the date provided in the filename or path for date information. If no date pattern is found anywhere, it will use the file modification time.

DSBG will also try to extract tags from the directory name. For example, content/2024-07-10-my-example/my-post.md will automatically include a tag named 2024-07-10-my-example.

This path will also show that when the flag -keep-date-in-paths is set, the dates won't be removed from the generated paths.