Process: SOP

 See github repo sop-docs


To create a new site:

C:\Users\saad0\Documents\source\sop-docs>npx create-docusaurus@latest <website-name> classic


Yes 👍 — Docusaurus is just a static site generator (like Jekyll or Hugo). The end product is plain HTML, CSS, and JS files, which means you can absolutely deploy it to cPanel hosting.

Here’s how to do it:


Step 1 — Build Your Docs Site

On your local machine (or dev server):

cd sop-docs
npm run build

This creates a /build folder containing your static site.


Step 2 — Upload to cPanel

You have two main options:

🔹 Option A — File Manager

  1. Log into your cPanel.

  2. Open File Manager → go to public_html/ (or a subfolder if you want yourdomain.com/docs).

  3. Delete any old files (if this is a fresh site).

  4. Upload the contents of the /build folder.

    • ⚠️ Important: upload the contents (index.html, assets folder, etc.), not the parent /build folder itself.

🔹 Option B — FTP / SFTP

  1. Connect with FileZilla or your preferred FTP client.

  2. Navigate to public_html/.

  3. Drag everything from /build into that folder.


Step 3 — Verify

  • Visit https://yourdomain.com (or https://yourdomain.com/docs if in a subfolder).

  • The docs site should load instantly.


Step 4 — (Optional) Subdomain Setup

If you want docs.yourdomain.com:

  1. In cPanel → DomainsCreate Subdomain (docs.yourdomain.com).

  2. Point it to a folder (e.g., /public_html/docs/).

  3. Upload your /build contents there.

  4. Make sure SSL is enabled (Let’s Encrypt usually auto-handles it).


👉 So yes — Docusaurus works perfectly with cPanel, because cPanel just serves static files.

Do you want me to write you a step-by-step deployment script/checklist specifically for your VA/SDR SOP site, so you or your VA can upload without breaking anything?


Short answer: yes—Docusaurus is a great fit for SOPs in Markdown. If it feels slow, it’s usually due to a few common gotchas that are easy to fix.

Is Docusaurus the right tool?

  • Built for Markdown (and MDX) docs with sidebars, versioning, search, and a clean theme out-of-the-box.

  • Git-first workflow: PRs = reviews of SOP changes.

  • Static site output: easy to host anywhere (including cPanel) and put behind a CDN.

  • Good plugin ecosystem (search, sitemap, ideal images, etc.).

If your needs are just “super light, no JS bells/whistles,” MkDocs Material is even lighter and can load faster. But for teams, versioned docs, and nice UX, Docusaurus is solid.

Why does it feel slow (and how to speed it up)?

Most slowness comes from initial JS/CSS payloads and third-party scripts. Here’s a focused checklist:

1) Use a production build + CDN

  • Build: npm run build (or yarn build). Don’t judge speed from npm run start (dev mode is slow).

  • Serve the /build folder via your host and put it behind a CDN (Cloudflare/CloudFront).

  • Set long cache headers for static assets:

    • Cache-Control: public, max-age=31536000, immutable for hashed JS/CSS/Images.

    • Cache-Control: public, max-age=300 for HTML.

2) Trim third-party scripts

  • Analytics, chat widgets, heatmaps, etc. add big network cost.

  • Load them async/defer or remove entirely. In docusaurus.config.js:

scripts: [
  {src: 'https://www.googletagmanager.com/gtag/js?id=G-XXXX', async: true},
  {src: '/js/your-small-helper.js', defer: true},
],

3) Optimize images & fonts

  • Use @docusaurus/plugin-ideal-image for responsive, lazy-loaded images.

  • Self-host fonts or stick to system fonts to avoid render-blocking Google Fonts:

/* Use system font stack for instant text rendering */
html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

4) Keep the JS bundle lean

  • Remove unused Prism languages (syntax highlighting) to shrink bundles:

themeConfig: {
  prism: {
    additionalLanguages: ['bash', 'python'], // only what you need
  },
}
  • Avoid heavy client components in MDX. Prefer pure Markdown for SOPs.

  • If you don’t need search yet, disable it. Algolia DocSearch or local-search both add JS weight.

5) Minimize home page “furniture”

  • Big hero images, carousels, and embedded iframes delay first paint. Keep the homepage simple.

  • Prefer many small doc pages over one mega page.

6) Preload critical assets

  • If you keep a custom font, add a <link rel="preload" as="font" crossorigin> in the <head> via themeConfigmetadata or a custom Head:

headTags: [
  {
    tagName: 'link',
    attributes: {
      rel: 'preload',
      as: 'font',
      href: '/fonts/Inter-roman.var.woff2',
      type: 'font/woff2',
      crossorigin: 'anonymous',
    },
  },
];

7) Measure, don’t guess

  • Run Lighthouse (Chrome DevTools → Lighthouse) on your production build.

  • Check request waterfall for slow or blocking assets.

  • If you’re curious about bundle size, run a build with a bundle analyzer (there are community guides for Docusaurus + webpack-bundle-analyzer).

Quick deployment to cPanel (static hosting)

  1. npm ci && npm run build

  2. Upload the contents of build/ to your domain’s public_html (or a subfolder).

  3. Ensure your site path matches baseUrl in docusaurus.config.js (e.g., / vs /docs/).

  4. Add caching rules in .htaccess (Apache) for static files:

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/html "access plus 5 minutes"
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType font/woff2 "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
</IfModule>
<IfModule mod_headers.c>
  <FilesMatch "\.(js|css|png|jpg|jpeg|gif|webp|svg|woff2)$">
    Header set Cache-Control "public, max-age=31536000, immutable"
  </FilesMatch>
</IfModule>

When to consider MkDocs Material instead

  • You want the absolute fastest first load with minimal JS.

  • You don’t need React/MDX components, just straightforward Markdown + search.

  • You prefer Python-based tooling.

If you want, tell me:

  • Your current theme/plugins

  • Whether you’re using search, analytics, or chat

  • A sample page that feels slow

…and I’ll give you a tailored, cut-down config that keeps the nice bits and sheds the weight.

Comments

Popular posts from this blog

Process: Prospect to Revenue

5 - Unique Value Proposition

Project: Mailing list handler