Crate ddoc

Crate ddoc 

Source
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 website

Initialize the site:

ddoc --init

This creates:

  • a .gitignore file, which eases inclusion of your site in a git managed project
  • a ddoc.hjson file, holding the basic properties and navigation
  • a src folder, 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

ddoc

This updates a site directory, whose content can be sent to your server.

To test it locally, run

ddoc --serve

Structs§

Args
Launch arguments
CargoToml
CargoTomlPackage
Config
Element
ElementKey
ElementList
A collection of elements
ElementListDeserializer
InitValues
Menu
The settings for the insertion of a menu in a web page.
NavLink
A single link in the navigation bar
Page
PageList
PagePath
PageWriter
Project
A ddoc project, with its configuration, pages, and location which allows building it.
Server
StaticEntry
Implicit reference to one of the files in /src/js or /src/css
Toc
The settings for the insertion of a table of content in a web page.
UiOptions

Enums§

AttributeValue
The value of an attribute in a ddoc element (ddoc-link, ddoc-menu, etc).
DdError
ElementContent
ElementType
FileChange
ListItem
NavLinkPart
Text

Constants§

DDOC_VERSION

Statics§

CONFIG_FILE_NAME
HTML_START

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 given dir.
is_current_version_older_than
project_subdirectory
Search direct subdirectories of parent for a ddoc project (a directory containing a valid ddoc.hjson file).
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

Type Aliases§

AttributeKey
Attributes
ClassName
DdResult