### Install Mermaid CLI Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Install the Mermaid command-line interface globally using npm to generate SVG diagrams from .mmd files. ```bash npm install -g @mermaid-js/mermaid-cli ``` -------------------------------- ### Install draw.io Desktop App Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Install the draw.io desktop application using Homebrew. This command also sets up an alias for easier command-line access. ```bash brew install --cask drawio alias draw.io='/Applications/draw.io.app/Contents/MacOS/draw.io' ``` -------------------------------- ### Sync Vale linter packages Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Downloads the latest tech-docs-linter package and unzips it to your StylesPath. Run this command after installing Vale and before linting. ```bash vale sync ``` -------------------------------- ### Update a draw.io diagram Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Opens a draw.io diagram for editing. Ensure you have draw.io installed. ```bash draw.io source/images/originals/top-level-technical-diagram.drawio ``` -------------------------------- ### Lint the entire repository with Vale CLI Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Runs the Vale linter on all files in the current directory and its subdirectories. Ensure Vale is installed and configured. ```bash vale . ``` -------------------------------- ### Dockerized Middleman Server Output Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md This output indicates that the Middleman server has successfully started and is accessible via localhost or 127.0.0.1 on port 4567. ```bash == View your site at "http://localhost:4567", "http://127.0.0.1:4567" == Inspect your site configuration at "http://localhost:4567/__middleman", "http://127.0.0.1:4567/__middleman"/usr/local/bundle/gems/tilt-2.0.11/lib/tilt/redcarpet. ``` -------------------------------- ### Preview Documentation Changes with Docker Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Run this script to preview your documentation changes locally using a Dockerized Middleman server. Live reload is enabled for most configuration changes. ```bash ./preview-with-docker.sh ``` -------------------------------- ### Generate SVG diagrams with draw.io Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Generates SVG versions of draw.io diagrams and saves them to the specified output folder. Use the -x flag for export. ```bash draw.io -x -o source/images/top-level-technical-diagram.svg source/images/originals/top-level-technical-diagram.drawio ``` ```bash draw.io -x -o source/images/technical-flow-diagram.svg source/images/originals/technical-flow-diagram.drawio ``` -------------------------------- ### Lint a specific directory with Vale CLI Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Runs the Vale linter on files within a specified directory. Useful for targeted linting. ```bash vale ./source/go-live ``` -------------------------------- ### Update Vale linter ruleset Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Updates the package version in the Vale config file and syncs the latest ruleset. Test the linter with the new ruleset before merging. ```bash vale sync ``` ```bash vale ./source ``` -------------------------------- ### Generate SVG from Mermaid Diagram Source: https://github.com/govuk-one-login/tech-docs/blob/main/README.md Use the mmdc command to generate an SVG version of a mermaid diagram. Specify the input .mmd file and the output SVG file path. ```bash mmdc -i technical-flow-diagram-extended.mmd -o ../technical-flow-diagram-extended.svg ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.