Hexo Guide
Add A Contact Form To Hexo
Here is a guide for integrating Fabform with a Hexo site:
Step 1: Create a new Hexo site
If you haven’t set up a Hexo site yet:
-
Install Hexo CLI: Install Hexo CLI globally using npm:
-
Create Hexo Site: Run the following commands to create a new Hexo site named
hexo-personal-site
: -
Install Dependencies: Install dependencies for the Hexo site:
-
Start Hexo Server: Launch the Hexo development server:
Hexo will start a hot-reloading development environment accessible at http://localhost:4000
.
Step 2: Add a Contact Section to your Hexo site
-
Create Contact Page: Inside the
source/_posts
directory of your Hexo site, create a new directory namedcontact
. -
Create Markdown File: Inside the
contact
directory, create a new markdown file namedindex.md
. -
Update Contact Page Content: Replace the content of
index.md
with the following code block:Note: Replace
{your-form-endpoint}
with the unique form endpoint provided by Fabform.
Step 3: Run your Hexo site locally to finalize setup
-
Start Hexo Server: Run the following command to see your Hexo form in action at
localhost:4000/contact/
:
That’s it! Your Hexo site is now integrated with Fabform for handling form submissions.