Generating posts from data pulled from URL

Evening all.

I am trying to generate posts in Hugo from data via an endpoint (happens to be Directus app). I am able to render the list of posts and the post content, but I would like to be able to click on the title and view the post off a URL setup like

/blog/2022/09/10/post-title

I have a lot of posts from an old Wordpress install that I would like to now use in a Hugo generated site so posts go back as far as 2008.

Going forward I would like to add new posts in Directus - which then kicks off a new build of the site from Github via Render.com API’s.

Hope the above makes sense.

Thanks in advance
Gearoid

I think that’s not possible yet with Hugo. But there has been several discussions over the years in the Hugo Repo. But there is a workaround.

1 Like

Thanks @tut for getting back, great articles.

@tut just followed part 2 of your article and can get it to work with your monster repo, brilliant and creative solution (hats off to you) Will roll this into what I need to do next.

Kind regards
Gearoid

That’s not my article. Thank @regis for that. (I am not that technical :laughing:).

@refis thank you. @tut thanks for pointing it out

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.