[jgmac1106]so building a store for this site hittps://kevoglass.net and using snipcart really like that it fetches all your product data from the HTML...ain't much reason to but will add h-product so if anyone ever does do IndieWeb transaction processing site will be set
[eddie]It’s funny when I read an IndieWeb post on my reader and reply in my reader with no realization that the Indie Post is syndicated to twitter, only realizing it when my site auto-syndicates my reply to twitter as well! 😆
[jgmac1106]kevinmarks you know blogger well would there be any point in telling a blogger user who added webmentions with bridgy to add an h-card to their site?
jeremycherfasI'm trying to wrap my head round a problem that is currently preventing me from working on micropub for my Grav site. It is all to do with github and going back and forth between live site, github and local development site.
jeremycherfasAt the moment, I tend to write locally, push a commit to github, and then there is a webhook on the live site to which github pushes any changes.
jeremycherfasIf I want to micropub direct to the live site, it is simplest if those new posts go straight to the live site. That puts the live site ahead of github and the local site. There is a grav plugin that aims to synchronise between live site and github, but last time I tried that I made an awful mess of everything.
jeremycherfasSo here's my question (finally). Can I simply commit and push once a day from the live site back to github, and then pull from github to my local site when I want to tweak things?
jeremycherfasThat way, automated posts, mostly notes of one sort or another, would go direct to live site. More considered writing would take place locally. Commits from live to github and from local to github would keep everything in sync, I hope.
Zegnatjeremycherfas, sounds workable. Though as soon as your live site gains the ability to push to GitHub, why trigger it only once a day rather than directly after every micropub request? If you do it after every micropub it is also less likely to become out of sync.
ZegnatI imagine either Grav has some sort of event hook that triggers for a new item having been created, or the micropub code itself will have to trigger it.
jeremycherfasGrav does have such an event hook, yes. I believe that to use it would require the micropub endpoint to be a plugin, as metbril is working on, rather than "pure" PHP that [Rose] has.
ZegnatI think for the to-github they may have an API. But you might be stuck on just calling git commands from within PHP if their API doesn’t do what you want.
[schmarty]jeremycherfas: every git clone can act as a remote for another. whether github considers a given clone at all depends on what you are trying to accomplish.
ZegnatIn this case both your local clone (on your computer) and the server clone (live website) will probably refer to the version hosted on GitHub as their remote. Other than that, I don’t think you need to define any more relationships between them.
ZegnatEspecially remotes I have found that people (incl me) coming into git from GitHub have a hard time with, because GitHub kinda makes it seem like there is some sort of magically canonical repo that they host.
sknebelhm, the git-sync plugin seems to be intended to do all this stuff like automatically sending changed pages to github etc. curious what problems it caused exactly
jeremycherfasPossibly because I was even more confused about remotes and origins, I may have set it up wrong. But it seemed to create a whole lot of new files and folders that were not there originally. Maybe I should just try again. The instructions are geared towards creating entirely an entirely new origin. I think you are right, sknebel. I should look at it again, more carefully.
sknebelyou could of course also intentionally choose a simpler setup you're more comfortable with, only syncing once a day or only syncing if you tell it to, so you have a better perspective on what's happening
jeremycherfasTried again with the git-sync plugin for grav and although it seemed to be working, the live site now reports that mytheme does not exist and absolutely nothing will load. Here's hoping git can save the day.
jeremycherfasDisaster undone. That gitsync plugin for Grav does a whole lot of things I do not begin to understand, like deleting all themes except one, and that's not the one I use. Took forever to get back to where I was, but I'm there now.