Appearance
Kantan CMS Hosting
Overview
Kantan CMS provides a built-in static site hosting service, allowing you to publish your website directly from the platform. This service is designed for static websites, including those generated from modern frameworks like React, Vue, or other static site generators (SSG).
With Kantan CMS hosting, you can:
- Deploy your website without managing separate hosting infrastructure
- Receive a free subdomain at
<project_id>.kantan-cms.website - Connect your own custom domain with DNS configuration
- Manage deployments directly from the CMS interface
Hosting Methods
Kantan CMS offers two primary methods for deploying your website:
1. Host with ZIP File
This method allows you to upload a pre-built website as a ZIP archive:
Build your website
- Generate a static version of your website using your preferred framework or tools
- Ensure your build includes an
index.htmlfile at the root level
Create a ZIP archive
- Compress your built website files into a ZIP archive
- Make sure the structure maintains
index.htmlat the root level of the ZIP
Upload to Kantan CMS
- Navigate to Hosting > Build Pre-Host in your project
- Select "Upload ZIP File"
- Choose your ZIP archive and upload it
- Review the pre-hosted version to ensure everything looks correct
Publish your website
- Once you've verified the pre-hosted version, click "Build Host"
- Your website will be deployed and available at
<project_id>.kantan-cms.website
2. Host with GitHub Actions
This method enables continuous deployment from a GitHub repository:
Set up GitHub integration
- Visit
https://github.com/apps/kantan-cms-appand authorize the app to access your repository - This allows Kantan CMS to trigger builds and deployments from your GitHub repository
- Visit
Create a GitHub Action workflow
- Add a GitHub Actions workflow file to your repository (e.g.,
.github/workflows/deploy.yml) - Use the following template as a starting point:
- Add a GitHub Actions workflow file to your repository (e.g.,
yaml
name: Deploy to Kantan CMS
on:
workflow_dispatch:
inputs:
project_id:
description: "project_id"
required: true
cms_url:
description: "cms_url"
required: false
env:
CMS_API_KEY: ${{ secrets.CMS_API_KEY }}
PROJECT_ID: ${{ github.event.inputs.project_id }}
CMS_BASE_URL: ${{ github.event.inputs.cms_url }}
steps:
# Add your build and deployment steps here
# For example:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- run: npm ci
- run: npm run build
# Add the Kantan CMS deployment step
# (Refer to the GitHub Integration documentation for the exact syntax)Configure GitHub integration in Kantan CMS
- Go to Settings > GitHub Integration
- Enter your repository information
- Save the configuration
Deploy with GitHub
- Navigate to Hosting > Build Pre-Host
- Select "Deploy With GitHub"
- Enter the required information
- Trigger the deployment
Publish your website
- Once you've verified the pre-hosted version, click "Build Host"
- Your website will be deployed and available at
<project_id>.kantan-cms.website
URL Routing Behavior
Kantan CMS hosting handles URL routing in specific ways that are important to understand:
URLs without trailing slash: Automatically adds
.htmlto the suffix- Example:
example.kantan-cms.website/aboutservesabout.html
- Example:
URLs with trailing slash: Serves the
index.htmlfile in that directory- Example:
example.kantan-cms.website/blog/serves/blog/index.html
- Example:
This behavior is important to consider when structuring your website and creating internal links.
Custom Domain Configuration
To use your own domain with Kantan CMS hosting:
- Go to Settings > Hosting in your project
- Enter the custom domain you want to use
- Save the configuration
- A custom domain configuration section will appear with:
- A CNAME record to point your domain to Kantan CMS servers
- A TXT record to verify domain ownership
- Add these records to your domain's DNS configuration through your domain registrar
- Return to Kantan CMS and click "Refresh" to check your verification
- Once verified, your website will be accessible through your custom domain
For more detailed instructions on DNS configuration, refer to the "Connecting DNS to Kantan CMS" documentation.