v0.2.0
Static Site Generator Build with Fresh and Deno
Attributes
Includes Deno configuration
Repository
Current version released
a year ago
Versions
๐ FreshPress 
A modern static site generator based on the Fresh framework, designed specifically for personal blogs and portfolios. Built with Deno and Fresh, FreshPress offers high performance, multilingual support, and a modern development experience.
โจ Key Features
- Fresh Framework Integration: Leverages Freshโs benefits with SSG support
- Multilingual Support: Built-in English and Chinese internationalization
- Smart Search System: Full-text search across all your content
- Responsive Design: Perfect adaptation from mobile to desktop
- Dark Mode Support: Automatic theme switching based on system preferences
- Markdown Blog Engine: Write content in Markdown with code highlighting
- Project Showcase: Dedicated area to highlight your projects
- Island Architecture: Efficient and selective hydration for interactive components
- Seamless Deployment: Easy deployment to Deno Deploy or static hosting
๐ Getting Started
Prerequisites
- Deno 1.40.0 or higher
Quick Start
# Install FreshPress CLI
deno install -A -f https://deno.land/x/freshpress/cli.ts
# Create a new project
freshpress create my-website
# Navigate to project directory
cd my-website
# Start development server
deno task devManual Setup
# Clone the repository
git clone https://github.com/username/freshpress.git my-website
# Navigate to project directory
cd my-website
# Start development server
deno task dev๐ Usage Guide
Project Structure Overview
my-website/
โโโ blog/ # Blog post Markdown files
โโโ components/ # Reusable UI components
โโโ data/ # Site configuration and data
โโโ islands/ # Interactive components
โโโ routes/ # Page routes and layouts
โโโ static/ # Static assets (images, CSS)
โโโ utils/ # Utility functions
โโโ deno.json # Deno configuration
โโโ fresh.config.ts # Fresh framework configCreating Content
Blog Posts
Create a Markdown file in the blog/ directory:
---
title: Getting Started with FreshPress
date: 2024-04-10
description: Learn how to use FreshPress to build your personal website
tags: [FreshPress, Deno, Fresh, Tutorial]
locale: en-US # or zh-CN
---
# Getting Started with FreshPress
This is my first blog post using FreshPress!
## Features I Love
- Fast rendering
- Multilingual support
- Dark modeProjects
Add your projects to the data/config.ts file:
export const siteConfig = {
// ... other configuration
projects: {
items: [
{
title: "Personal Website",
description: "Built with FreshPress and Deno",
technologies: ["Deno", "Fresh", "TypeScript"],
link: "https://github.com/yourusername/website",
featured: true
}
]
}
}Configuration
Site Settings
Configure your website in data/config.ts:
export const siteConfig = {
site: {
title: "My Personal Site",
description: "Developer, writer, and open source enthusiast",
author: "Your Name",
},
// Other configurations...
};Internationalization
Add translations in utils/i18n.ts:
export const translations = {
"en-US": {
nav: {
home: "Home",
blog: "Blog",
projects: "Projects",
},
// More translations...
},
"zh-CN": {
nav: {
home: "้ฆ้กต",
blog: "ๅๅฎข",
projects: "้กน็ฎ",
},
// More translations...
}
};๐ Deployment
Static Site Generation
# Build static site
deno task build
# The output will be in the dist/ directoryDeploy to Deno Deploy
- Create a new project on Deno Deploy
- Connect your GitHub repository
- Set the entry point to
main.ts - Deploy!
Other Hosting Options
For static hosting (Netlify, Vercel, GitHub Pages):
# Build the static site
deno task build
# Deploy the dist/ directory๐ Workflow Example
- Setup: Create a new FreshPress project
- Configuration: Customize
data/config.tswith your details - Content Creation: Add blog posts to the
blog/directory - Customization: Modify styles in
static/css/or via Tailwind - Development: Run
deno task devto see changes locally - Build: Run
deno task buildto generate static output - Deployment: Upload the
dist/directory to your hosting
๐ Performance
FreshPress is built for speed and efficiency:
- Lighthouse Score: 95+ across all categories
- Page Load: Under 1s for most pages
- First Contentful Paint: ~300ms
- Minimal JS: Only loads JavaScript for interactive components
๐ค Contributing
Contributions are welcome! Check out the contribution guidelines.
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.