Each glossary entry in the mkdocs glossary.md file is written as follows in the editor, with a line space between entries:
Transaction Fee { #transaction_fee }
: Amount of cryptocurrency that must be paid by anybody submitting a transaction for inclusion on a blockchain. These fees reward block producers for their work processing transactions, and typically vary depending on network congestion.
Trustless { #trustless }
: A quality of a decentralized blockchain. Requires no parties to know or trust one another because there is no intermediary, i.e., no individual or central entity has authority or control over the system. Instead, transactions are processed according to agreed upon governance through [smart contracts](#smart_contract). At Flare, the process is secured at the network level, meaning that it is inherited by all subprotocols.
Each link to a glossary entry (for example: glossary.md#blockchain) or a search on blockchain returns the entire glossary as one large paragraph: the entire glossary as one paragraph
It would seem that mkdocs is not recognizing a new paragraph for each entry. How can we write the markdown for each glossary entry and be able to target each search entry from other pages or the search bar?
We have coded the markdown as follows:
Transaction Fee { #transaction_fee }
: Amount of cryptocurrency that must be paid by anybody submitting a transaction for inclusion on a blockchain. These fees reward block producers for their work processing transactions, and typically vary depending on network congestion.
Trustless { #trustless }
: A quality of a decentralized blockchain. Requires no parties to know or trust one another because there is no intermediary, i.e., no individual or central entity has authority or control over the system. Instead, transactions are processed according to agreed upon governance through [smart contracts](#smart_contract). At Flare, the process is secured at the network level, meaning that it is inherited by all subprotocols.
Expected search and links (glossary.md#entry_term) to return the specific entry, not the whole page.
You need to use headings to break up the search index into smaller blocks.
McDocs' search index will index a page in two ways:
For example, consider the following example page:
To get the search index to behave as you desire, you will need to use headings rather than definition lists.
Note that you can still use definition lists, but the rendered HTML is not exactly what you might expect. It will still work though.