Skip to content

Blog posts in folders (with assets)/nested shortcodes #197

Answered by oscarotero
Brixy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, @Brixy

Is it/how is it possible to use a Hugo-like folder structure for a blog?

The url generation in Lume doesn't work exactly like Hugo: The date from the path is extracted only if it's in the filename but not in the folder name. In your example, /blog/2022-05-01_first-post/index.md outputs to /blog/2022-05-01_first-post/index.html, but blog/2022-05-02_second-post.md outputs to blog/second-post/ (because the date is defined in the filename, not in the folder). I think this could be implemented easily but it's not available right now.

Fortunately, you can use javascript functions to customize the final url of the pages See this. You can create a blog/_data.js file and export the url

Replies: 3 comments 28 replies

Comment options

You must be logged in to vote
5 replies
@Brixy
Comment options

@oscarotero
Comment options

@Brixy
Comment options

@oscarotero
Comment options

@Brixy
Comment options

Answer selected by oscarotero
Comment options

You must be logged in to vote
16 replies
@Brixy
Comment options

@oscarotero
Comment options

@Brixy
Comment options

@oscarotero
Comment options

@Brixy
Comment options

Comment options

You must be logged in to vote
7 replies
@Brixy
Comment options

@oscarotero
Comment options

@oscarotero
Comment options

@Brixy
Comment options

@oscarotero
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants