As an experienced CMS website operation personnel, I am well aware of the importance of content creation and publishing efficiency, and I also understand how to meet diverse operational needs through refined functional control.Regarding the independent control issue of the Markdown function in AnQi CMS, I will elaborate in detail by combining the documents you provided.
In AnQi CMS, the enablement and disablement of the Markdown feature is mainly reflected in two aspects: first, the global settings of the background editor, and second, the rendering control of the front-end template content.
First, AnQi CMS provides global enable and disable options for the Markdown editor.According to the document instructions, the website administrator can select whether to enable Markdown editor in "AnQi CMS background -> Global Settings -> Content Settings".This setting is global, meaning that once enabled, all content types using the default content editor (such as articles, products, single pages, etc.) will provide Markdown input support.If disabled, the content will be edited and stored through other rich text editors (usually what you see is what you get editors).This ensures consistency in content input, allowing all content creators on the entire site to follow unified editing standards.
However, enabling Markdown editor globally does not mean that all content on the frontend must be rendered in Markdown format.The design of Anqi CMS takes into account the flexibility of content display.Even though the background editor has unifiedly enabled the Markdown feature, the final rendering method of the content can still be finely controlled through front-end template tags.For example, the document details (archiveDetail), category details (categoryDetail), and page details (pageDetail) of theirContentAll fields support arenderparameter. This parameter acceptstrueorfalsetwo values, explicitly indicating whether the template should perform Markdown to HTML conversion during content rendering.
This means that even if your editor writes the content in Markdown format in the background, the front-end template still determines whether this part of the content is output as raw Markdown text or converted to HTML first before displaying.This separation control mechanism brings great convenience to operation.For articles that require structured display and may contain mathematical formulas or flowcharts, you can set it in the corresponding templaterender=trueEnsure that Markdown content is correctly parsed and rendered as rich HTML. For certain product descriptions or short single-page sites, you can omit the template even if the content was originally written in Markdown.render=trueor explicitly setrender=falseto display as plain text or after other processing to avoid unnecessary rendering costs or style conflicts.
Therefore, although the Anqi CMS Markdown editor is globally enabled, but through the front-end template inrenderThe flexible use of parameters can independently control the display level content of different types of documents (such as articles, products), determining whether they have been parsed through Markdown and converted to HTML.This provides powerful content management flexibility for website operators, allowing them to customize the most suitable rendering behavior based on specific content types and display requirements.
Frequently Asked Questions (FAQ):
Q1: Can I enable Markdown editor for articles only and disable it for products?
A1:According to the existing AnQi CMS documentation, the enable/disable of the Markdown editor is a global setting in the background, which takes effect simultaneously for all document types using the default content fields (including articles and products).That is to say, you cannot directly enable the Markdown editor for "articles" individually in the control panel, but disable it for "products."}But you can use the front-end template'srenderThe parameter independently controls the Markdown content rendering behavior of different content types on the page.
Q2: If I enable the Markdown editor in the background but do not want a specific document content to be rendered as HTML, what should I do?
A2:You can find the call to the content field (such asarchive.Content) tag in the front-end template used in the specific document. Add it in the tag.render=falsethe parameters. For example,{% archiveDetail archiveContent with name="Content" render=false %}{{archiveContent|safe}},Even if the content is written in Markdown, it will not be automatically converted to HTML on the front end.
Q3: How to ensure that mathematical formulas and flowcharts are displayed normally when displaying Markdown content on the front-end page?
A3:The AnqiCMS Markdown editor supports inserting mathematical formulas and flowcharts, but these elements need the support of third-party plugins to be displayed correctly on the front-end page. You need to add them to your website template'sbase.htmlIntroduce the corresponding CDN resources (such as MathJax and Mermaid libraries) in the documenthelp-markdown.mdAs described. This ensures that these special elements can be recognized and correctly presented when Markdown content is rendered as HTML.