As a professional who deeply understands the operation of AnQiCMS, I know that content quality is the core to attract and retain users.Under the multi-site management model, how to efficiently and flexibly use various forms of content expression has become an important issue in our daily work.Markdown, mathematical formulas, and flowcharts, these advanced content creation tools can greatly enhance the professionalism and readability of content.Below, I will elaborate on how to configure these features in the Anqi CMS multi-site environment.
Enable Markdown editor in a multi-site environment
Markdown as a lightweight markup language is loved by content creators for its concise and efficient writing experience.In the multi-site mode of Anqi CMS, enabling the Markdown editor for different sites can help operation personnel focus more on the content itself rather than complex formatting.
First, you need to independently set up Markdown functionality on each site that requires it.The multi-site management feature of AnQi CMS allows each site to have independent configuration options.The specific operation path is: Log in to the back-end management interface of your target site, navigate to the 'Content Settings' option under 'Global Settings'.On this page, you will find an option to enable Markdown editor.Check and save this setting, and the article or page editing interface of this site will switch to Markdown mode.render=trueorrender=falseSpecify the parameters to ensure that the content is presented as expected
Integration of front-end styles and scripts
Enabling Markdown editor in the background is just the first step. To ensure that the front-end page can correctly and beautifully display Markdown content, especially mathematical formulas and flowcharts, we also need to introduce the necessary styles and JavaScript libraries in the site's template files. This configuration is usually in the template used by your site.base.htmlPerforming in the file.
Configuration in Markdown style.
To make the rendered content of Markdown have a good visual effect, we usually introduce some CSS style files.The AnqiCMS recommends using GitHub-style Markdown.base.htmlthe file<head>Add the following CDN resource links within the tag.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.2.0/github-markdown.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
This code will introduce a set of predefined CSS styles that make Markdown content clear and easy to read in a web browser.
Integration and configuration of mathematical formulas
It is crucial to accurately display complex mathematical formulas on websites involving mathematics, physics, engineering, and other fields.The AnQi CMS integrates the MathJax library to support the rendering of mathematical formulas.base.htmlthe file<head>Add the following JavaScript script inside the tag:
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
Integration and configuration of flowcharts
When displaying complex logic, workflow, or system architecture, flowcharts are a direct and effective way of expression.The AnQi CMS supports dynamically generating flowcharts on web pages through the Mermaid library.base.htmlthe file<head>Inside the tag:
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true });
</script>
This script will import the Mermaid library and throughmermaid.initialize({ startOnLoad: true })Command to automatically find and render Mermaid syntax-defined flowcharts when the page is loaded.
Multi-site template strategy and configuration application
The multi-site management mechanism of Anqi CMS provides high flexibility.Each site can have its own template file and configuration, which means you can apply different content display strategies to different sites.
If your Anqicms instance has multiple sites and they all use the same template (for example, you copied the same template folder to all sites), then you only need to modify one copybase.htmlFiles, enabling all sites using this template to display Markdown styles, mathematical formulas, and flowcharts.
However, if your site group uses multiple different templates, for example, one site focuses on technical content, while another is a regular corporate website, then you can only use the template on the technical sitebase.htmlConfigure the CDN and script inclusion as described above.This allows you to selectively enable these advanced content features based on the specific content needs of each site, without imposing additional loading burdens on sites that do not require them, achieving fine-grained content management and optimization.
By following these steps, your safe CMS multi-site content creation capabilities will be significantly enhanced, not only can it present content in a richer and more professional manner, but it can also effectively improve production efficiency and user reading experience.The Anqi CMS aims to provide a powerful and flexible platform for operators, allowing content to truly fulfill its value.
Frequently Asked Questions
**Q1: Do these Markdown, formula, and flowchart configurations whether