We'll create a simple DKCutter named dkcutter-website-simple
for generating basic websites.
This is a great way to get started with DKCutter if you're new to creating websites.
Or you can use --init
option to create a base DKCutter template project.
Open your terminal and navigate to your desired directory.
Then, run the following command to create a new directory for your DKCutter and cd
into it:
dkcutter.json
fileThe dkcutter.json
file contains configuration options that DKCutter uses to generate your project.
Create a new file named dkcutter.json
and paste the following content into it, replacing the placeholder text with your desired project name:
dkcutter.json
properties:"$schema"
: This property specifies the location of the DKCutter schema file that defines the valid configuration options."projectName"
: This property defines the name of your website project."projectSlug"
: This property defines the name of the directory that will be created for your website.
It uses a template that converts the project name to lowercase, replaces spaces with hyphens, and removes any leading or trailing whitespace.Create a new directory named template/{{dkcutter.projectSlug}}
inside your DKCutter project directory.
This directory will hold the template files that will be used to generate your website.
Inside the template/{{dkcutter.projectSlug}}
directory, create a new file named index.html
and paste the following basic HTML code into it:
This code defines a simple HTML page with a title that matches your project name.
Navigate back to your terminal and run the following command to generate your website project:
The .
at the end of the command specifies the current directory where your DKCutter project resides.
You can expect similar output:
Resulting directory should be inside your work directory with a name that matches projectSlug
you defined.
Inside that directory there should be index.html
with generated source: