wikiotics / wikiotics.org

Lessons for learning a foreign language. Formerly a wiki, now a static site built with Hugo.
https://wikiotics.org
7 stars 3 forks source link

Bring back lesson editing? #16

Open garrison opened 4 years ago

garrison commented 4 years ago

One could imagine bringing back GUI lesson editing on the static site by having the editor work entirely in the browser via Javascript, with the end result being a pull request via the github API. If we choose to host lesson media on IPFS (#15), this system could even potentially use js-ipfs to get the lesson media available to others.

garrison commented 4 years ago

I should emphasize that lesson editing can take many forms and may even assume the user is familiar with git and the workflow of pull requests on github. Or perhaps the end result is a zip file containing a TOML file and all the media for a lesson, which the user could then make into a pull request through some other means. The goal is to assist, somehow, with the process of editing lessons in a way that can be documented and useful to those contributing.

Also, this idea of bringing back some form of editor is quite speculative, but I wanted to have an open issue we can point to any time such discussion comes up.

garrison commented 4 years ago

Netlify CMS is probably the closest thing in existence to what I am thinking here.

https://github.com/netlify/git-gateway may also be relevant.

garrison commented 4 years ago

I tried out Netlify CMS. It was pretty bizarre (in a good way) to create a new blog post through a CMS that runs entirely in the browser, and to have this commit show up in a repository immediately after clicking the "publish" button. I don't believe there is a way to allow people, via Netlify CMS, to prepare a pull request on a site that uses it, but it would be awesome to see this done. I'll look more into this and perhaps ask its developers. Whether Netlify CMS supports it or not, I believe it is possible.

Edit: Apparently Netlify did this by adding their deploy ssh key to that one repository hosting the site. So they are obviously running something on a server somewhere...

Update: here is the link I've been looking for. In fact, I think they have "open authoring" enabled on their docs site if you click the "Edit this page" button on that page. I haven't tried it, though, as Netlify wants an unacceptable level of permission to control my github account, including organizations I have a role in. Perhaps worth trying in a dummy account, but requesting this level of access means I would never use it personally.

Anyway, I suspect this may happen entirely in the browser since it uses a different backend, but I haven't tested it to be sure.

garrison commented 3 years ago

Also potentially related: GitLab Static Site Editor, which I found via the Hugo Discourse instance.

garrison commented 3 years ago

See also: https://github.com/eduardoboucas/staticman. We could even consider Dokku as an alternative to Heroku.