Sync wikijs with github wiki - homepages diverge #7959
Unanswered
chamalis
asked this question in
Error / Bug Report
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
Wiki.js Git storage behaves inconsistently for homepage when trying to support both Wiki.js home and GitHub wiki Home.md
Environment
I can open all
which lead to the same homepage due to symlinks set up (read description below).
Problem summary
Normal pages sync correctly. The problem is specific to the homepage when trying to satisfy both:
homeGiven that:
Depending on how Home.md / home.md are arranged, there are 3 observed different bad outcomes.
Case 1 —
Home.mdreal file,home.md -> Home.mdsymlinkEditing normal pages in Wiki.js works.
Editing homepage in Wiki.js logs:
but no local Git commit is created
Home.md remains modified and unstaged
next scheduled sync fails with:
Result
GitHub homepage renders
Wiki.js homepage edits break Git sync
Case 2 —
home.mdreal file,Home.md -> home.mdsymlinkThis was tried as the opposite arrangement.
Homepage edits from Wiki.js can be committed/pushed
but GitHub wiki frontend becomes wrong / broken
in one variant GitHub rendered the homepage incorrectly / effectively empty
I suppose because github's wiki does not follow symlinks.
Result
Wiki.js side behaves better
GitHub homepage breaks
Case 3 —
Home.mdregular file,home -> Home.mdsymlink (no home.md)This unexpectedly syncs without Git errors.
Wiki.js commits and pushes homepage edits successfully
but what is committed a new
home.mdfileso GitHub wiki frontend still renders the previous homepage from
Home.md, therefore the home pages diverge.Result
Git sync succeeds
the new homepage content is effectively ignored by the Github frontend
Conclusion
My question is, if sync breaks the homepage, how do people make use of wiki.js's github bidirectional auto-sync functionality? Is it only meant to update the remote repo? In that case bidirectional doesn't make sense to me. It should be only local wikijs -> git repo, no?
Thank you for your time!
All reactions