Git Product home page Git Product logo

Comments (6)

voxpelli avatar voxpelli commented on June 8, 2024

This is actually very close to being possible: voxpelli/node-format-microformat#6

I just need to tag a release there and then me or @keithjgrant if he is still up for it (or someone else) just needs to make a configuration here for the new option there (filenameStyle)

from webpage-micropub-to-github.

voxpelli avatar voxpelli commented on June 8, 2024

Related is also: voxpelli/node-format-microformat#7 That's about supporting collections better

from webpage-micropub-to-github.

paulrobertlloyd avatar paulrobertlloyd commented on June 8, 2024

Oh, this is all excellent news! Looking forward to trying this again when these changes have been merged πŸ˜€

from webpage-micropub-to-github.

voxpelli avatar voxpelli commented on June 8, 2024

@paulrobertlloyd I pushed a new version, 0.5.0, that add basic configurability to file paths. To solve your full needs we need voxpelli/node-format-microformat#7 though – so I'll leave this open until that one is fixed, hopefully I can get to that soon.

Ping @keithjgrant

from webpage-micropub-to-github.

voxpelli avatar voxpelli commented on June 8, 2024

Now also voxpelli/node-format-microformat#7 is fixed, so one can now add dynamic permalink and file path styles in an extension of the way added in #4

That means that one can now also set the env variable MICROPUB_FILENAME_STYLE to something like:

[
  {
    "condition": "abc = 123 AND foo = bar",
    "value": "first/:slug"
  },
  {
    "condition": "content[] = \"hello world\"",
    "value": "second/:slug"
  }
]

The conditions are in a format supported by https://github.com/voxpelli/node-fulfills and it's applied towards the properties of the content. The first condition to be matched, that's the value that will be used.

This applies to MICROPUB_MEDIA_FILES_STYLE and MICROPUB_PERMALINK_STYLE as well + is also the new format for MICROPUB_OPTION_DERIVE_CATEGORY.

I know this may sound pretty complicated, but it shouldn't be that complicated. It enables a pretty powerful configuration-driven setup. I would very much want feedback on how it works.

@paulrobertlloyd Does this solve it for you? + is #17 required for this to be useful for you?

from webpage-micropub-to-github.

paulrobertlloyd avatar paulrobertlloyd commented on June 8, 2024

Hi @voxpelli. Sorry it’s taken so long to get back to you on this. I think this answers my original questions; I can configure the location in which files are written now, so that’s great. I have some other questions, but will post them in the appropriate threads.

from webpage-micropub-to-github.

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.