scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 91 forks source link

Read-only support #163

Open RSully opened 7 years ago

RSully commented 7 years ago

I wanted to put this out there as a feature request: a config option to run the wiki as a read-only front-end (with search).

At the very least, is read-only mode something you'd accept a pull request for? I envision it as hiding registration, login, new/edit buttons.

My use-case is running this using an existing git repo as the source, and on push it'd update and rebuild the search index.

gazpachoking commented 7 years ago

If you disable all the following options does it achieve a similar result?

AUTH_LOCAL_ENABLE
ALLOW_ANON
REGISTRATION_ENABLED
RSully commented 7 years ago

I think I tried something like that, but the new/edit buttons were still visible. Does this sound right?

edit: I think I missed 1 of them, I will try later

gazpachoking commented 7 years ago

I think I tried something like that, but the new/edit buttons were still visible. Does this sound right?

That does sound right actually. I think your idea of hiding the inappropriate buttons based on config is a good one.

gazpachoking commented 7 years ago

I wonder in fact if we shouldn't make the navbar more modular, such that different realms modules can add and remove navbar stuff easily programmatically, rather than having to have everything baked directly into the layout.html template. Search, wiki, and auth modules would register their own navbar elements, and could customize what they add based on the config options.