Great pick—Fechin/reference is a static site (Hexo-based). That means you don’t need a Node server on cPanel; you just build locally and upload the generated HTML (including index.html
) to public_html
. Here’s the clean path:
What you’ll do (summary)
- Build the site on your laptop → a
public/
folder appears with index.html
.
- Zip that
public/
folder and upload it into cPanel → public_html/
(or a subfolder).
- (If you use a subfolder) tweak Hexo’s
_config.yml
so links work.
Step-by-step
- Get the code
git clone https://github.com/Fechin/reference.git
cd reference
- Install & build (locally)
# Node 18+ recommended
npm install
# dev preview (optional): http://localhost:4000
npm run dev
# static build:
# if scripts exist: npm run build
# otherwise with Hexo:
npx hexo generate
After this, you’ll have a public/
directory with index.html
and all assets. (This project uses Hexo conventions: source/
, themes/
, _config.yml
, etc., and builds a static site to public/
.) (GitHub, CheatSheets.zip)
- (Important if hosting under a subfolder)
If you plan to serve at https://yourdomain.com/reference/
, open _config.yml
and set:
url: https://yourdomain.com/reference
root: /reference/
Then rebuild (npx hexo generate
). This fixes internal links when not at the domain root. (GitHub)
Upload to cPanel
Zip the contents of public/
(not the folder itself if you’re extracting into the target).
cPanel → File Manager → go to public_html/
(or create public_html/reference/
).
Upload the zip → Extract.
If you’re deploying to the root, public_html/index.html
should exist after extraction.
If to a subfolder, you should see public_html/reference/index.html
.
Test
Root deployment: open https://yourdomain.com/
Subfolder: open https://yourdomain.com/reference/
Notes & gotchas
- Do not try to run
npm start
on shared hosting—no need. The output is static.
- If you see broken links when using a subfolder, it’s almost always the
url
/root
mismatch in _config.yml
. Fix, rebuild, re-upload.
- If your host has a CDN or caching, purge after upload.
If you tell me whether you want it at the root domain or /reference/
, I’ll give you the exact _config.yml
values and the precise upload path.