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.

If you want to test it locally, you may run

ddoc --serve

Structs§

Args
Launch arguments
CargoToml
CargoTomlPackage
Config
InitValues
Menu
MenuInsert
A placeholder to insert the menu at this position in the nav bar
NavDir
Either the header or footer navigation configuration (could be used elsewhere)
NavLink
A single link in the navigation bar
Page
PagePath
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
UiOptions

Enums§

DdError
FileChange
MenuItem
NavComponent

Statics§

CONFIG_FILE_NAME
HTML_START

Functions§

bool_true
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.
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§

ClassName
DdResult