Skip to main content

Local — Build Your Site

When you are ready to publish your site, you need to build it.

Building means running one command that compiles all your Markdown, YAML, and templates into static HTML files ready to upload anywhere.

python ssg.py

Before You Build​

Make sure:

  • All content is finalized (pages, posts, projects)
  • All images are uploaded to static/img/
  • _data/site.yaml has the correct url (e.g., https://yourdomain.com)
  • You have stopped editing in Decap CMS

Step 1 — Run the Build Command​

Open a terminal inside the Pycora Pro folder and run:

python ssg.py

You should see output like:

==================================================
PYCORA MEDUSA VERSION
SSG by Axcora Technology - www.axcora.com
===================================================
https://pycora:axcora.com/
===================================================
Ready in 0.87s - 41 files - MEDUSA v2.4.6

The build is complete in under a second.


Step 2 — Check the output/ Folder​

After the build, your static site is inside:

output/

Open that folder. You will find:

output/
├── index.html
├── 404.html
├── robots.txt
├── sitemap.xml
├── feed.xml
├── rss.xml
├── atom.xml
├── feed.json
├── about/
│ └── index.html
├── contact/
│ └── index.html
├── journal/
│ └── index.html
├── projects/
│ └── index.html
├── tags/
│ └── index.html
├── admin/
│ └── config.yml
├── css/
├── js/
└── img/

Every file in output/ is 100% static — pure HTML, CSS, JS, and images. No Python, no server, no database.


Step 3 — Preview the Built Site​

You can preview the built site locally without the dev server.

Option A — Open Directly​

Open output/index.html in your browser.

Some links may not work with the file:// protocol. If links break, use Option B.

Option B — Serve Locally​

Run this command inside the Pycora Pro folder:

python -m http.server 8000 --directory output

Then open http://localhost:8000.

This mimics a real static host.


What Gets Built​

Every time you run python ssg.py, Pycora Pro regenerates the entire output/ folder from scratch:

Pages from content/​

SourceOutput
content/index.mdoutput/index.html
content/about.mdoutput/about/index.html
content/contact.mdoutput/contact/index.html
content/journal.mdoutput/journal/index.html
content/projects.mdoutput/projects/index.html

Posts from content/posts/​

Each post becomes a folder:

content/posts/my-first-post.md → output/my-first-post/index.html

Projects from content/projects/​

Each project becomes a folder:

content/projects/project-01.md → output/project-01/index.html

Tag Pages​

Every tag used in posts or projects gets its own page:

output/tags/python/index.html
output/tags/ssg/index.html
output/tags/index.html

Pagination​

If a page has pagination enabled (e.g., Journal with pagination: 6):

output/journal/index.html (page 1)
output/journal/page/2/index.html (page 2)
output/journal/page/3/index.html (page 3)

Feeds​

output/feed.xml
output/rss.xml
output/atom.xml
output/feed.json
output/feed/rss.xml
output/feed/atom.xml
output/feed/feed.json

SEO Files​

output/robots.txt
output/sitemap.xml
output/404.html

Static Assets​

Everything from static/ is copied to output/:

SourceOutput
static/css/main.cssoutput/css/main.css
static/js/app.jsoutput/js/app.js
static/img/*output/img/*
static/admin/config.ymloutput/admin/config.yml

Rebuilding After Changes​

Every time you change content, run the build again:

python ssg.py

Tip: While developing, use python dev.py instead. It rebuilds automatically on every change — no manual command needed.


Common Issues​

Build fails with TemplateNotFound​

A template file is missing. Check the templates/ folder.

Build completes but output is empty​

Check that content/ has Markdown files.

output/ is out of date​

Run python ssg.py again. The output folder is fully regenerated on each build.

Sitemap has the wrong URL​

Open _data/site.yaml and check the url field. It should be your live domain, e.g.:

url: https://yourdomain.com

Then rebuild.


Step 4 — Prepare for Deployment​

Before deploying, verify:

  • ✅ output/index.html exists
  • ✅ output/sitemap.xml has your real domain
  • ✅ output/robots.txt points to the correct sitemap
  • ✅ All images load correctly
  • ✅ All links work (test a few pages)
  • ✅ 404.html exists

Once verified, your output/ folder is ready to deploy.


What's Next?​

Your site is built. Now let's deploy it online.

👉 Next: Cloud Guide — Getting Started →