Glossary of terms?

I think this is a good idea but I have some questions about how it would work.

Should every term list contribute to the glossary page? If not, how can a developer control which term lists contribute to the glossary page?

What happens if the same term is defined on multiple pages? This could happen when a term has different meaning in different local contexts.

What would the glossary page display? Should it repeat the definition of each term?

What order should the glossary page display terms? I've seen cases where a few related terms are listed and defined together. If one of these is separated from the other terms in the same list it may be hard for the reader to understand the term definition "out of context".


I haven't had time to think too much about this yet but my initial feeling is that it terms that would be displayed on a glossary page probably needs to be written in a way where they don't need any additional context to understand them. As such, it may make sense to annotate the specific term lists—for example by wrapping them in a new block directive—that are written so that they are independently understandable (without the context of the rest of the page where they're defined).

Taking that idea one step further; if these term definitions wouldn't need the context of any specific page, would it make sense to define them all in a glossary page and only link to them in the other places? That could allow a project to have more than one glossary page with terminology for different parts of the project.