Commands
You can use the scripts
in package.json
to create new content and develop, format, build, and preview your project from a terminal window.
package.json
scripts
The following scripts for the most common commands (create
, dev
, format
, build
, and preview
) are added for you automatically when you create a project using the create thulite
wizard.
When you follow the instructions to install Thulite manually, you are instructed to add these scripts yourself. You can also add more scripts to this list manually for any commands you use frequently.
You will often use these commands, or the scripts that run them, without any flags. Add flags to the command when you want to customize the command’s behavior. For example, you may wish to start the development server on a different port, or build your site with verbose logs for debugging.
create
Run the following command in your terminal to create new content:
For example, create an about page in the content
directory of your project:
dev
Run the following command in your terminal to start the Hugo development server:
format
Run the following command in your terminal to run the Prettier code formatter:
build
Run the following command in your terminal to create a production build:
preview
Run the following command in your terminal to locally preview the production build: