-
Notifications
You must be signed in to change notification settings - Fork 0
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
doc: Initialize documentation #210
Conversation
To build the docs, please refer to this PR: Icinga/icinga-docs-tools#9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where will be documented how to connect the daemon to Icinga 2? Do you see this as part of the Notifications Web documentation as that provides the config form? Even if that will be the case, a hint on this somewhere might be nice.
d0aaedc
to
46a017d
Compare
I have made some changes inspired by @ncosta-ic's similar PR over there in web world, Icinga/icinga-notifications-web#218. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(This note is not related to this file in particular, I just wanted to create a thread and don't know another way to do this here.)
I am a bit unhappy with the numbering of the markdown files by their filename. This layout was copied from the other Icinga documentations and I would expect a certain degree of similarity between the projects.
However, this layout enforces a ordering by the names from the beginning, which is hard to change later, as it will break links, resulting in dead URLs. For example, in Icinga DB I once wanted to add a new section between two already existing ones, but there is no real possibility to add something in between1.
It would be possible to leave greater gaps, but this would also look weird. I would like to hear your comment on this, @julianbrost. Thanks :)
Footnotes
-
Except of hacks like naming something
03-01-Foo.md
if it should go between03-Configuration.md
and04-Upgrading.md
. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This layout was copied from the other Icinga documentations and I would expect a certain degree of similarity between the projects.
If we would consider breaking our own conventions, we could manually populate MKDocs' nav
and don't prefix files with numbers. This, however, would also require patching the build-docs.rb
script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I never thought about this. But indeed, it doesn't really make sense to me that the URL for example is https://icinga.com/docs/icinga-2/latest/doc/14-features/ instead of just https://icinga.com/docs/icinga-2/latest/doc/features/.
we could manually populate MKDocs'
nav
and don't prefix files with numbers. This, however, would also require patching thebuild-docs.rb
script.
I'm not familiar with MKDocs either, so I don't know what its nav
is, but it doesn't sound wrong to me.
By the way, leaving gaps wouldn't be unheard of, see https://github.com/Icinga/icingaweb2-module-director/tree/master/doc and https://github.com/Icinga/icinga-powershell-framework/tree/master/doc for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, proper permalinks regardless of the given file name, would be really handy. There's a whole discussion about it over at squidfunk/mkdocs-material#3758
The whole build-docs.rb
wrapper is pretty hacky alltogether and even destroyed my local git repository because of the wonderful rm -rf
instruction contained in it...
A better solution would be to rewrite our existing build-docs.rb
functionality into a Python hook1.
We could also include our own solution to the url problem by doing so.
I would be up for that task as I have a lot of experience with Python - if we were to decide to go for such a change.
Footnotes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all for improving things there if you've looked into it already and have ideas how to do it better. But sounds something to better track in central place rather than here. If we change something, that would affect most projects anyways. Also, this shouldn't block anything here, the only question is whether you want to add gaps in the numbers for the moment.
By the way, keeping URLs working with a change in that direction should be simple by redirecting NNN-foobar
to foobar
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the moment, I added some gaps between the numbering of the later sections as one might expect something to pop up there.
After some potential future change, a simple RewriteRule ^/doc/([a-z0-9-]+)/[0-9]+-(.*) /doc/$1/$2 [R]
1 should do, as @julianbrost also suggested.
Footnotes
-
Untested, of course 🙃 ↩
75e028b
to
e738788
Compare
'http://localhost:5680/process-event' | ||
``` | ||
|
||
## Debugging Endpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#223 would change the following URLs. However, this isn't a blocker as a subsequent PR can update this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, fine for me now. (To be fair, I didn't cross check with the web documentation for possible duplicates, but I wouldn't expect any of what's in here to be duplicated apart from the about page where it's to be expected.)
Just that one obvious thing, but better have it as an unresolved conversation than accepting and forgetting it:
Sorry, while testing the packages together with the docs, I found this faulty username. |
Both structure and huge parts are copied from Icinga DB and were altered afterwards. The already existing Channel Plugin documentation was extended.
Next to @nilmerg's comments, I have added a sentence to the Big Picture section mentioning other possible sources, as otherwise the text mismatched the image. Furthermore, I have changed the default PostgreSQL credentials in the example configuration to those of the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks perfect TM.
This PR got merged while containing a faulty link. While a relative link to the icinga-notifications-docs-bug.webm |
Are you sure? The same happens in other documentations as well, e.g., for Icinga DB: On the rendered web documentation, the resulting page links to However, I guess your point is still valid for the documentation's main page, as it might be accessed directly under Footnotes
|
First, relative links outside the `doc` directory are possible and work. However, the main page can be accessed via `…/` or `…/doc/01-About.md`. While a relative link works for the second, it breaks for the first. For the docs, this link now points to the LICENSE file on GitHub. Reported-by: Noé Costa <#210 (comment)>
That's correct. And yes, I was wrong about the includes. The second problem where a user could access the |
First, relative links outside the `doc` directory are possible and work. However, the main page can be accessed via `…/` or `…/doc/01-About.md`. While a relative link works for the second, it breaks for the first. For the docs, this link now points to the LICENSE file on GitHub. Reported-by: Noé Costa <#210 (comment)>
Both structure and huge parts are copied from Icinga DB and were altered afterwards. The already existing Channel Plugin documentation was extended.