π Forged in the fires of Mt. Python β fast, easy static sites for Hobbits who prefer second breakfast over setup wizards. π§ββοΈ
- Clone the repository:
git clone https://github.com/alexinslc/buildo-baggins.git
cd buildo-baggins- Run the site locally:
./main.sh
python3 -m http.server 8888Then open http://localhost:8888 in your browser.
.
βββ static/ # Static assets (images, CSS)
βββ content/ # Your markdown or text content
βββ template.html # HTML template used for all pages
βββ src/ # Python code for the generator
β βββ main.py # Main script that builds the site
βββ docs/ # Output: final HTML/CSS lives here (for GitHub Pages)
β
βββ [ Run Locally ]
β βββ $ ./main.sh
β βββ $ python3 -m http.server 8888
β
βββ [ Run Tests ]
β βββ $ ./test.sh
β βββ $ python3 -m unittest discover -s src
β
βββ [ Deploy to GitHub Pages ]
βββ $ ./build.sh
- Fast: Built with Python, optimized for speed
- Easy: Simple setup, no complex configurations
- Flexible: Customize templates and styles to fit your needs
- Markdown Support: Write content in Markdown for easy formatting
- Static Assets: Manage images, CSS, and other static files effortlessly
- Local Preview: Test your site locally before deploying
- GitHub Pages: Easy deployment to GitHub Pages
- Unit Testing: Ensure your code is robust with built-in tests
-
Make sure your repository is public and you have push access
-
Build the site for GitHub Pages:
./build.sh- Commit and push your changes:
git add .
git commit -m "Update site"
git push origin main-
Configure GitHub Pages:
- Go to your repository's Settings
- Navigate to Pages in the sidebar
- Under "Source", select "Deploy from a branch"
- Select "main" branch and "/docs" folder
- Click Save
-
Your site will be available at: https://alexinslc.github.io/buildo-baggins/
For local development, use:
./main.shThis will:
- Copy static files to the docs directory
- Generate HTML pages from markdown content
- Use "/" as the base path for local testing
Run the test suite with:
./test.shOr manually:
python3 -m unittest discover -s srcMIT License - See LICENSE for details.
- Fast: Built with Python, optimized for speed.
- Easy: Simple setup, no complex configurations.
- Flexible: Customize templates and styles to fit your needs.
- Markdown Support: Write content in Markdown for easy formatting.
- Static Assets: Manage images, CSS, and other static files effortlessly.
- Local Preview: Test your site locally before deploying.
- Unit Testing: Ensure your code is robust with built-in tests
- Continue development to get to mvp.
- Add more features like:
- Support for custom themes
- Integration with third-party services (e.g., analytics, SEO)
- Deployment scripts for popular hosting platforms