Skip to content

Hosting These Docs ​

This documentation site is a static VitePress build in docs-site/, separate from the platform. This page covers running it locally, building it, and publishing it to cyberonline.site (registered at Namecheap), with access control.

Decide access before you publish

This site includes a Security Findings page and a Threat Model that describe real weaknesses in the running platform. Before making it reachable on the public internet:

  • Put it behind Cloudflare Access (email-based login) so only your team and the panel can read it, or
  • exclude the Security section from the public build and keep it internal.

The build already sets robots: noindex, nofollow, but that only asks search engines not to index it; it does not stop anyone with the link. No secrets are in the site, but the collected weakness list is sensitive. See the caution on the Findings page.

Run and build locally ​

From docs-site/:

bash
npm install            # first time only
npm run docs:dev       # dev server with hot reload at http://localhost:5173
npm run docs:build     # production build -> docs/.vitepress/dist
npm run docs:preview   # serve the built site at http://localhost:4173
npm run check:secrets  # scan source and dist for accidental secrets
npm run check:site     # headless-Chrome render check (needs a server running)
  • docs:build writes the static site to docs/.vitepress/dist. That folder is what you deploy.
  • docs:preview serves the built output and is the most faithful local preview (it is fully server-rendered, unlike the dev server).

Cloudflare Pages hosts the static build for free, gives automatic HTTPS, and pairs with Cloudflare Access to lock down who can read it. Because you host at the apex domain cyberonline.site, the cleanest path is to let Cloudflare manage the domain's DNS.

1. Add the domain to Cloudflare ​

  1. Create a free Cloudflare account and Add a site: cyberonline.site.
  2. Cloudflare shows you two nameservers (for example xxx.ns.cloudflare.com).

2. Point Namecheap at Cloudflare ​

In Namecheap: Domain List -> Manage for cyberonline.site -> Nameservers -> choose Custom DNS -> enter the two Cloudflare nameservers -> save (the green check). Propagation is usually minutes to a few hours. After this, you manage all DNS in Cloudflare, not Namecheap.

Why move nameservers instead of adding a record at Namecheap

Hosting at the bare apex (cyberonline.site, no www) needs CNAME flattening, which Namecheap's free DNS does not do. Cloudflare does it automatically. If you would rather keep DNS at Namecheap, use a subdomain instead (see below).

3. Create the Pages project ​

In Cloudflare Workers & Pages -> Create -> Pages:

  • Connect to Git (this GitHub repo), or use Direct Upload of the dist folder if you prefer not to connect the repo.
  • Build settings:
    • Framework preset: None (VitePress).
    • Root directory: docs-site
    • Build command: npm run docs:build
    • Build output directory: docs/.vitepress/dist
  • Deploy. You get a *.pages.dev URL to verify first.

4. Attach the custom domain ​

In the Pages project -> Custom domains -> Set up a custom domain -> cyberonline.site. With Cloudflare managing DNS, it creates the record for you. Add www.cyberonline.site too if you want it to redirect.

In Cloudflare Zero Trust -> Access -> Applications -> Add a self-hosted application:

  • Domain: cyberonline.site.
  • Add a policy that allows only specific emails or an email domain (your team and the panel).

Now visitors must sign in before they can see any page. This is the control that makes it safe to publish the Security section.

Alternative: keep DNS at Namecheap, use a subdomain ​

If you do not want to move nameservers, host at a subdomain such as docs.cyberonline.site:

  1. Deploy to Cloudflare Pages (or Netlify) and note the project URL (for example cyber-range-docs.pages.dev).
  2. In Namecheap: Manage -> Advanced DNS -> Add New Record:
    • Type: CNAME
    • Host: docs
    • Value: cyber-range-docs.pages.dev (your project URL, no trailing dot)
    • TTL: Automatic
  3. In the host's dashboard (Pages or Netlify), add docs.cyberonline.site as the custom domain so it issues the certificate.

A subdomain CNAME works on Namecheap's free DNS; the apex does not. Note that Cloudflare Access is simplest when Cloudflare also serves the DNS, so if access control matters, the nameserver move above is still the better path.

Other static hosts ​

The build is plain static files, so any static host works. All of these use build command npm run docs:build and output docs/.vitepress/dist, with the project root set to docs-site:

HostNotes
NetlifyConnect the repo; set base directory docs-site. Add the Namecheap CNAME as above, or use Netlify DNS. Password protection is a paid feature.
VercelImport the repo; root directory docs-site; framework "Other".
GitHub PagesPublish docs-site/docs/.vitepress/dist via an Actions workflow. If served from a subpath (user.github.io/repo), set base: '/repo/' in config.mts; at a custom apex domain no base is needed. No built-in access control.
Your own nginxCopy dist to the web root and serve it; add auth (basic auth or an SSO proxy) yourself.

Notes for whatever host you choose ​

  • Base path: the config uses no base, which is correct for serving at a domain root. Only set base if you serve from a subpath.
  • Clean URLs: the site uses cleanUrls: true; Cloudflare Pages and Netlify handle this automatically.
  • Rebuild on change: if you connect the repo, every push rebuilds. With Direct Upload, re-upload the dist folder after npm run docs:build.
  • This is yours to publish. Nothing here publishes the site for you; run the deploy from your own account so you control access.

Sources

docs-site/package.json, docs-site/docs/.vitepress/config.mts (sitemap hostname, robots, cleanUrls), and the hosts' own documentation. DNS steps reflect Namecheap's Domain List and Advanced DNS panels.

Cyber Range capstone documentation (Capstone 2 · Group 2 · A4102). Documents main at commit 6971373.