PRPL requires a current or LTS version of Node.
The recommended way to get started with PRPL is to run the initializer in your terminal:
npx -y create-prpl@latest
The initializer (
create-prpl) does the following things:
- Clone the basic example site repo
- Remove the git history from the basic example site
- Run the server locally at http://localhost:8000
If you prefer not to run the initializer, feel free to either clone the basic example or review it and start your own project by following the structure.
Write your website
From here you can adapt your project to your liking. The structure of a PRPL site looks like this:
prpl-example-basic └─ content └─ dist └─ src
contentis where you keep your content files written in markdown or HTML
distis the output directory that PRPL clears and writes to when you run the build command
The reason for this opinionated project structure is to achieve source-output alignment.
The basic bin commands used by PRPL are:
prpl, which runs the main
prpl-server, which runs the
@prpl/serverlocal development server
If you initialized your site with
commands are mapped to npm scripts:
npm run build
npm run dev
Deploy your website
PRPL outputs static HTML files, so you can host your site wherever you like easily. A recommended solution is Firebase Hosting.
See the API reference next.