Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow posts to be organised in an arbitrary tree of subdirectories #17

Open
r14c opened this issue Dec 4, 2019 · 4 comments
Open

Allow posts to be organised in an arbitrary tree of subdirectories #17

r14c opened this issue Dec 4, 2019 · 4 comments
Labels
enhancement New feature or request

Comments

@r14c
Copy link

r14c commented Dec 4, 2019

your docs say that this should be possible. probably some omission or maybe its actually broken.

repro steps:

  1. create a brand new elmstatic project
  2. mkdir _posts/foo
  3. mv _posts/2019-01-02-another-post.md _posts/foo
  4. observe that elmstatic says ENOENT: no such file or directory, open '_site/foo/rss.xml'
elmstatic build
Building the site
  Compiling layouts
Success!     

    Tag ──────┬──> elm.js
    Page ─────┤
    Photo ────┤
    Photos ───┤
    Post ─────┤
    Posts ────┘

  Generating pages
  Generating posts
  Generating tag pages
  Cleaning out the output path (_site)
  Writing HTML
  Generating feeds

ENOENT: no such file or directory, open '_site/foo/rss.xml'
@alexkorban
Copy link
Owner

You also need to have _pages/foo with at least one page in it, then Elmstatic will be able to build it.

@r14c
Copy link
Author

r14c commented Dec 9, 2019

having a bunch of dummy pages just to make the builder happy seems less than ideal. for example, i keep my posts organized by year so i have to create a page for each year. an about page isn't even relevant for this kind of thing. seems like it would be reasonable to have elmstatic create the foo directory in this case if it doesn't exist yet.

@r14c
Copy link
Author

r14c commented Dec 9, 2019

i can understand wanting to keep things simple and opinionated. i'm happy to contribute here, but if you'd prefer to keep things as they are i can go do my own thing instead.

@alexkorban
Copy link
Owner

I prefer to keep the current behaviour for now as it's nontrivial to combine arbitrary subdirs in _posts with the existing support for subsections. I'll keep this issue open as an enhancement for future reference.

@alexkorban alexkorban changed the title creating a directory under _posts results in an error Allow posts to be organised in an arbitrary tree of subdirectories Dec 10, 2019
@alexkorban alexkorban added the enhancement New feature or request label Dec 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants