forked from laysense/laysite
Add raw HTML draft editing to LaySite MCP
This commit is contained in:
@@ -16,6 +16,14 @@ Use the configured LaySite MCP connection to the target site's `/mcp` endpoint.
|
||||
|
||||
Treat a version conflict as a signal to reread the draft and reconcile any intervening changes. Leave published pages, shared headers and footers, and site settings under human control. For a published page revision, create a separate draft when the user wants a reviewable version.
|
||||
|
||||
## Edit draft source
|
||||
|
||||
Use the `raw_html` returned by `get_page` when a task calls for HTML or page-level CSS. Pass only the source fragments that need to change into `create_draft` or `save_draft`.
|
||||
|
||||
- Set `raw_html.hero` to an HTML fragment to build a custom hero or to `null` to restore the template hero. A string passed directly as `raw_html` is shorthand for a hero fragment.
|
||||
- Set `raw_html.sections` to a map from section keys to new body HTML. Use this for source edits that preserve section order, headings and dynamic feed settings.
|
||||
- Set `raw_html.head` to the complete page Head after merging the desired change into the current source. Scope selectors to the region being changed. Existing scripts can be carried over verbatim. The visual editor provides script management for administrators.
|
||||
|
||||
## Keep page design consistent
|
||||
|
||||
- Follow the existing site's palette, spacing, button styles, navigation and terminology. Start with a matching template or reusable component. Use `header_id`, `footer_id`, and `palette_id` only when the task calls for a specific saved design.
|
||||
|
||||
Reference in New Issue
Block a user