Skip to content

0xh4ty/xeniria

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Xeniria

Xeniria is a lightweight and fast static site generator built in Rust. It allows you to create and deploy static websites easily using Markdown.

Features

Xeniria comes with a default blog template to help users get started quickly.

  • Converts Markdown (.md) files into static HTML pages
  • Supports a simple config file (config.toml)
  • Fast and efficient with Rust performance
  • Built-in local development server
  • Easy deployment to GitHub Pages

Installation

1. Install Rust

Ensure you have Rust installed on your system:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Clone the Repository

To set up your own Xeniria-based site, clone the repository and name it using your GitHub Pages format: <your-username>.github.io. For example, if your GitHub username is johndoe, the repository should be named johndoe.github.io.

git clone [email protected]:0xh4ty/xeniria.git <your-rep-name>
cd <your-repo-name>

3. Create a New GitHub Repository

Go to GitHub and create a new repository named <your-username>.github.io. For example, if your GitHub username is johndoe, create a repository called johndoe.github.io. Ensure it is empty (do not add a README or .gitignore).

4. Set Up Remote Repositories

git remote remove origin
git remote add origin [email protected]:<your-username>/<your-repo-name>.git

5. Add Xeniria as Upstream

git remote add upstream [email protected]:0xh4ty/xeniria.git

6. Build and Install Xeniria

cargo install --path .

Usage

1. Build the Site

xeniria build

This converts all Markdown files into HTML inside the docs/ directory.

2. Run Local Development Server

xeniria serve

Your site will be available at http://localhost:8464.

3. Writing Blog Posts

To write a blog post, create a .md file inside the content/ directory. Each post should include front matter at the top:

---
title: "The Art of Writing"
date: "2025-02-08"
author: "John Doe"
---

4. Editing About and License Pages

Use the same filenames (about.md and license.md) inside the content/ directory and modify them as needed.


Deploying to GitHub Pages

For a live example, check out my website which is built using Xeniria.

1. Configure GitHub Pages

  • Go to your repository → Settings → Pages.
  • Set the deployment branch to main and folder to /docs.

2. Push Your Site to GitHub

git add .
git commit -m "Deploy site"
git push origin main

Your website will be live at:

https://<your-username>.github.io/

Configuration

Modify config.toml to customize your site:

# Site Configuration
[site]
title = "Xeniria"  # Change this to your website's title
description = "A minimal Static Site Generator built with Rust."  # Short description of yourself
author = "Xeniria"  # Enter your name
profile_picture = "assets/img/xeniria.png"  # Place your image in the "assets/img/" directory and update the reference here, or provide the URL of your Twitter profile picture

# Navigation Links
[links]
github = "#Your_Github_Link"  # Replace with your GitHub profile link (e.g., "https://github.com/yourusername")
twitter = "#Your_Twitter_Link"  # Replace with your Twitter profile link (e.g., "https://twitter.com/yourusername")

Keeping Up with Updates

To stay up to date with the latest changes in Xeniria, fetch and merge updates from the upstream repository:

git fetch upstream
git merge upstream/main

Development

To contribute or modify Xeniria:

git clone [email protected]:0xh4ty/xeniria.git
cd xeniria
cargo build
cargo run -- build
cargo run -- serve

License

Xeniria is open-source under the MIT License.

About

A minimal Static Site Generator built with Rust.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages