Expand description
ddoc is a markdown based static site generator.
Complete documentation at https://dystroy.org/ddoc
§Usage overview
Create a directory, then move to it
mkdir website & cd websiteInitialize the site:
ddoc --initThis creates:
- a
.gitignorefile, which eases inclusion of your site in a git managed project - a
ddoc.hjsonfile, holding the basic properties and navigation - a
srcfolder, for your markdown files, CSS style sheets and images
/src/css/site.css is a default CSS file, a very simple one which you can remove, or keep as basis for your own incremental changes to get the layout and look you desire.
To build your site, run
ddocThis updates a site directory, whose content can be sent to your server.
To test it locally, run
ddoc --serveStructs§
- Args
- Launch arguments
- Cargo
Toml - Cargo
Toml Package - Config
- Element
- Element
Key - Element
List - A collection of elements
- Element
List Deserializer - Init
Values - Menu
- The settings for the insertion of a menu in a web page.
- NavLink
- A single link in the navigation bar
- Page
- Page
List - Page
Path - Page
Writer - Project
- A ddoc project, with its configuration, pages, and location which allows building it.
- Server
- Static
Entry - Implicit reference to one of the files in
/src/jsor/src/css - Toc
- The settings for the insertion of a table of content in a web page.
- UiOptions
Enums§
- Attribute
Value - The value of an attribute in a ddoc element (
ddoc-link,ddoc-menu, etc). - DdError
- Element
Content - Element
Type - File
Change - List
Item - NavLink
Part - Text
Constants§
Statics§
Functions§
- bool_
true - compare_
versions - duration_
since - escape_
attr - escape_
hjson_ string - escape_
text - find_
file_ ignore_ case - init_
ddoc_ project - init_
hjson_ in_ dir - Initialize a ddoc.hjson file in the specified directory (do nothing if one already exists)
- init_
src_ in_ dir - Create and fill the
src/directory in the givendir. - is_
current_ version_ older_ than - project_
subdirectory - Search direct subdirectories of
parentfor a ddoc project (a directory containing a validddoc.hjsonfile). - read_
file - Deserialize an object from a JSON, TOML, or HJSON file.
- rebuild_
on_ change - watch for file changes to keep a project up to date
- run
- Run the ddoc command line application