Skip to content

API

Glossary class reference

mkdocs_ezglossary_plugin.glossary.Glossary

The complete glossary for all sections

Functions
definition(section, term)

Get the definition for a term.

Parameters:

Name Type Description Default
section str

The name of the section

required
term str

The term to get the definition for

required

Returns:

Type Description
str

The definition of the term

get(section, term, linktype)

Get a list of Entry instances for a specific term in a section.

Parameters:

Name Type Description Default
section str

The name of the section

required
term str

The term for which the [Entry] instances should be retreived.

required
linktype str

Defines which type of links should be returned.

refs
returns all references to the term
defs
returns all definitions for the term
required

Returns:

Type Description
list[Entry]

A list of either definitions or references for the given term.

has(section)

Check if the glossary has a section named section.

Parameters:

Name Type Description Default
section str

The name of the section to check

required

Returns:

Type Description
bool

True, if a section with the given name exists.

terms(section)

Return a list of entries for a specific section.

Parameters:

Name Type Description Default
section str

The name of the section.

required

Returns:

Type Description
list[str]

A list of all terms in the specific section.

Entry class reference

mkdocs_ezglossary_plugin.glossary.Entry

An entry in the glossary.

Attributes
definition = definition instance-attribute

The definition of the term.

page = page instance-attribute

The url of the page to which this entry points to.

section = section instance-attribute

The section of the term of this entry. (Since v1.7.0a1)

target = target instance-attribute

The anchor to directly point to this specific link.

term = term instance-attribute

The term of this entry. (Since v1.7.0a1)