From d2c4f30d84f933796c3ddd194e566d8c7d40895d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADnez?= <6764315+germartinez@users.noreply.github.com> Date: Wed, 31 Jan 2024 11:46:18 +0100 Subject: [PATCH] Update README file (#326) * Update README file * Fix broken links checks * Fix Vale error * Apply suggestions from code review * Update README.md --- README.md | 76 +++++++++++++++++++++++++++++++++++++---------- pages/glossary.md | 6 ++-- 2 files changed, 63 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 89e68bcc..38aa412c 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,75 @@ -# Safe{Docs} +# Safe Documentation [![License](https://img.shields.io/github/license/safe-global/safe-docs)](https://github.com/safe-global/safe-docs/blob/main/LICENSE.md) ![GitHub package.json version (branch)](https://img.shields.io/github/package-json/v/safe-global/safe-docs) - -# Safe{Docs} +This repository hosts [Safe](https://safe.global) documentation. -This repository hosts [Safe](https://safe.global)'s documentation website, built with [Nextra](https://nextra.site). Live version can be found at [docs.safe.global](https://docs.safe.global). +The documentation is built with [Nextra](https://nextra.site) and is live at [docs.safe.global](https://docs.safe.global). -## Quick Start +## Installation -First, run `pnpm i` to install the dependencies. +Install the dependencies using [pnpm](https://pnpm.io): -Then, run `pnpm dev` to start the development server and visit `localhost:3000``. +``` +pnpm install +``` -## Build +## Development -Run `pnpm build` to build the site. The output will be in the `out` folder. +Git hooks are set up to run tests and linting checks before every `git push`. These hooks can be executed locally by running the following command: -Run `pnpm start` to serve the site locally. +``` +pnpm prepush +``` -## Test +All links in the documentation are checked for validity on every pull request. These checks can be executed locally by running the following command: -Run `pnpm test` to run the tests. +``` +pnpm linkcheck +``` + +## Execution + +The project can be run with a server that's executed in development and production mode. + +### Development mode + +Run the server in development mode using the following command: + +``` +pnpm dev +``` + +### Production mode + +Build the project: + +``` +pnpm build +``` + +Run the server in production mode using the following command: + +``` +pnpm start +``` + +## Testing + +Create an environment file in the root of the project and copy the content from the `.env.example` file using the following command: + +``` +cp .env.example .env +``` + +Remember to update the environment variables once the `.env` file is created. + +Run the tests using the following command: + +``` +pnpm test +``` ## License @@ -30,7 +77,4 @@ This project is licensed under the [MIT License](./LICENSE.md). ## Contributing -Contributions are welcome! Please open an issue or submit a pull request by following our [contributions guidelines](./CONTRIBUTING.md). - -Git hooks are set up to run tests and linting before every push. You can run these hooks locally with `pnpm prepush`. All links will also be checked for validity on every pull request. You can check them locally with `pnpm linkcheck`. - +Contributions are more than welcome! Please open an issue or create a pull request by following our [contributions guidelines](./CONTRIBUTING.md). diff --git a/pages/glossary.md b/pages/glossary.md index 0f624921..6b5bc34c 100644 --- a/pages/glossary.md +++ b/pages/glossary.md @@ -89,7 +89,7 @@ See also: Safe Apps are web applications that run in the Safe Apps marketplace. They support Safe, use the Safe Apps SDK to interact with it, and aren't owned, controlled, maintained, or audited by Safe. See also: -- [Safe Apps SDK documentation](./apps-sdk-overview.md) on docs.safe.global +- [Safe Apps SDK documentation](./apps-sdk-overview.mdx) on docs.safe.global ## SafeAuth @@ -105,7 +105,7 @@ See also: A Safe Guard is a smart contract that adds restrictions on top of the n-out-of-m scheme that Safe accounts offer. They make checks before and after the execution of a Safe transaction. See also: -- [Safe Guards documentation](./smart-account-guards.md) on docs.safe.global +- [Safe Guards documentation](./smart-account-guards.mdx) on docs.safe.global - [Zodiac Guards](https://zodiac.wiki/index.php?title=Category:Guards) on zodiac.wiki - [Get the enabled Safe Guard](./sdk-protocol-kit/reference.md#getguard) and [enable a Safe Guard](./sdk-protocol-kit/reference.md#createenableguardtx) with the Safe{Core} SDK on docs.safe.global @@ -114,7 +114,7 @@ See also: A Safe Module is a smart contract that adds functionality to Safe while separating module logic from Safe core contracts. See also: -- [Safe Modules documentation](./smart-account-modules.md) on docs.safe.global +- [Safe Modules documentation](./smart-account-modules.mdx) on docs.safe.global - [Safe Modules repository](https://github.com/safe-global/safe-modules) on github.com - [Zodiac Modules](https://zodiac.wiki/index.php?title=Category:Module) on zodiac.wiki - [Get the enabled Safe Modules](./sdk-protocol-kit/reference.md#getmodules) and [enable a Safe Module](./sdk-protocol-kit/reference.md#createenablemoduletx) with the Safe{Core} SDK on docs.safe.global