Git Product home page Git Product logo

Comments (13)

mohkale avatar mohkale commented on June 3, 2024 2

@nhoizey has collections support been implemented yet? I'd be willing to implement it.

from jekyll-postfiles.

mohkale avatar mohkale commented on June 3, 2024 1

I'll get on it soon... may take a few weeks to get started (nearly christmas & all).

from jekyll-postfiles.

mohkale avatar mohkale commented on June 3, 2024 1

I'm not sure whether it'll work with #47 then. that patch specifically goes through files in collections.

from jekyll-postfiles.

nhoizey avatar nhoizey commented on June 3, 2024

Indeed. Work is already planned for collections, but having any page support would be great.

from jekyll-postfiles.

nhoizey avatar nhoizey commented on June 3, 2024

@mohkale I didn't make any progress yet unfortunately, so that's great that you're willing to implement it, thanks! 👍

from jekyll-postfiles.

nhoizey avatar nhoizey commented on June 3, 2024

No problem, you're the lead on this! 🙂

from jekyll-postfiles.

mohkale avatar mohkale commented on June 3, 2024

Finally got round to implementing collections support. Now all that's left should be normal pages... but I'm not really sure how to implement it or even whether there's a need to. Could you give me a use case of where unique grouping of assets for regular pages make sense?

from jekyll-postfiles.

DirtyF avatar DirtyF commented on June 3, 2024

@mohkale I've seen people, including me, group pages in a _pages folder and include it in their config, to get a cleaner root. But it looks like a special collection, looks like that kind of structure could be done now with #47 ?

_config.yml
_pages/
   about/
   index.md
   team.jpg
   404/
   index.md
   error.jpg
_posts/
_collections/
Gemfile
...

from jekyll-postfiles.

mohkale avatar mohkale commented on June 3, 2024

@DirtyF so _pages is a collection? I'm not sure whether it'll work with #47 because a postfile has to be at least one directory below the collection directory Sorry. the indentation with about/ and 404/ was off and that confused me. Yeah, that seems like a good solution.

from jekyll-postfiles.

mohkale avatar mohkale commented on June 3, 2024

@DirtyF though I've found a bug with #47 in that regard. It seems to me like it's outputting both the converted .html format files and the original unconverted markdown files. I'm not sure why. I'll look into it.

oh, I see, it's recognising the .md files as jekyll-postfiles... I'm curious why this isn't an issue with posts it isn't an issue with posts because posts match the file date format... I can see how to fix this.

Update: Okay, that should've fixed it.

from jekyll-postfiles.

mohkale avatar mohkale commented on June 3, 2024

@DirtyF I've got one issue with _pages. Is it already defined as a collection? I can't seem to add it to my collections hash in _config.yml and I also can't change the permalink for members of it.

Adding

defaults:
  - scope:
      type: pages
    values:
      permalink: /:title:output_ext

gets me: jekyll 3.8.6 | Error: Invalid argument @ rb_sysopen - mohkale.io/bin/:title.html. I truncated the path for simplicities purposes, but bin is my build directory for jekyll.

from jekyll-postfiles.

DirtyF avatar DirtyF commented on June 3, 2024

It's not a collection, just an included folder.

from jekyll-postfiles.

mohkale avatar mohkale commented on June 3, 2024

Just ran into a use case where this'd be convenient so it's probably worth considering how to implement it. We could just ask users to manually create a collection, _pages in this case and then use that with #47 ... but I'm not a big a fan of the whole _collection naming scheme & that'd force paths for files in the root of your site into at least one subdirectory below the root of your source directory, so I'd appreciate an alternative.

We could add a config option where users can specify paths and each matching path is considered the root for a postfiles directory. I.E.

site:

- about-me/
  - banner.png
  - index.md
- faq/
  - styles/
    - main.css
  - index.md
- _config.yml

_config.yml:

postfiles:
  include:
    - {about-me,faq}/

neither approach seems very intuitive.

from jekyll-postfiles.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.