mdBook preprocessor to create Reference Tables.
Table of Contents
-
Install the cli tool:
cargo install mdbook-reference-table
-
Add the preprocessor to your
book.toml
file:[preprocessor.reference-table] reference-table = "./reference-table.yaml" # Relative to your book.toml
-
Consult and edit your reference table file
reference-table.yaml
. Example:reference-table: - id: "audita-quot" path: "content/subject-1/audita-quot.md" - id: "bos-quae-inde-limen" path: "content/subject-2/subfolder-1/bos-quae-inde-limen.md" - id: "esse-corpora-achaidas-sacros-ad-quas" path: "content/subject-3/subfolder-1/subsubfolder-1/esse-corpora-achaidas-sacros-ad-quas.md"
-
Add references:
<!-- content/subject-1/audita-quot.md --> - Self reference: {{reference: {id: "audita-quot", title: "Audit quot"}}}. - Same level reference: {{reference: {id: "aliter-facta-cornibus-tandem", title: "Aliter facta cornibus tandem"}}}. - Deep nested reference: {{reference: {id: "bos-quae-inde-limen", title: "Bos quae inde lime"}}}. - Deeper nested reference: {{reference: {id: "esse-corpora-achaidas-sacros-ad-quas", title: "Esse corpora Achaidas sacros ad quas"}}}.
-
Build your book and serve it locally:
mdbook serve --hostname 0.0.0.0
-
Verify the rendered links are correct.
Copyright (C) 2024 Jefferson Johannes Roth Filho. See LICENSE
for more information.
Jefferson Roth - jjrothfilho@gmail.com
crates.io: mdbook-reference-table