From 999ec7a65d9d0838e2fbd9ca01986a522043744b Mon Sep 17 00:00:00 2001 From: Heather Yu <35639529+hetd54@users.noreply.github.com> Date: Thu, 2 May 2024 12:38:51 -0400 Subject: [PATCH] docs: replace astro docs with mmp specific docs --- README.md | 87 +++++++++++++++++++++++++++---------------------------- 1 file changed, 42 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 4fbb41d..5dc59e1 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,66 @@ # mmp -Mesoamerican Migration Project - -```sh -npm create astro@latest -- --template blog -``` - -[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/blog) -[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/blog) -[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/blog/devcontainer.json) - -> πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun! -![blog](https://github.com/withastro/astro/assets/2244813/ff10799f-a816-4703-b967-c78997e8323d) - -Features: - -- βœ… Minimal styling (make it your own!) -- βœ… 100/100 Lighthouse performance -- βœ… SEO-friendly with canonical URLs and OpenGraph data -- βœ… Sitemap support -- βœ… RSS Feed support -- βœ… Markdown & MDX support +Mesoamerican Migration Project ## πŸš€ Project Structure -Inside of your Astro project, you'll see the following folders and files: - ```text β”œβ”€β”€ public/ + β”œβ”€β”€ admin/ + β”œβ”€β”€config.yml + β”œβ”€β”€ src/ -β”‚Β Β  β”œβ”€β”€ components/ -β”‚Β Β  β”œβ”€β”€ content/ -β”‚Β Β  β”œβ”€β”€ layouts/ -β”‚Β Β  └── pages/ +β”‚ β”œβ”€β”€ components/ +β”‚ β”œβ”€β”€ content/ +β”‚ β”œβ”€β”€ layouts/ +β”‚ └── pages/ β”œβ”€β”€ astro.config.mjs β”œβ”€β”€ README.md β”œβ”€β”€ package.json └── tsconfig.json ``` -Astro looks for `.astro` or `.md` files in the `src/pages/` directory. Each page is exposed as a route based on its file name. +## Getting Started with Development -There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. +### Install Dependencies -The `src/content/` directory contains "collections" of related Markdown and MDX documents. Use `getCollection()` to retrieve posts from `src/content/blog/`, and type-check your frontmatter using an optional schema. See [Astro's Content Collections docs](https://docs.astro.build/en/guides/content-collections/) to learn more. +Install the `node`-dependencies and the workspaces: -Any static assets, like images, can be placed in the `public/` directory. +```zsh +npm install +``` + +### Develop Site in Workspace + +Run the example site in develop mode: + +```zsh +npm run start +``` -## 🧞 Commands +If you want to run the Static CMS backend, then you need to start the server in a +separate terminal window. -All commands are run from the root of the project, from a terminal: +```shell +npx @staticcms/proxy-server +``` + +In the `public/admin/config.yml` file, change the `local_backend` parameter to: + +```yml +local_backend: true +``` -| Command | Action | -| :------------------------ | :----------------------------------------------- | -| `npm install` | Installs dependencies | -| `npm run dev` | Starts local dev server at `localhost:4321` | -| `npm run build` | Build your production site to `./dist/` | -| `npm run preview` | Preview your build locally, before deploying | -| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` | -| `npm run astro -- --help` | Get help using the Astro CLI | +Then load the `https://localhost:4321/admin/index.html` to view the Static CMS UI. -## πŸ‘€ Want to learn more? +### Use Prettier Code Formatter in WebStorm -Check out [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). +To set up the prettier code formatter, first install the dependencies (`npm install`) and then ensure that `prettier` +is activated in the dialog box: WebStorm > Preferences > Languages and Frameworks > JavaScript > Prettier. -## Credit +The settings should be: -This theme is based off of the lovely [Bear Blog](https://github.com/HermanMartinus/bearblog/). \ No newline at end of file +- Prettier package: `yarn:package.json:prettier` (only selectable if you have previously run `yarn install`) +- Run for files: the default suggested by WebStorm +- [x] On 'Reformat Code' action +- [x] On save