Skip to content

Mkdocs

.qd.out.mkdocs.getVersion

Returns the version of mkdocs

Returns:

Name Type Description
string version number

.qd.out.mkdocs.isInstalled

Checks whether mkdocs is installed on the server or not.

Returns:

Name Type Description
boolean

.qd.out.mkdocs.write

Organizes Markdown files generated by the .qd.doc function in a directory structure that can be consumed by mkdocs to build a static HTML site. Copy the files output by this function to an mkdocs dev environment and execute mkdocs serve or mkdocs build to build a static HTML site.

Mkdocs is not required to run this function since it doesn't actually build the site.

Parameter(s):

Name Type Description
settings dict Optional. Pass generic null to use defaults
settings.out symbol Path to the generated Markdown files on disk. By default it will be determined from output.out
settings.config symbol | string | string[] Path/contents of a mkdoc.yml file. A default config file will be used if nothing is specified
settings.index symbol | string | string[] Path/contents of an index file. A default index file will be used if nothing is specified
settings.assets symbol Path to a directory holding static assets referenced in the user specified config file
settings.sitename symbol Symbolic name for the site. This will be ignored if the config file is supplied by the user
settings.group symbol Specifies grouping in Markdown files. Options are category and subcategory. Default is category.
settings.sanitizeURL boolean Specifies whether to sanitize the file names (URLs) by replacing spaces and underscores with hyphen. Default is false.
output dict Output from the .qd.doc function A dictionary of path to the output directory (MD files), markdown content in each file and the table of errors
output.out hsym The directory where the generated Markdown files are written on disk
output.md table A table of items and their generated Markdown content
output.md.file symbol Name of the Markdown file the item would exist in
output.md.name symbol Name of the item
output.md.kind symbol Type of the item
output.md.module symbol The module this item belongs to
output.md.category symbol The category this item belongs to
output.md.subcategory symbol The subcategory this item belongs to
output.md.content string Markdown content of the item
output.error table A table of errors encountered during Markdown generation
output.error.ref symbol Name of the item
output.error.qdType string The documented QDoc type
output.error.errorType symbol The type of error (PARSE or RESOLUTION)
output.error.error string The error message

Returns:

Name Type Description
<returns> dict Filenames of all the md files written to the disk
<returns>.out symbol
<returns>.md table
<returns>.md.file symbol

See Also: .qd.doc

Example: Setup with default settings

 .qd.out.mkdocs.write[::] .qd.doc[::] `.foo.q

Example: Setup with user defined config, index and assets

 .qd.out.mkdocs.write[`config`index`assets!`:/path/to/mkdocs.yml`:/path/to/index.md`:/path/to/assets] .qd.doc[::] `.foo.q

Example: Group the items by subcategory

 .qd.out.mkdocs.write[``group!``subcategory] .qd.doc[``group!``subcategory] `.foo.q