Getting Started
Prerequisite
To use Hawk.js, you will need the following prerequisites:
- Node.js (v18.0 or later) installed on your system. You can download it from https://nodejs.org/en/download.
- Internet to install Hawk.js from the npm registry.
Once you have these prerequisites in place, you can follow the installation steps in the project’s documentation to set up and run Hawk.js.
Ready to start improving your SEO with Hawk.js? Here’s how:
Installation
Install Hawk.js using your favourite package manager
yarn add @cresteem/hawk-js -D
Initiate the Configuration File
Use the following command to create a default configuration file:
hawk init
This will generate a hawk.config.js
file in your project directory.
Customize Your Configuration
- Open the newly created
hawk.config.js
file. - Define the patterns you wish to include and exclude.
- Customize additional settings as per your requirements.
Learn more in the Configurations
Credentials
For certain indexing strategies, you’ll need to provide specific credentials.
- For
G-Webmaster
,G-Webmaster2
, andG-Index
strategies, you will need your Google Webmaster Tools credentials. - For the
IndexNow
strategy, FTP credentials are sufficient for the submission process.
Be sure to input these credentials in the configuration file as per the requirements for the strategy you are using.
Learn more in the Google Credentials and FTP Credentials.
Run the CLI
To run Hawk.js with a specific strategy, use the command hawk --strategy <number>
, where <number>
is:
1
forIndex-Now
2
forG-Webmaster
3
forG-Webmaster2
4
forG-Index
Along with optional parameters like --include
, --exclude
, and --prettify
.
Learn more in the CLI References.
What’s Next?
Now that you have Hawk.js set up and ready to go, the next step is to configure it to suit your project needs.
Head over to the Configuration Details page to learn how to:
- Customize your
hawk.config.js
file. - Define the URLs to include or exclude from the sitemap.
This will ensure Hawk.js runs optimally for your website and automates your SEO process as per your preferences.
Keywords:
- Hawk.js
- SEO setup
- installation guide
- sitemap generation
- Google Webmaster Tools
- IndexNow
- SEO automation
- configuration tutorial
- Node.js setup