Run the following command to create a new Padma project:
npx padma create my-project
During project setup, you'll be prompted to choose your preferred package manager. If you're not sure, you can go with the default one.
? Which package manager would you like to use? (npm, yarn, pnpm)
You will also be asked if you want to initialize a Git repository for your project. If you choose yes, it will automatically create a Git repository for you.
? Would you like to initialize a Git repository? (y/n)
Once the project is created, the directory will be structured as follows:
Sure! Here's the updated section that includes information on creating a custom theme within the packages
folder:
Once the project is created, the directory will be structured as follows:
my-project/
|__ node_modules/
|__ packages/
| |__ blank-theme
|__ package.json
|__ padma.settings.ts
|__ favicon.ico
The blank-theme
will be inside the packages/
folder as the default theme. You can also create your own custom themes within the packages/
folder, just like the blank-theme
. To do so, create a new folder under packages/
and add your theme files. Then, update the padma.settings.ts
file to point to your custom theme.
For example, you could create a new theme called custom-theme
:
my-project/
|__ packages/
| |__ blank-theme
| |__ custom-theme
Afterward, update the padma.settings.ts
to use custom-theme
:
// In padma.settings.ts
{
"activeTheme": "@padmadev/custom-theme'",
}
To run the project locally, use the following command:
cd my-project && npx padma dev
This starts the development server at http://localhost:3000, and it will automatically reload whenever you make changes in the packages/
directory.
Now, open the project in your code editor and make edits to the packages/blank-theme
folder. The browser will auto-refresh to reflect the changes.
You can connect your own Strapi instance to Padma by editing the config/theme.settings.ts
file.
// Example connection setup for Strapi
Note: Changes to Strapi data won't automatically update on the site unless they are made within the packages/
directory. You’ll need to manually refresh the browser to see new data.
Start with Padma's Step-by-Step Tutorial to learn how to use Padma effectively.
Explore various guides to help you work with Padma, including troubleshooting and common challenges.
Once you're comfortable with the basics, refer to the API Reference for detailed information about Padma CLI, packages, plugins, and themes.
When you're ready to deploy your site, follow the instructions in the Deployment section. We recommend using Vercel for an easy deployment process.