From 2bb6ab7de3d32c2e1e7d73a44e9c7f32a92be745 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 11:52:22 +0000 Subject: [PATCH 1/3] docs: create framework conversion plan for repository reuse This commit adds `FRAMEWORK_PLAN.md`, a comprehensive strategy for transforming the current Astro-based blog into a reusable framework. The plan covers: - Centralized configuration system in `src/config.ts` - Feature flags for Search, PWA, and Tools - Multi-theme support with Tailwind v4 and HSL variable overrides - Dynamic homepage selection (Blog vs. Tools) - A four-phase implementation roadmap for systematic refactoring. Co-authored-by: Giwan <1439004+Giwan@users.noreply.github.com> --- FRAMEWORK_PLAN.md | 104 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 FRAMEWORK_PLAN.md diff --git a/FRAMEWORK_PLAN.md b/FRAMEWORK_PLAN.md new file mode 100644 index 00000000..8dfd4b58 --- /dev/null +++ b/FRAMEWORK_PLAN.md @@ -0,0 +1,104 @@ +# Framework Conversion Plan + +This document outlines the comprehensive strategy for transforming this repository into a reusable Astro blog framework. + +## 1. Centralized Configuration System + +The core of the framework will be a robust, typed configuration file in `src/config.ts`. + +### Configuration Schema +```typescript +export const FRAMEWORK_CONFIG = { + site: { + title: "My Custom Blog", + description: "A blog built with the Astro Framework", + author: "User Name", + logoText: "MB", // Text-based logo override + siteUrl: "https://example.com", + lang: "en", + social: { + twitter: "handle", + github: "repo", + // ... other social links + } + }, + navigation: { + header: [ + { label: "Blog", href: "/blog" }, + { label: "About", href: "/about" }, + ], + footer: [ + { label: "Privacy Policy", href: "/privacy" }, + ] + }, + features: { + enableSearch: true, + enablePWA: true, + enableToolsPage: false, + enableRSS: true, + }, + theme: { + active: 'newspaper', // Options: 'newspaper', 'minimal', 'modern' + overrides: { + primaryColor: "hsl(240 6% 10%)", + backgroundColor: "hsl(36 33% 98%)", + // Other HSL variables + } + }, + routing: { + homepage: 'blog', // Options: 'blog', 'tools' + } +}; +``` + +## 2. Dynamic Routing and Homepage + +To support choosing the landing page (Blog vs. Tools), we will implement a dynamic landing page logic. + +- **Refactor `src/pages/index.astro`**: Instead of hardcoded components, it will read `FRAMEWORK_CONFIG.routing.homepage` and conditionally render either the `ArticlesList` or the `ToolsLanding`. +- **Global Feature Flags**: Components like `Search` and `ToolsList` will check `FRAMEWORK_CONFIG.features` before rendering or providing links. + +## 3. Theming System + +We will expand the current Tailwind v4 setup to support multiple themes. + +- **Theme Presets**: Define multiple theme blocks in `src/styles/themes.css` (e.g., `.theme-newspaper`, `.theme-minimal`). +- **Dynamic Application**: The `PageLayout` will apply the selected theme class to the `` or a wrapper based on `FRAMEWORK_CONFIG.theme.active`. +- **Runtime Overrides**: Inject a `