UNPKG

@paroicms/site-generator-plugin

Version:

ParoiCMS Site Generator Plugin

57 lines (42 loc) 3.44 kB
You are tasked of assigning predefined fields for each node type (routing document, regular document, or part). ## 1. Look at the list of available predefined fields (in JSON format) <predefined_fields_json> {{predefinedFields}} </predefined_fields_json> ## 2. Examine the current site schema, which conforms to the `JtSiteSchema` type <site_schema_json> {{siteSchemaJson}} </site_schema_json> ## 3. Check if there are instructions about fields in these user instructions <user_request> {{message}} </user_request> ## 4. Now, here is what to do Create a key/value dictionnary. Keys are the node type names of the provided site schema. Value are arrays of field names. Guidelines for creating the dictionary JSON: - Use JSON syntax. - All the node types must have a key in your result. - If there is no need of a field for a node type, then leave an empty array. - Documents and parts already contains a _publish date_ and a _draft_ flag. - A document already contains a _title_ and a _featured image_, but a part doesn't. That's why the predefined `title` field can be used on part types when needed. - Default values: - By default, for most of node types, if you are not sure about what could be the best fields, then remember that a document is a webpage and just use a `[htmlContent[@paroicms/tiptap-editor-plugin]]` or `[gallery, "htmlContent[@paroicms/tiptap-editor-plugin]"]`. - Exception for listing pages: For the `home` document type AND for routing documents that have `regularChildren` (like blog index, products index, etc.), use `[introduction[@paroicms/tiptap-editor-plugin]]` instead of `htmlContent`. These pages display a list of child items, so they only need a short introduction, not full HTML content. - Gallery field: This website is a **demonstration website**, so the `gallery` field should be used on at least one document type to showcase this feature. Unless the user instructions specify otherwise, include `gallery` on the `home` document type by default (i.e. `[gallery, "introduction[@paroicms/tiptap-editor-plugin]"]`). - Except if there are specific instructions in the website description, here is the default value for the `_site` node type: `["logo", "footerMention[@paroicms/tiptap-editor-plugin]"]`. - This task is about predefined fields only. Custom fields will be added in a further step. Here is an example of expected output: <correct_example> { "_site": ["logo", "footerMention[@paroicms/tiptap-editor-plugin]"], "home": ["gallery", "introduction[@paroicms/tiptap-editor-plugin]"], "posts": ["introduction[@paroicms/tiptap-editor-plugin]"], "searchPage": [], "contactPage": ["introduction[@paroicms/tiptap-editor-plugin]"], "regularDocumentExemple1": ["gallery", "htmlContent[@paroicms/tiptap-editor-plugin]"], "partExemple2": ["title", "image", "htmlContent[@paroicms/tiptap-editor-plugin]"], "aBlogPostExample": ["gallery", "leadParagraph[@paroicms/tiptap-editor-plugin]", "htmlContent[@paroicms/tiptap-editor-plugin]"] } </correct_example> Provide the JSON result within <json_result> tags. Do not write any explanation or commentary outside the tags. Additionally, write within <unused_information_md> tags the information from the user instructions that you weren't able to use here, in the form of a short prompt, in markdown format. Do not invent anything. Do not imagine anything. If there is no remaining information, then let this tag empty.