Skip to content

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:

  1. Build your website

    • Generate a static version of your website using your preferred framework or tools
    • Ensure your build includes an index.html file at the root level
  2. Create a ZIP archive

    • Compress your built website files into a ZIP archive
    • Make sure the structure maintains index.html at the root level of the ZIP
  3. 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
  4. 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:

  1. Set up GitHub integration

    • Visit https://github.com/apps/kantan-cms-app and authorize the app to access your repository
    • This allows Kantan CMS to trigger builds and deployments from your GitHub repository
  2. 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:
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)
  1. Configure GitHub integration in Kantan CMS

    • Go to Settings > GitHub Integration
    • Enter your repository information
    • Save the configuration
  2. Deploy with GitHub

    • Navigate to Hosting > Build Pre-Host
    • Select "Deploy With GitHub"
    • Enter the required information
    • Trigger the deployment
  3. 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 .html to the suffix

    • Example: example.kantan-cms.website/about serves about.html
  • URLs with trailing slash: Serves the index.html file in that directory

    • Example: example.kantan-cms.website/blog/ serves /blog/index.html

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:

  1. Go to Settings > Hosting in your project
  2. Enter the custom domain you want to use
  3. Save the configuration
  4. 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
  5. Add these records to your domain's DNS configuration through your domain registrar
  6. Return to Kantan CMS and click "Refresh" to check your verification
  7. 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.

TechMO LLC.