📄️ Configuration
This is a NestJS module that serves as the core of a content management platform, supporting basic features such as article versioning and categorization. The storage of article content uses Quadrats as the core storage system and requires TypeORM for database interfacing. Of course, you are free to define the necessary Entity Columns on all stored tables.
📄️ ArticleBaseService
ArticleBaseService provides fundamental article operation functionalities, including creating new articles, adding versions, and searching for articles.
📄️ Customize Entities
You can extend the fields of articles and categories through the TypeORM ChildEntity mechanism. Below, we provide some examples to illustrate how to add a boolean field when you want to record whether an article should be published.
📄️ Full Text Search
If you want to enable the full-text search feature, we use @node-rs/jieba as the word segmentation tool. Please install it from npm first, and then indicate to the Library that you wish to enable the full-text search feature in forRoot. When the full-text search feature is enabled, the Library will automatically initialize all articles in the current database. The indexed fields for search include title, description, tags, and the content within paragraph blocks in Quadrats.
📄️ Draft Mode
If you enable draft mode, you should release each version before user find it. In default, findAll only return released latest version.
📄️ Signature Mode
The library supports a signature mode, which can serve as a supplement to version control or as a common draft mode. All signatures are tied to specific versions of articles, and you can define the required signature workflows, including permission check parameters for each step in the process.
📄️ Query Builder
You can use the Symbol provided by the library to inject the TypeORM Repository and create a custom Query Builder. If you have a custom entity, the library will automatically return a repository bound to the entity you provided.