Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Git integration #192

Open
RyanGreenup opened this issue Jun 5, 2020 · 1 comment
Open

Enhancement: Git integration #192

RyanGreenup opened this issue Jun 5, 2020 · 1 comment
Labels
enhancement Let's make it better!

Comments

@RyanGreenup
Copy link

Basically a nice feature would be to implement git integration like WikiJS does, the real question is how to implement it.

What would be desirable is:

  • automatically create a .gitignore file so only files that compose the active wiki are synced with GitHub (or GitLab or your own repo or whatever), like you can literally navigate the wiki through the raw md files, just like here in the docs if when everything goes wrong and the world ends.
  • automatically add -A; commit; push every 5 minutes
  • automatically pull every 5 minutes

How to Implement

I wonder if this should be implemented through a systemD Timer or if maybe this should be baked into Pepperminty itself?

A systemd timer is really simple and I like that solution, then pepperminty would just have to make a .timer file, but I'm not sure what the analogue is on Mac let alone what would be involved on Windows?

Cross Compatability

Compatability with a sensible markdown file structure that is at least compatible with:

Should have some degree of priority, that way the wiki could be exported seamlessly (and backup) and edited through a remote repo (I mean you could edit through the WebUI or through ssh but this would be a quality of life thing)

If a solution is found to implement general markdown link styles #190 then compatibility with navigating through everything else should also be considered.

One good example is anybody that uses org-roam or org-wiki, If they wanted to try out Pepperminty it would be really really nice if they did a batch MD export which is baked in, sync that to a GitHub repository, tell Pepperminty about that repository and then simply have everything just work (ofcourse tags are done differently in org-mode but other than that it's like 90% painless to get started and jump in)

there are other backup solutions like borg and btrfs snapshots but I think they should be in addition.

@sbrl
Copy link
Owner

sbrl commented Jun 5, 2020

automatically create a .gitignore file so only files that compose the active wiki are synced with GitHub (or GitLab or your own repo or whatever), like you can literally navigate the wiki through the raw md files, just like here in the docs if when everything goes wrong and the world ends.

This is definitely possible - it's just a case of recreating it / updating it if it doesn't exist / is outdated.

automatically add -A; commit; push every 5 minutes
automatically pull every 5 minutes

This sounds like it's best suited to a Bash script and a section in the documentation. I could certainly draft up an appropriate Bash script once we've dealt with the .gitignore script. Then people could run it via cron etc - again with some instructions in the docs.

I wonder if this should be implemented through a systemD Timer or if maybe this should be baked into Pepperminty itself?

I'd rather avoid a systemd timer. I'm not opposed to documenting how you'd do it with a systemd timer, but not everyone has systemd (e.g. Alpine Linux; Artix Linux; macOS; Windows - though I don't officially support it).

Compatibility with a sensible markdown file structure that is at least compatible with:

Yeah. As I commented in #190, I'm going to implement the [display text](./pagename.md) syntax, but it will be hidden behind a setting that's disabled by default. This can be documented in the docs for git integration.

I would assume that whatever tool you're using to view the 'exported' wiki contents in a web browser supports auto-translating the ./pagename.mdinto ./pagename.html? If not then I think an upgrade to the export system might be in order (you can already export a zip of your wiki, but it wouldn't be too far a stretch to ask for a HTML-parsed version instead, though the only issue with that would be the translated links that are specific to Pepperminty Wiki, so maybe it's not that easy after all.....).

If you're interested, the full list of settings can be found here: https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php

Anyway, let's lay out some concrete steps we can take to move forwards with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Let's make it better!
Projects
None yet
Development

No branches or pull requests

2 participants