# Astro Starter Kit: Minimal ``` npm create astro@latest -- --template minimal ``` [![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/astro/tree/latest/examples/minimal) [![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/astro/tree/latest/examples/minimal) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/withastro/astro?devcontainer_path=.devcontainer/minimal/devcontainer.json) > πŸ§‘β€πŸš€ **Seasoned astronaut?** Delete this file. Have fun! ## πŸš€ Project Structure Inside of your Astro project, you'll see the following folders and files: ``` / β”œβ”€β”€ public/ β”œβ”€β”€ src/ β”‚ └── pages/ β”‚ └── index.astro └── package.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. There's nothing special about `src/components/`, but that's where we like to put any Astro/React/Vue/Svelte/Preact components. Any static assets, like images, can be placed in the `public/` directory. ## 🧞 Commands All commands are run from the root of the project, from a terminal: | Command | Action | | :------------------------ | :----------------------------------------------- | | `npm install` | Installs dependencies | | `npm run dev` | Starts local dev server at `localhost:3000`. Note comment out/ uncomment the `remarkPlugins:` related to either `ing-web` or `lion` portal in `astro.config.mjs` | | `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 | ## πŸ‘€ Want to learn more? Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat). ## Site search integration by PageFind > Pagefind is a fully static search library that aims to perform well on large sites, while using as little of your users’ bandwidth as possible, and without hosting any infrastructure. The feature is advertised by Astro website: [Astro Starlight Site Search Guide](https://starlight.astro.build/guides/site-search/) ### How it is integrated * Note, follow [Pagefind documentation](https://pagefind.app/docs/) for more details. For tests purposes, add a UI markup to any astro page to enable search component on a page: ```javascript ``` ### How to run * Run `npm run build` to generate static html files * Run `npm run pageFind` to index static html files in `dist` folder and generate files in `dist/pagefind/` that we import in the UI search component part in the snippet above. Note, the UI search component will not show up on the page if this step is not run * Run `npm run preview`. This will run the app from the dist folder ## Migration of ing-bank/lion/packages-node ### rocket-preset-extend-lion-docs * It is not possible to use `rocket-preset-extend-lion-docs` out of the box. The reason is that its code relies on some Rocket specific global JS variable names (f.e. `plugins` variable in node_modules/plugins-manager/src/addPlugin.js). Also it specifies the order among existing plugins to inject the its internal plugins (see more for details [rocket-preset-extend-lion-docs source](https://github.com/ing-bank/lion/blob/master/packages-node/rocket-preset-extend-lion-docs/preset/extendLionDocs.js#L66)). We can't reuse that order. Same applies to the dependent `remarkUrlToLocal` plugin. To integrate `rocket-preset-extend-lion-docs` the following steps were done: * `src/utils/remark-plugings/wrapper-for-rocket-preset-extend-lion-docs/assets` contains the patched files taken from the original plugins. Then during the installation those files are copied to `node_modules`. The script for copying is defined in `src/utils/remark-plugings/wrapper-for-rocket-preset-extend-lion-docs/copy.sh` and it is currently triggered by `postinstall` command in `package.json` * `src/utils/remark-plugings/wrapper-for-rocket-preset-extend-lion-docs/wrapper.js` contains a copy of `P00019-ing-web/rocket.config.mjs`. That is configuration setup where we specify the replacement rules. F.e here we specify that `