Closed voxpelli closed 5 years ago
šš» Hello again @voxpelli! Your endpoint was the first of many I tried, hacked away at and played with, all of which informed and inspired the design of this app. So thank-you for writing it.
In general, Iāve tried to use existing packages. For example, to parse Microformats Iāve used Glenn Jonesā microformat-node. To discover post types, Iāve used Prateek Saxenaās post-type-discovery (although as it was returning errors I copied the code for the sake of expediency. I really need to file issues or submit fixes so I can include it as a dependency).
As to your modules:
I looked at using node-micropub-express, but wrote my own code for a few reasons. Firstly, I felt I needed to understand how this stuff all works, which was only possible by writing it from scratch. Secondly, the module doesnāt provide Media Endpoint supportā¦ although, come to think of it, I can deal with that separately as it uses a different route. Which is to say, perhaps I should take another look at your module to see if I can incorporate it!
I hadnāt noticed node-github-publish, and it looks like a good candidate for providing my needsā¦ although it currently lacks support for deleting files, and thatās one of the few things my app does do at the moment! š
With regards to node-format-microformat, while there is definitely some cross over (and some things I can take from its design), I suspect this is where Iād need to diverge, as I want to allow users to be able to use their own templates (note that Hugo supports YAML, JSON and TOML syntaxes for frontmatter data). If your module were to support different frontmatter types, that might help, but what if a user wanted to use another CMS? Kirby has its own way of formatting its content files, for example.
Anywayā¦ thatās an overly long explanation, but the short answer is: YES, Iād love to collaborate on some of these shared pieces! My long term goal for IndieKit is to support multiple publishing destinations (GitHub, GitLab, Bitbucketā¦ maybe even good āol SFTP!) and other IndieWeb standards like Webmention; having shared components would make my life much easier!
In terms of collaboration, I think adding delete functionality to github-publish
might be a good place to start. Itās a scoped piece of work, with little variance of the different options it would need to provide to consuming applications. Iāll see if I can make a PR to add that in.
Personally, Iām very new to all this ā Iām surprised Iāve managed to build this much to be honest. Building a Micropub server has been a really useful means of better understanding how Node and JavaScript works, but I still have so much more to learn. Collaborating with you @vipickering would only help accelerate this process, I feel. š¤
Thanks for the excellent explanation of your thinking, makes a lot of sense to me!
Agree that it sounds like the adding of deletion to github-publish
would be a very good first candidate for closer collaboration between us! Would love to have that as well ā deletion is really a feature I should integrate with. Is that module in general and that feature in particular something you would find useful as well @vipickering?
I agree with most of your goals, I'm aiming for similar things but from different angles and at a different pace š
My highest priority for my micropub endpoint is the Media Endpoint, would certainly be interesting to collaborate on as a second step š
I've had a look at github-publish
and it seems like it wouldn't be too much effort to swap out my Github code for it.
Now I've cobbled together all the basic functionality (on my own server), the next step was to modularise it. So it makes sense to start collaborating and understand other peoples needs as well as my own.
From speaking to others I've found people can have differing specific needs, even on a static site, so the idea of drop in modules appeals to me.
Currently I don't support updates or deletes, I couldn't come up with a good user need for myself, that wasn't simpler than opening the markdown file and deleting/updating the file manually, but I'm happy to pitch in where I can to help you do it.
@paulrobertlloyd on your point with node-format-microformat, that was also a pain point for me when looking at other peoples implementations and a key reason why I rolled my own solution. My approach has a formatter for each post type, swapping for another is as easy as pointing at a new file and rolling some specific code. For example I don't have a formatter in here for longform articles as I prefer to hand crank those, but others might want to use Quill etc and could drop in their own. Side note, I recently deleted my ownyourswarm formatter as I left Instagram, but I would be happy to dig it out of the github history and refine it should you want it. This could do with a friendly more modular code approach, but the notion of allowing anyone to write their own post formatter seems like a sound approach to take, given quite how varied peoples CMS choice or frontmatter options may be.
Time-wise my availability to help will be spotty over the next few months, I'm emmigrating next month and starting a new job, but I'll help where I can :-)
Hey I opened a new repo to track ideas for collaborating on a new micropub endpoint middleware at https://github.com/grantcodes/future-micropub-endpoint
Would love to get your input and/or help as indiekit looks really well made!
Closing this issue to ensure all discussion is centralised at the repo @grantcodes created.
Neat with another node.js project doing these kinds of things!
I've opted for a very modular approach in my endpoint to enable others who want to build similar approaches to not have to reinvent every approach and thus that we can collaborate and improve some shared parts while at the same time innovate and experiment with the ones that sets us apart or that we feel takes the wrong approach.
Here's the list of modules I've splited form my main project: https://github.com/voxpelli/webpage-micropub-to-github#modules-used
My main project is basically just a glue between those three modules.
Maybe we could collaborate on the
micropub-express
andgithub-publish
? Or is there something that you are doing that is pushing in another direction than I am with those modules? If so, I would be interested in hearing your thoughts and ideas on that!