19 Commits

Author SHA1 Message Date
7521c744bd Improve qsgen3 theme system: complete theme override and new minimal theme
- Remove legacy themes (black-orange, minimal) with old .tpl structure
- Create new minimal theme with proper qsgen3 structure:
  - Complete layouts/ directory with all required templates
  - Modern CSS with responsive design and clean styling
  - Proper theme documentation in README.md
- Update THEMES-HOWTO.md to accurately reflect theme behavior:
  - Clarify complete layout override (no fallback to defaults)
  - Document included minimal theme example
  - Correct layout processing documentation
- Update site.conf to use new minimal theme CSS path
- Ensure themes are complete packages when specified
2025-05-31 03:14:36 +02:00
81ffa53d70 Add comprehensive theme documentation and improve migration script
- Add THEMES-HOWTO.md: Complete guide for creating and customizing themes
- Remove theme sections from how-it-works.md to avoid duplication
- Update migration script to place all blog posts in single directory
- Streamline documentation structure for better organization
2025-05-31 03:00:50 +02:00
f72fe18873 Implement file preservation system for output directory cleaning
- Add sophisticated file preservation functionality to _clean_output_dir()
- Support .qsgen3_preserve file with shell glob patterns for selective preservation
- Preserve shared articles and important files during site regeneration
- Maintain backward compatibility (no preserve file = complete cleaning)
- Add comprehensive documentation in how-it-works.md
- Include example preserve file (.qsgen3_preserve.example)
- Remove legacy images directory and update documentation
- Fix workflow documentation formatting issues
2025-05-31 02:04:06 +02:00
ed7ed0ee18 feat: Add comprehensive minification system for HTML, CSS, and XML files
- Implement _minify_html(), _minify_css(), and _minify_xml() functions
- Add _minify_file() and _minify_output_directory() orchestration functions
- Add build_options_minify_html, build_options_minify_css, build_options_minify_xml config options
- Integrate minification into main workflow after content generation
- Provide detailed logging with file size reduction statistics
- Achieve 25-35% HTML, 5-15% CSS, and 5-10% XML size reductions
- Update site.conf.example with documented minification options
- Non-destructive implementation using temporary files with error handling
2025-05-31 01:31:44 +02:00
5266559f26 docs: Rewrite README with compelling storytelling approach
Transform the README from a technical feature list into an engaging narrative that:

- Opens with a relatable problem story that developers/bloggers recognize
- Positions qsgen3 as the solution born from shared frustration
- Uses conversational storytelling tone throughout
- Organizes benefits as a narrative journey
- Clearly identifies target audiences with personas
- Provides actionable getting-started steps
- Ends with a compelling call to action

The new README focuses on why qsgen3 exists and what problems it solves, making it much more compelling for potential users while remaining informative and honest.
2025-05-31 01:22:37 +02:00
4b95426256 feat(qsgen3): Enhance output naming, URL structure, and sitemap
Implements several improvements to the qsgen3 site generator:

- **Filename Sanitization**: Introduces robust sanitization for output HTML filenames, converting to lowercase, replacing special characters with hyphens, and ensuring clean names.
- **Blog Post URL Structure**: Blog posts from content/posts/ are now generated with a blog/YYYY/MM/DD/ URL structure if a valid date is present in frontmatter. Defaults to blog/filename.html if no valid date.
- **Improved Title Fallback**: Uses the original filename (before sanitization) as a fallback title if not specified in frontmatter.
- **Enhanced Pandoc Error Handling**: Better logging for Pandoc execution and explicit check of its exit code, allowing the script to continue on single file errors.
- **Sitemap Integration**: Adds successfully generated pages to sitemap URL list.
- **Non-fatal Sitemap Generation**: Sitemap generation failures are now logged as warnings and do not halt the script.

Also, unignores the /scripts/ directory in .gitignore to include migration scripts in the repository.
2025-05-31 01:15:18 +02:00
1283eb30cb feat(migration): Add #showimg, #linkimg, #ytvideo conversion
Adds logic to migrate_qs2_to_qs3.py to convert:
- #showimg to Markdown image syntax ![alt](src).
- #linkimg to Markdown linked image syntax [![alt](src)](src).
- #ytvideo to HTML iframe embed for YouTube videos.

Image path processing handles absolute URLs and prepends /images/
for relative paths, aligning with previous qsgen2 behavior but
omitting hardcoded styling attributes for Markdown output.
2025-05-31 01:13:55 +02:00
f5d6d0eb49 docs: Enhance explanations in site.conf.example
Updated site.conf.example to provide clearer and more detailed descriptions for each configuration variable, improving usability for new users.
2025-05-31 00:14:51 +02:00
1b8898ae2e chore: Remove extraneous 'home' directory from project root 2025-05-31 00:07:30 +02:00
681857225b chore: Remove old qsgen2 files and directories
Deleted legacy files and directories from the previous qsgen2 system, including:
- Root qsgen3 script (qsgen2)
- HOWTO.md, THEME-HOWTO.md, qsg2-square.png
- include/ directory
- Suspicious quoted 'output' directory
2025-05-31 00:06:37 +02:00
47a4c04d96 refactor: Standardize theme structure and update configs
- Restructured 'minimal' theme to use 'static/css' and 'static/js' subdirectories for assets, aligning with qsgen3's expected theme structure.
- Moved 'minimaltemplate-v1.css' to 'themes/minimal/static/css/'.
- Moved JS files from 'themes/minimal/css/' to 'themes/minimal/static/js/'.
- Updated 'site.conf.example' to reflect 'minimal' theme usage and correct 'site_theme_css_file' path relative to the theme's static directory.
- Cleaned up redundant CSS variable definitions in 'bin/qsgen3' (_generate_index_page function).
2025-05-31 00:05:05 +02:00
8ffd19a0c4 refactor: Remove redundant root CSS files
Removed layouts/css/default.css and static/css/style.css as themes now provide their own CSS, making these files obsolete.
2025-05-31 00:03:08 +02:00
3dad33a939 build: Add output/ to .gitignore and untrack existing output dir 2025-05-31 00:01:19 +02:00
c470ac40c0 feat: Implement robust theme system and document architecture
- Implement flexible theme switching via site.conf (site_theme, site_theme_css_file).
- Ensure correct copying of theme static assets, with theme assets overriding root assets.
- Resolve CSS linking issues by checking file existence after static copy and using correct paths for Pandoc.
- Refactor path construction to prevent duplication when using absolute/relative output paths.
- Create comprehensive how-it-works.md detailing system architecture, theme creation, and overall workflow.
- Clarify design philosophy: qsgen3 remains design-agnostic, only linking main theme CSS automatically.
2025-05-31 00:00:21 +02:00
c14e943f2b [WIP] Use the correct version of qsgen2 2025-05-30 21:06:09 +02:00
1261c2bab2 [WIP] Add back main script 2025-05-30 20:41:19 +02:00
0ef5c025a8 [WIP] Clean up 2025-05-30 20:38:31 +02:00
75105821fd [WIP] Initial commit for qsgen3 2025-05-30 20:37:56 +02:00
106b66753f Initial commit 2025-05-30 20:32:56 +02:00