denoland / fresh-blog-example

An example for building a blog with Fresh.
https://fresh-blog-example.deno.dev/
MIT License
30 stars 13 forks source link

Has front_matter moved? #6

Open mickgardner opened 4 months ago

mickgardner commented 4 months ago

https://github.com/denoland/fresh-blog-example/blob/8854933d4beefb7a1ec7d2bbff0ddd0b81c73b21/utils/posts.ts#L1

Am I correct in saying that front_matter has now moved in more recent versions of Deno's standard library? I believe the article and code may need updating if that is so.

ibanezfr commented 2 months ago

Hi @mickgardner, I'm not sure when this repo and article will be updated, but I managed to solve it this way:

I manually installed the packages: deno add jsr:@std/front-matter deno add jsr:@std/path

I wrote the imports inside 'utils/posts.ts' like this: import { extract } from "@std/front-matter/any"; import { join } from "@std/path";

Hope this helps you!