xcatliu / pagic

A static site generator powered by Deno + React
https://pagic.org
MIT License
1.64k stars 104 forks source link

Manually Specify Blog Post Dates #110

Closed AndrewHeaney closed 1 year ago

AndrewHeaney commented 1 year ago

Is your feature request related to a problem? Please describe. Hi, I have created an example blog to learn about Deno and Pagic. I read in your docs that the dates of the blog posts are based on the date the file is created. As I run the pagic build to create /public in a Github action the files all have the same creation date and show in the wrong order on my website.

Describe the solution you'd like I was wondering if there is a way to manually specify the date of the blog post in the .md files that contain the content of the blog posts? Or some other way to give a specific date to the post.

For reference, the code for my blog can be found here - https://github.com/AndrewHeaney/blog-deno

Thank you in advance for any help.

xcatliu commented 1 year ago

Of course, it is supported. You can refer to this md file and set a front matter to achieve it

https://github.com/xcatliu/pagic/blob/master/pagic.org/blog/design_pagic_config_ts.md?plain=1#L1

---
date: 2020-07-12
---

# Design pagic.config.ts

> Part of the content in this article may be out of date. Visit [Config](../docs/config.md) to view the latest configuration fields.
AndrewHeaney commented 1 year ago

That's great thank you. I could not find that page when I was searching initially.