[PR #319] [MERGED] Add shop asset renderers (HTML + Markdown) and Website Maker documentation #285

Closed
opened 2026-03-02 23:34:58 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/AJaySi/ALwrity/pull/319
Author: @AJaySi
Created: 2/4/2026
Status: Merged
Merged: 2/4/2026
Merged by: @AJaySi

Base: mainHead: codex/update-product-asset-rendering-in-templates-y4ys5z


📝 Commits (1)

  • dbb0cc1 Add website maker implementation documentation

📊 Changes

3 files changed (+286 additions, -0 deletions)

View changed files

backend/api/onboarding_utils/website_automation_service.py (+51 -0)
backend/services/website_automation_service.py (+51 -0)
docs/website_maker/WEBSITE_MAKER_IMPLEMENTATION.md (+184 -0)

📄 Description

Motivation

  • Shop previews previously exposed product assets only as links, preventing inline image previews in page bodies and onboarding outputs.
  • The page body should surface the same product asset images that the OG image selection prefers for consistent previews and onboarding content.

Description

  • Added an HTML renderer WebsiteAutomationService._render_shop_assets_html in backend/services/website_automation_service.py that normalizes assets and emits escaped HTML with <figure>, linked <img> and optional <figcaption> for captions.
  • Added Markdown rendering helpers _render_shop_page, _render_product_assets_markdown, and _normalize_asset in backend/api/onboarding_utils/website_automation_service.py to produce onboarding page markdown with link bullets and ![alt](url) embeds for each product asset.
  • Implemented shared normalization rules where string assets are treated as URLs with default alt text "Product image", dict assets resolve URL from url|asset_url|image_url|image, alt from alt|title|name, and caption from caption|label.
  • Added docs/website_maker/WEBSITE_MAKER_IMPLEMENTATION.md containing implementation details, examples, extension points, and suggested tests for future coverage.

Testing

  • No automated tests were run for these changes.

Codex Task


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/AJaySi/ALwrity/pull/319 **Author:** [@AJaySi](https://github.com/AJaySi) **Created:** 2/4/2026 **Status:** ✅ Merged **Merged:** 2/4/2026 **Merged by:** [@AJaySi](https://github.com/AJaySi) **Base:** `main` ← **Head:** `codex/update-product-asset-rendering-in-templates-y4ys5z` --- ### 📝 Commits (1) - [`dbb0cc1`](https://github.com/AJaySi/ALwrity/commit/dbb0cc120a13013acf4c2d33ed8bd1ff7183d1bd) Add website maker implementation documentation ### 📊 Changes **3 files changed** (+286 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `backend/api/onboarding_utils/website_automation_service.py` (+51 -0) ➕ `backend/services/website_automation_service.py` (+51 -0) ➕ `docs/website_maker/WEBSITE_MAKER_IMPLEMENTATION.md` (+184 -0) </details> ### 📄 Description ### Motivation - Shop previews previously exposed product assets only as links, preventing inline image previews in page bodies and onboarding outputs. - The page body should surface the same product asset images that the OG image selection prefers for consistent previews and onboarding content. ### Description - Added an HTML renderer `WebsiteAutomationService._render_shop_assets_html` in `backend/services/website_automation_service.py` that normalizes assets and emits escaped HTML with `<figure>`, linked `<img>` and optional `<figcaption>` for captions. - Added Markdown rendering helpers `_render_shop_page`, `_render_product_assets_markdown`, and `_normalize_asset` in `backend/api/onboarding_utils/website_automation_service.py` to produce onboarding page markdown with link bullets and `![alt](url)` embeds for each product asset. - Implemented shared normalization rules where string assets are treated as URLs with default alt text `"Product image"`, dict assets resolve URL from `url|asset_url|image_url|image`, alt from `alt|title|name`, and caption from `caption|label`. - Added `docs/website_maker/WEBSITE_MAKER_IMPLEMENTATION.md` containing implementation details, examples, extension points, and suggested tests for future coverage. ### Testing - No automated tests were run for these changes. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_6982bfd48598832880cee72cabee1ebf) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 23:34:58 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ALwrity#285
No description provided.