Contributing a Quickstart Guide¶
A quickstart guide is a teaching tool that helps new users get started with a specific project type in DDEV. This document explains how to create and contribute a new quickstart guide.
Project Type quickstarts are pretty easy to add as just docs in quickstarts,
- We want to keep them consistent.
- To make them maintainable, we need automated tests.
Before You Begin¶
- Review existing quickstarts in the DDEV documentation for reference.
- Review existing automated tests to see how the tests work.
Creating a Quickstart¶
The quickstart can be based on one of the existing quickstarts.
The general intention is that it should be a teaching tool. It will not cover all the complexities of the project type being discussed. Try for the most straightforward, repeatable, testable approach so that a naive person with no experience on the project type can walk through it. People with more experience with the project type should be able to adapt the provided instructions to meet their needs.
In general:
- Add a link to the upstream installation or “Getting Started” web page, so people can know where the instructions are coming from.
- Use
mkdir my-<projecttype>-site && cd my-<projecttype>-siteas the opener. (There are places like Magento 2 where the project name must be used later in the recipe, in those cases, use an environment variable, likePROJECT_NAME=my-<projecttype>-site.) - Composer-based recipes are preferable, unless the project does not use or prefer composer.
- If your project type does not yet appear in the DDEV documentation, your PR should add the name to the .spellcheckwordlist.txt so it can pass the spell check test.
- If your project installation requires providing an administrative username and/or password, make sure to indicate clearly in the instructions what it is.
-
If your project type includes folders that accept public files (such as images), for example,
public/media, make sure to add them to the config command:
Automated Tests¶
- Each new quickstart needs to have automated tests.
- You can base your test on an example like the Backdrop test and adapt to cover the steps in your quickstart.
-
You can run
batslocally.- See
bats-coredocumentation. - See
bats-assert,bats-file, andbats-supportlibraries documentation. -
If you install
batslibraries manually (without package managers), make sure to set theBATS_LIB_PATHenvironment variable to the appropriate path. For example: -
To run the docs tests,
cd docs && bats testsorbats tests/backdrop.batsfor example.
- See
Final Note¶
THANK YOU FOR CONTRIBUTING! ❤️