Skip to content

mesinkasir/pycora

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ PyCora - Static Site Generator

Python β€’ Markdown β€’ YAML β€’ Fast β€’ Minimal β€’ Elegant

Read Docs: https://pycora.axcora.com/docs

Pycora Python SSG


πŸ“– Table of Contents


✨ Features

Feature Description
⚑ Lightning Fast Pure static HTML, no database, no server-side processing
πŸ“ Markdown + YAML Write content in Markdown with powerful YAML frontmatter
🏷️ Tags & Categories Automatic tag generation from your content
πŸ“„ Pagination Built-in blog pagination
πŸ” SEO Ready Meta tags, Open Graph, Twitter Cards, Sitemap, RSS feed
🎨 Beautiful Typography Clean, readable design with best typography practices
πŸ“± Responsive Mobile-first design with Bootstrap 5
πŸ”₯ Live Development Auto-rebuild on file changes
πŸ—ΊοΈ Sitemap & RSS Automatic sitemap.xml and feed.xml generation
🎯 Zero Dependencies Minimal dependencies, lightweight

πŸ“‹ Requirements

  • Python 3.8 or higher
  • pip (Python package manager)
  • Git (optional, for cloning)

πŸš€ Quick Start

1. Clone the repository

git clone https://github.com/mesinkasir/pycora.git
cd pycora

2. Install dependencies (One command)

python install.py

3. Run the site

python run.py

4. Build the site

python ssg.py

5. Preview locally

python dev.py

Or using npm:

npm run dev

πŸ“– Usage

πŸ—οΈ Build Site

python ssg.py

Generates the static site in the output/ directory.

Output:

πŸš€ Building site...
βœ… Selesai! 2 posts, 2 tags.
πŸ“ Output di folder: output/

πŸ”₯ Development Server (Auto-rebuild)

python dev.py

Starts a local server with auto-rebuild on file changes.

Features:

  • Auto-rebuild when files change
  • Live preview at http://localhost:8000
  • Watch: content/, templates/, static/

🎯 Menu Interface

python run.py

Interactive menu for all commands:

  [1] Build site (ssg.py)
  [2] Development server (dev.py)
  [3] Install/Update dependencies
  [4] Exit

πŸ“¦ NPM Scripts

npm run build   # Build site
npm run dev     # Development server
npm run serve   # Serve output directory
npm run menu    # Menu interface
npm run install # Install dependencies

πŸ“ Project Structure

pycora/
β”œβ”€β”€ content/
β”‚   β”œβ”€β”€ posts/           # Blog posts (Markdown + YAML)
β”‚   β”‚   └── 2024-01-01-hello-world.md
β”‚   └── pages/           # Static pages (Markdown + YAML)
β”‚       └── about.md
β”‚
β”œβ”€β”€ templates/           # Jinja2 templates
β”‚   β”œβ”€β”€ base.html        # Base layout
β”‚   β”œβ”€β”€ landing.html     # Homepage
β”‚   β”œβ”€β”€ blog.html        # Blog listing
β”‚   β”œβ”€β”€ post.html        # Single post
β”‚   β”œβ”€β”€ page.html        # Static page
β”‚   β”œβ”€β”€ tags.html        # Tags index
β”‚   β”œβ”€β”€ tag.html         # Tag detail
β”‚   β”œβ”€β”€ feed.xml         # RSS feed template
β”‚   └── sitemap.xml      # Sitemap template
β”‚
β”œβ”€β”€ static/              # Static assets
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   β”œβ”€β”€ bs.css
β”‚   β”‚   └── main.css
β”‚   β”œβ”€β”€ images/
β”‚   └── js/
β”‚
β”œβ”€β”€ output/              # Generated site (build output)
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ blog/
β”‚   β”œβ”€β”€ tags/
β”‚   β”œβ”€β”€ feed.xml
β”‚   └── sitemap.xml
β”‚
β”œβ”€β”€ ssg.py               # Main builder
β”œβ”€β”€ dev.py               # Development server
β”œβ”€β”€ install.py           # Dependency installer
β”œβ”€β”€ run.py               # Menu interface
β”œβ”€β”€ config.yaml          # Site configuration
β”œβ”€β”€ package.json         # NPM scripts
β”œβ”€β”€ requirements.txt     # Python dependencies
└── README.md            # This file

πŸ“ Content Format

πŸ“„ Blog Post (Markdown + YAML)

File: content/posts/2024-01-01-hello-world.md

---
title: Hello World
description: Welcome to my blog
date: 2024-01-01
author: Your Name
tags:
  - python
  - ssg
  - markdown
image: /images/hello-world.jpg
layout: post
---

# Welcome to My Blog

This is my first post using PyCora.

## Why Static?

