This website is built using Docusaurus, a modern static website generator.
- All images are put into an
/imgdirectory and not embedded directly. - All images have
alttexts explaining their purpose and contents. - All basic page elements that can be re-used should be turned into components.
- Code is written in American English.
- Page content is written in Queen's English.
- Page content is cited, sourced, and referenced where deemed necessary.
- All docs/pages are
.mdxfiles. - Code compiles and tests pass.
- Directories follow the correct pattern structure.
- Each pattern page is built using the template (validated by
npm run lint:mdx). - Custom components should not implement their own title, they should use the correct heading (#) level in the page itself to ensure proper url based linking.
- Images need to have padding applied around them, optimally
2rem. - Source code contains no 'TODO' blocks, only a 'FUTURE_WORK' block may be present with a reference to an issue or task.
To install the required packages and otherwise dependencies, run the following command;
npm i npm run startThis command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
To validate that all pattern documentation files follow the required structure:
npm run lint:mdxThis checks that all MDX files in docs/behavioral/, docs/creational/, and docs/structural/ contain the required headers as defined in template.mdx. See scripts/README.md for more details.
Certain pieces of functionality such as switching locales & searching only works in a production environment. To achieve this you'll need to build and 'deploy' the site locally. To do this run the following commands.
npm run buildAnd then to serve the newly created build, simply run.
npm run serveTo deploy the website, there are multiple options available depending on your hosting preferences. But first you should create a .env file in the root directory of the project with the following content:
# This value MUST start and end with a slash '/', unless it's the root '/'.
BASE_URL=''This step is only necessary when you want to differ from the default baseUrl value of /. This is particularly useful when deploying to GitHub Pages under a repository, e.g., https://username.github.io/repository-name/, where the BASE_URL should be set to /repository-name/. See the Docusaurus docs for more information
T.B.A
The Dockerfile can be found in the root directory of the project. To build the Docker image locally, run the following command:
docker build . -t designpatternpediaTo then run the Docker image locally, use the following command:
docker run -p 3000:3000 designpatternpediaThe compiled image can be found on Docker Hub at 'theartcher/designpatternpedia'.
Would you like to propose changes to the pattern-wiki? Then feel free to create a pull request in this repository. Make sure that your PR follows the standards as set in the coding standards. These standards ensure that the wiki is of high quality and that both the users and developers can find the right information quickly. The steps to work on an issue or task are as follows:
- Fork the repository.
- Create a new branch for your changes.
- Make your changes, ensuring they follow the coding standards.
- Run the linter to ensure your changes meet the required structure.
- Create a pull request describing your changes.
- Wait for the review and feedback from the maintainers.
- Profit.