Anthony C
Anthony C

Reputation: 1990

Where does Gollum (the wiki engine) store its files? (when created via browser)

I've got gollum deployed on my server. I set up a wiki directory, seeded it with some files, created a git repo there, then called gollum on the directory.

I can access my wiki via a browser and update and create files. However, I can't find any of the new files or any of the updates in the filesystem.

Are gollum updated files accessible from the command line somewhere?

Upvotes: 0

Views: 1455

Answers (1)

Eduardo Santana
Eduardo Santana

Reputation: 6100

gollum reads and write to a git repository.

Let's see how it work. The command git tree will show commits, branch, and local and remote repository. Let's run it:

* 9d80e8f (HEAD -> master, origin/master, origin/HEAD) sidebar
* d09d2fe sidebar
* b6f0b07 headers
* 293a8b9 citação
* b2c3723 cronograma

The output shows many commits, the first one is the last.

Now let's open gollum, and make some change. To make it simple, let's edit the Home file, clicking on Edit. Make any change, and write the commit title as described before saving it:

enter image description here

Now let's see the repository status and it's tree:

$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
  (use "git push" to publish your local commits)

$ git tree
* d00382c (HEAD -> master) Recomendação para utilizar os links do rodapé
* 9d80e8f (origin/master, origin/HEAD) sidebar
* d09d2fe sidebar
* b6f0b07 headers
* 293a8b9 citação
* b2c3723 cronograma

You can see that the commit was made.

Your first question was: Where does Gollum (the wiki engine) store its files? (when created via browser)

Answer: on the git repository by doing commits.

Your second question was: Are gollum updated files accessible from the command line somewhere?

Answer: Your local copy of the file that shows in the working directory is just a copy, it doesn't get loaded by gollum. If you have changed it you can run git checkout -- filename to get the last version of it commited at the repostory.

IF you have setup a bare repository, it's a bit different. You won't see any copy of regular files, it will be only internal git file. If you want to know how git files are organized I recommend read Git Internals PDF book.

For example, to list committed files at master branch we can use ls-tree command:

$ git ls-tree master --abbrev
100644 blob 9ca0ea7 "Adicionando-refer\303\252ncias.md"
100644 blob 489ed0b "Apresenta\303\247\303\243o.md"
100644 blob 34d2b6c Baixando um modelo de projeto.md
100644 blob c4a5865 "Citando-as-refer\303\252ncias.md"
100644 blob 7d5bb96 Comandos.md
100644 blob 770917a Como criar elementos.md
100644 blob 5b9b18f "Configura\303\247\303\243o inicial.md"
100644 blob c2c74b7 "Configura\303\247\303\243o.md"
100644 blob 01d7f3e Desenvolvimento.md
100644 blob 1af9d33 Editando-o-texto.md
100644 blob 5f98f2d Editores.md
100644 blob 1bdc46d Esqueleto.md
100644 blob ea80774 Estrutura de arquivos.md
100644 blob b080597 Experimentos.md
100644 blob 7cb4f77 FAQ.md
100644 blob f9fbacd Gerando o PDF.md
100644 blob 1a5bc95 Home.md
100644 blob a548ddc Imprensa.md

By the way, that's what @Thilo means by saying: "In that case you could use a git tool to look at them".

Upvotes: 4

Related Questions