Expand description
The directory function ensures that a directory exists.
Functions
- Creates a backup of a file.
- Cleans up the directory at the given path.
- Creates and returns an instance of
comrak::ComrakOptionswith non- standard Markdown features enabled. This allows for a greater variety of elements in the markdown syntax. - Creates a new directory at the given path.
- Ensures a directory exists, creating it if necessary.
- Extracts the front matter from the given content.
- Finds all HTML files in a directory.
- Formats a header string with an ID and class attribute.
- Minifies a single HTML file.
- Minifies HTML files in the output directory.
- Moves the output directory to the public directory.
- Converts a string to title case.
- Updates the ‘class’ attributes within the provided HTML line. If
.class="is found within the line, it extracts the class value usingclass_regexand replaces it in the correct place usingimg_regex. - Helper function to write XML element
- Writes a minified HTML file.