- **Fast** - No database queries
- **Secure** - No vulnerabilities
- **Simple** - Write in Markdown

```python
print("Hello, PyCora!")

Features

  • βœ… Markdown with YAML frontmatter
  • βœ… Beautiful typography
  • βœ… Tags & categories
  • βœ… Pagination
  • βœ… Next/Previous posts
  • βœ… Responsive design

---

### πŸ“„ Static Page

**File:** `content/pages/about.md`

```markdown
---
title: About Me
description: Learn more about me
date: 2024-01-01
layout: page
---

# About Me

This is the about page.

βš™οΈ Configuration

config.yaml

site:
  name: PyCora
  description: Static Site Generator with Python
  url: http://localhost:8000
  author: Your Name
  twitter_username: yourusername

  nav:
    list:
      - name: Home
        url: /
      - name: Blog
        url: /blog
      - name: About
        url: /about

  hero:
    icon: fas fa-code
    info: Static Site Generator
    title: Write
    sub_title: Content
    title2: in Markdown
    text: "Static Site Generator with Python - Fast, Minimal, Elegant."
    button1:
      text: Read blog
      url: /blog/
    button2:
      text: Learn More
      url: /about/
    terminal:
      title: Quick Start
      info: "Simple. Fast. Elegant."
      list:
        - text: "$ python ssg.py build"
        - text: "$ Building site..."
        - text: "$ Pycora is ready for Deploy !!"

  features:
    title: A Features
    list:
      - icon: "fas fa-bolt text-primary"
        title: Lightning Fast
        text: "Pure static HTML. No database. No server-side processing."
      - icon: "fas fa-feather text-success"
        title: "Markdown + YAML"
        text: "Write in Markdown with YAML frontmatter. Simple and powerful."
      - icon: "fas fa-paint-brush text-warning"
        title: "Beautiful Typography"
        text: "Clean, readable, and elegant design with best typography practices."

  footer:
    list:
      - name: Github
        icon: fab fa-github
        url: https://github.com/yourusername
      - name: Twitter
        icon: fab fa-twitter
        url: https://twitter.com/yourusername

🎨 Customization

🎨 CSS

Place your custom CSS in static/css/main.css

πŸ“ Templates

Edit Jinja2 templates in the templates/ directory:

Template Description
base.html Base layout with navbar, footer, SEO meta
landing.html Homepage with hero, features, latest posts
blog.html Blog listing with pagination
post.html Single post with author, tags, next/prev
page.html Static page layout
tags.html Tags index page
tag.html Posts filtered by tag

πŸ“ Static Assets

Add images, fonts, or other assets to the static/ directory.

πŸ”§ SEO & Social

Edit base.html to customize:

  • Open Graph tags
  • Twitter Cards
  • Meta descriptions
  • Canonical URLs
  • Favicon

🌐 Deployment

πŸ“¦ GitHub Pages

# Build the site
python ssg.py

# Push output/ directory to gh-pages branch
git subtree push --prefix output origin gh-pages

πŸš€ Netlify / Vercel

# Build the site
python ssg.py

# Deploy the output/ directory
# Drag and drop output/ folder to Netlify/Vercel dashboard

☁️ Any Static Hosting

Just upload the output/ directory to any static hosting service:

  • Netlify
  • Vercel
  • GitHub Pages
  • Cloudflare Pages
  • AWS S3
  • Firebase Hosting
  • Cpanel Hosting

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing)
  5. Open a Pull Request

Development Workflow

# Clone your fork
git clone https://github.com/yourusername/pycora.git

# Install dependencies
python install.py

# Start development server
python dev.py

# Build for production
python ssg.py

πŸ“„ License

MIT License - see LICENSE file for details.


πŸ™ Credits

πŸ“š Libraries & Frameworks

Library Purpose
Python Core programming language
Python-Markdown Markdown parsing
Jinja2 Templating engine
Bootstrap 5 Frontend framework
Font Awesome Icons
PyYAML YAML parsing
python-frontmatter Frontmatter parsing
Watchdog File watching

πŸ’» Maintainers

  • Axcora Technology

πŸ“ž Contact

Platform Link
🌐 Website pycora.axcora.com
πŸ’» GitHub mesinkasir
πŸ“§ Email axcora@gmail.com
πŸ‘¨β€ Consult Hire Us

⭐ Show Your Support

If you find PyCora useful, please consider:

  • ⭐ Starring the repository on GitHub
  • 🐦 Following us on Twitter
  • πŸ“ Writing about PyCora
  • πŸ› Reporting issues

PyCora - Static Site Generator β€’ Python β€’ Markdown β€’ YAML

Read Docs: https://pycora.axcora.com/docs

Made with ❀️ by Axcora