Atra is a modern, efficient static website generator designed for creating fast, component-based websites. With its intuitive syntax and powerful component system, Atra makes building static sites both productive and enjoyable.
- Component-based architecture - Reusable components with
.atrac
files - Modern syntax - Clean, readable markup language
- Fast compilation - Built with Rust for maximum performance
- Hot reloading - Watch mode for instant development feedback
- CSS-in-JS style - Inline styling with familiar CSS syntax
- Static output - Generates optimized HTML files
- Download the latest release from GitHub Releases
windows run the installer and start using Atra
linux & mac if there is no install.sh, for the selected release go to compilation
git clone https://github.com/funcieqDEV/Atra.git
cd Atra
cargo build --release
the installer will do it for you
# Copy binary to /usr/local/bin
sudo cp target/release/atra /usr/local/bin/
# Or add to your shell profile
echo 'export PATH=$PATH:/path/to/atra' >> ~/.bashrc
source ~/.bashrc
# Build your project
atra build config.json
# Watch for changes and rebuild automatically
atra watch config.json
Create a config.json
file:
{
"source_folder": "src",
"output_folder": "dist"
}
Create an index.atra
file:
text("<!DOCTYPE html");
html(lang="en"){
head(){
title(){
text("Atra!")
}
meta(charset="utf");
}
body()
p(){
text("Hello Atra!")
}
}
}
This generates clean HTML even with indentations
Create reusable components with .atrac
files:
components/button.atrac
$Button(text, color) {
button()[
background-color: {color};
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
] {
text("{text}");
}
}
index.atra
div() {
$Button("Click me!", "#007bff");
$Button("Secondary", "#6c757d");
}
ul() {
%loop(13){
li(){
text("element");
}
}
}
my-atra-project/
├── src/
│ ├── index.atra
│ └── components/
├── dist/ # Generated HTML files
└── config.json
I recommend keeping the components in a separate folder
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
git clone https://github.com/funcieqDEV/Atra.git
cd Atra
cargo build
cargo test
- Follow Rust standard formatting with
cargo fmt
- Ensure all tests pass with
cargo test
- Add tests for new features
Check out the test/
directory for working examples, or visit our Example webistes for more complex projects.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find Atra useful, please consider:
- ⭐ Starring the repository
- 🐛 Reporting bugs
- 💡 Suggesting new features
- 📖 Improving documentation
- GitHub Issues: Report bugs or request features
- Discussions: Community discussions
- discord: funcieq
Built with ❤️ in Rust