CN112817915A - Automatic multi-product document uniform publishing and displaying method - Google Patents

Automatic multi-product document uniform publishing and displaying method Download PDF

Info

Publication number
CN112817915A
CN112817915A CN202110133857.0A CN202110133857A CN112817915A CN 112817915 A CN112817915 A CN 112817915A CN 202110133857 A CN202110133857 A CN 202110133857A CN 112817915 A CN112817915 A CN 112817915A
Authority
CN
China
Prior art keywords
document
markdown
service
version
warehouse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110133857.0A
Other languages
Chinese (zh)
Inventor
尹东超
石光银
蔡卫卫
高传集
江燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN202110133857.0A priority Critical patent/CN112817915A/en
Publication of CN112817915A publication Critical patent/CN112817915A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1873Versioning file systems, temporal file systems, e.g. file system supporting different historic versions of files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses an automatic multi-product document uniform publishing and displaying method, which relates to the technical field of document management and comprises two parts, namely a Webhook monitoring service and a rendering pipeline service; the Webhook monitoring service provides a continuously running API (application programming interface) in a Web service form to receive a markdown document source code updating event pushed by a code warehouse, extracts parameters in a request data packet according to the received updating event, and then sends warehouse information and version information recorded in the data packet to rendering pipeline service; the rendering pipeline service predefines a pipeline, receives a document updating task and delivers task data to an idle work queue, the work queue starts the predefined pipeline to render each markdown document in sequence and generate a corresponding static webpage, finally, the update is automatically issued to a site, and a user can check a newly generated document page by accessing a site link. The invention can solve the difficult problems of multi-product document unified management release and version control.

Description

Automatic multi-product document uniform publishing and displaying method
Technical Field
The invention relates to the technical field of document management, in particular to an automatic multi-product document uniform publishing and displaying method.
Background
Documents are important intellectual assets for businesses.
In an IT enterprise, a good product research and development document system is greatly beneficial to the aspects of improving the research and development and delivery efficiency of enterprise products, improving the team cooperation efficiency, saving the communication cost and the like. In general, most technical teams use source code version management tools (e.g., Git) to manage development and development of technical documents. Git is an open-source distributed version control system that can handle very small to very large project version management efficiently and at high speed. Git is version control software of an open source code developed by Linus Torvalds to help manage Linux kernel development, and is different from common version control tools CVS, Subversion and the like, a distributed version library mode is adopted, and server side software support is not needed.
However, the traditional code management tool takes warehouse as a unit, and each document needs to establish independent code warehouse management, such as design documents, development documents, deployment documents and the like. When enterprise teams are large and product lines are rich, the number of document warehouses needing to be managed also grows exponentially. However, the traditional code version control tool cannot achieve unified collaborative management of multiple documents and cannot conveniently display and look up the multiple documents to the outside.
Disclosure of Invention
Aiming at the requirements and the defects of the prior art development, the invention provides an automatic multi-product document uniform issuing and displaying method, and solves the problems of multi-product document uniform issuing and displaying and version control.
The invention discloses an automatic multi-product document uniform publishing and displaying method, which adopts the following technical scheme for solving the technical problems:
an automatic multi-product document uniform publishing display method is realized by two parts, namely Webhook monitoring service and rendering pipeline service;
the Webhook monitoring service provides a continuously running API (application programming interface) in a Web service form to receive a markdown document source code updating event pushed by a code warehouse, extracts parameters in a request data packet according to the received updating event, and then sends warehouse information and version information recorded in the data packet to rendering pipeline service;
the rendering pipeline service is predefined with a pipeline, and is used for receiving a document updating task sent by the Webhook monitoring service and delivering task data to an internal idle work queue, after the work queue receives the task data, the predefined pipeline is started to render each markdown document in sequence, a corresponding static webpage is generated, finally, the document is automatically issued and updated to a site, and a user can view a newly generated document page by accessing a site link.
Further, the method for uniformly publishing and displaying the product documents realizes the storage, editing, cooperation and version control of markdown document contents based on a Git version control tool, uses Gitlab to carry out centralized storage and hosting of a Git warehouse, and uses a Webhook function provided by Gitlab to realize the automatic updating of site contents according to the markdown document source code change.
Further, when the user modifies the markdown document or issues a new version of TAG and pushes the change to the code warehouse, the code warehouse receives the markdown document source code update event pushed by the code warehouse according to the API interface provided by the Webhook listening service.
Further, after the task data of the work queue is executed, the work queue is turned into an idle state again, and the rendering pipeline service is waited to dispatch the next document updating task.
Preferably, a Hugo document rendering tool is used for rendering pipeline services.
Preferably, the Hugo document rendering tool is written using Golang language.
Furthermore, a Hugo document rendering tool is adopted to perform rendering pipeline service, and the specific working flow is as follows:
(1) pulling the latest document: pulling a markdown document of the latest version on the code warehouse through a git command according to the distributed task information;
(2) analyzing version information: analyzing the historical version and tag information from the updated code warehouse, and writing the historical version and tag information into a temporary configuration file for use in a subsequent process;
(3) analyzing the document directory tree: analyzing the configuration file of the original directory tree, analyzing the configuration file into a tree data structure according to the directory hierarchical relationship configured in the configuration file, and storing variables for subsequent steps;
(4) configuring a content directory structure: according to the directory tree structure of the previous step, the markdown source code files corresponding to each level in the directory tree are stored into a temporary working directory, and meanwhile, the directories of the corresponding version are configured according to the tag information of the version extracted in the front, so that the retention of the historical version and the switching and browsing of the multiple versions are realized;
(5) sequentially processing markdown document contents, inserting page head and page tail metadata according to a predefined pipeline and corresponding directory and title information, and using the page configuration during Hugo rendering;
(6) configuring a Hugo document rendering tool: a markdown document warehouse is an independent document site, the document sites of all the markdown document warehouses form an aggregation site, and a Hugo document rendering tool is used for independently configuring each markdown document warehouse;
(7) after the configuration is finished, calling a Hugo command, rendering and outputting the markdown document in the temporary working directory into a series of static html pages and corresponding pictures and style sheets;
(8) deploying the document: copying the input static resources to a deployment directory of a server, wherein the server can provide browsing service of a static site through configuring web service and can also provide static page service without a deployment link;
(9) updating an aggregation home page: the card type static page is designed to provide a uniform aggregation entrance for document viewers, all product documents are displayed on the home page in a card form by the card type static page, and a corresponding document site can be accessed by clicking the card.
Preferably, all cards are automatically generated according to the warehouse configuration information and the description information which is dynamically read, and are automatically updated.
Compared with the prior art, the automatic multi-product document uniform publishing and displaying method has the following beneficial effects:
according to the invention, through the Webhook monitoring service and the rendering pipeline service, the uniform publishing display of the multi-product documents can be realized, the blank of the current multi-version document aggregation publishing system is filled, the unattended automatic document website updating is realized by utilizing the notification capability of the gitlab hosting warehouse, the team document management and uniform publishing process are greatly simplified, the advantage of git version management is fully utilized, and the synergy and normalization of document and product publishing are realized.
Detailed Description
In order to make the technical scheme, the technical problems to be solved and the technical effects of the present invention more clearly apparent, the following technical scheme of the present invention is clearly and completely described with reference to the specific embodiments.
The first embodiment is as follows:
the embodiment provides an automatic multi-product document uniform publishing and displaying method, which comprises two parts of Webhook monitoring service and rendering pipeline service;
the Webhook monitoring service provides a continuously running API (application programming interface) in a Web service form to receive a markdown document source code updating event pushed by a code warehouse, extracts parameters in a request data packet according to the received updating event, and then sends warehouse information and version information recorded in the data packet to rendering pipeline service;
the rendering pipeline service is predefined with a pipeline, and is used for receiving a document updating task sent by the Webhook monitoring service and delivering task data to an internal idle work queue, after the work queue receives the task data, the predefined pipeline is started to render each markdown document in sequence, a corresponding static webpage is generated, finally, the document is automatically issued and updated to a site, and a user can view a newly generated document page by accessing a site link.
And after the task data of the work queue is executed, the work queue is switched into an idle state again, and the rendering pipeline service is waited to dispatch the next document updating task.
In the embodiment, the method for uniformly publishing and displaying the product document realizes the storage, editing, cooperation and version control of markdown document contents based on a Git version control tool, uses Gitlab to carry out centralized storage and hosting of a Git warehouse, and uses the Webhook function provided by Gitlab to realize the automatic update of site contents according to the markdown document source code change.
When a user modifies a markdown document or issues a new version of TAG and pushes the change to a code warehouse, the code warehouse receives a markdown document source code updating event pushed by the code warehouse according to an API (application program interface) provided by the Webhook monitoring service.
Example two:
on the basis of the first embodiment, the automated multi-product document uniform publishing and displaying method of the embodiment adopts a Hugo document rendering tool written in Golang language to perform rendering pipeline service, and the specific working flow is as follows:
(1) pulling the latest document: pulling a markdown document of the latest version on the code warehouse through a git command according to the distributed task information;
(2) analyzing version information: analyzing the historical version and tag information from the updated code warehouse, and writing the historical version and tag information into a temporary configuration file for use in a subsequent process;
(3) analyzing the document directory tree: analyzing the configuration file of the original directory tree, analyzing the configuration file into a tree data structure according to the directory hierarchical relationship configured in the configuration file, and storing variables for subsequent steps;
(4) configuring a content directory structure: according to the directory tree structure of the previous step, the markdown source code files corresponding to each level in the directory tree are stored into a temporary working directory, and meanwhile, the directories of the corresponding version are configured according to the tag information of the version extracted in the front, so that the retention of the historical version and the switching and browsing of the multiple versions are realized;
(5) sequentially processing markdown document contents, inserting page head and page tail metadata according to a predefined pipeline and corresponding directory and title information, and using the page configuration during Hugo rendering;
(6) configuring a Hugo document rendering tool: a markdown document warehouse is an independent document site, the document sites of all the markdown document warehouses form an aggregation site, and a Hugo document rendering tool is used for independently configuring each markdown document warehouse;
(7) after the configuration is finished, calling a Hugo command, rendering and outputting the markdown document in the temporary working directory into a series of static html pages and corresponding pictures and style sheets;
(8) deploying the document: copying the input static resources to a deployment directory of a server, wherein the server can provide browsing service of a static site through configuring web service and can also provide static page service without a deployment link;
(9) updating an aggregation home page: the card type static page is designed to provide a uniform aggregation entrance for document viewers, all product documents are displayed on the home page in a card form by the card type static page, and a corresponding document site can be accessed by clicking the card.
And all cards are automatically generated according to the warehouse configuration information and the description information which is dynamically read, and are automatically updated.
In summary, the automated multi-product document uniform publishing display method can solve the problems of multi-product document uniform management publishing and version control through the Webhook monitoring service and the rendering pipeline service.
The principles and embodiments of the present invention have been described in detail using specific examples, which are provided only to aid in understanding the core technical content of the present invention. Based on the above embodiments of the present invention, those skilled in the art should make any improvements and modifications to the present invention without departing from the principle of the present invention, and therefore, the present invention should fall into the protection scope of the present invention.

Claims (8)

1. An automatic multi-product document uniform publishing display method is characterized in that the realization comprises two parts of a Webhook monitoring service and a rendering pipeline service;
the Webhook monitoring service provides a continuously running API (application programming interface) in a Web service form to receive a markdown document source code updating event pushed by a code warehouse, extracts parameters in a request data packet according to the received updating event, and then sends warehouse information and version information recorded in the data packet to rendering pipeline service;
the rendering pipeline service is predefined with a pipeline, and is used for receiving a document updating task sent by the Webhook monitoring service and delivering task data to an internal idle work queue, after the work queue receives the task data, the predefined pipeline is started to render each markdown document in sequence, a corresponding static webpage is generated, finally, the document is automatically issued and updated to a site, and a user can view a newly generated document page by accessing a site link.
2. The method for displaying the multi-product document in the automatic unified release manner as claimed in claim 1, wherein the method is based on a Git version control tool to realize the storage, editing, collaboration and version control of markdown document contents, and uses Gitlab to perform centralized storage and hosting of Git warehouse, and uses the Webhook function provided by Gitlab to realize the automatic update of site contents according to the markdown document source code change.
3. The method as claimed in claim 1, wherein when the user modifies markdown documents or issues a new version of TAG and pushes the change to the code repository, the code repository receives markdown document source code update events pushed by the code repository according to an API interface provided by Webhook listening services.
4. The method as claimed in claim 1, wherein after the task data in the work queue is executed, the work queue is turned to an idle state again to wait for the rendering pipeline service to dispatch a next document update task.
5. The method according to claim 1, wherein a Hugo document rendering tool is used for rendering pipeline services.
6. The method of claim 5 in which the Hugo document rendering tool is written in Golang language.
7. The automated multi-product document uniform publishing and displaying method according to claim 5, wherein a Hugo document rendering tool is used for rendering pipeline services, and the specific workflow is as follows:
(1) pulling the latest document: pulling a markdown document of the latest version on the code warehouse through a git command according to the distributed task information;
(2) analyzing version information: analyzing the historical version and tag information from the updated code warehouse, and writing the historical version and tag information into a temporary configuration file for use in a subsequent process;
(3) analyzing the document directory tree: analyzing the configuration file of the original directory tree, analyzing the configuration file into a tree data structure according to the directory hierarchical relationship configured in the configuration file, and storing variables for subsequent steps;
(4) configuring a content directory structure: according to the directory tree structure of the previous step, the markdown source code files corresponding to each level in the directory tree are stored into a temporary working directory, and meanwhile, the directories of the corresponding version are configured according to the tag information of the version extracted in the front, so that the retention of the historical version and the switching and browsing of the multiple versions are realized;
(5) sequentially processing markdown document contents, inserting page head and page tail metadata according to a predefined pipeline and corresponding directory and title information, and using the page configuration during Hugo rendering;
(6) configuring a Hugo document rendering tool: a markdown document warehouse is an independent document site, the document sites of all the markdown document warehouses form an aggregation site, and a Hugo document rendering tool is used for independently configuring each markdown document warehouse;
(7) after the configuration is finished, calling a Hugo command, rendering and outputting a markdown document warehouse in the temporary working directory into a series of static html pages and corresponding pictures and style sheets;
(8) deploying the document: copying the input static resources to a deployment directory of a server, wherein the server can provide browsing service of a static site through configuring web service and can also provide static page service without a deployment link;
(9) updating an aggregation home page: the card type static page is designed to provide a uniform aggregation entrance for document viewers, all product documents are displayed on the home page in a card form by the card type static page, and a corresponding document site can be accessed by clicking the card.
8. The method according to claim 7, wherein all cards are automatically generated and updated according to the warehouse configuration information and the description information read dynamically.
CN202110133857.0A 2021-02-01 2021-02-01 Automatic multi-product document uniform publishing and displaying method Pending CN112817915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110133857.0A CN112817915A (en) 2021-02-01 2021-02-01 Automatic multi-product document uniform publishing and displaying method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110133857.0A CN112817915A (en) 2021-02-01 2021-02-01 Automatic multi-product document uniform publishing and displaying method

Publications (1)

Publication Number Publication Date
CN112817915A true CN112817915A (en) 2021-05-18

Family

ID=75860516

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110133857.0A Pending CN112817915A (en) 2021-02-01 2021-02-01 Automatic multi-product document uniform publishing and displaying method

Country Status (1)

Country Link
CN (1) CN112817915A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609428A (en) * 2021-08-09 2021-11-05 平安国际智慧城市科技股份有限公司 Method, device, equipment and medium for online checking prototype design file based on Git
CN114841127A (en) * 2022-06-29 2022-08-02 天津联想协同科技有限公司 Layer superposition method and device based on streaming electronic collaboration document

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101523386A (en) * 2006-09-29 2009-09-02 雅虎公司 Platform for rendering content for a remote device
CN102779164A (en) * 2012-06-20 2012-11-14 深圳市远行科技有限公司 Business system and rendering method of dynamic pages of same
US9363134B1 (en) * 2008-09-12 2016-06-07 Amazon Technologies, Inc. Lightweight browser monitoring and viewing
CN107480234A (en) * 2017-08-07 2017-12-15 四川长虹电器股份有限公司 A kind of enterprise-level documentation center implementation method based on git
CN109901834A (en) * 2019-01-25 2019-06-18 平安科技(深圳)有限公司 Document file page generation method, device, computer equipment and storage medium
CN110751712A (en) * 2019-10-22 2020-02-04 中设数字技术股份有限公司 Online three-dimensional rendering technology and system based on cloud platform
CN111191176A (en) * 2019-12-24 2020-05-22 腾讯云计算(北京)有限责任公司 Website content updating method, device, terminal and storage medium
CN111399856A (en) * 2020-03-11 2020-07-10 山东汇贸电子口岸有限公司 File configuration editing method and system in service deployment
CN111651196A (en) * 2020-06-24 2020-09-11 腾讯科技(深圳)有限公司 Document publishing method, device and server

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101523386A (en) * 2006-09-29 2009-09-02 雅虎公司 Platform for rendering content for a remote device
US9363134B1 (en) * 2008-09-12 2016-06-07 Amazon Technologies, Inc. Lightweight browser monitoring and viewing
CN102779164A (en) * 2012-06-20 2012-11-14 深圳市远行科技有限公司 Business system and rendering method of dynamic pages of same
CN107480234A (en) * 2017-08-07 2017-12-15 四川长虹电器股份有限公司 A kind of enterprise-level documentation center implementation method based on git
CN109901834A (en) * 2019-01-25 2019-06-18 平安科技(深圳)有限公司 Document file page generation method, device, computer equipment and storage medium
CN110751712A (en) * 2019-10-22 2020-02-04 中设数字技术股份有限公司 Online three-dimensional rendering technology and system based on cloud platform
CN111191176A (en) * 2019-12-24 2020-05-22 腾讯云计算(北京)有限责任公司 Website content updating method, device, terminal and storage medium
CN111399856A (en) * 2020-03-11 2020-07-10 山东汇贸电子口岸有限公司 File configuration editing method and system in service deployment
CN111651196A (en) * 2020-06-24 2020-09-11 腾讯科技(深圳)有限公司 Document publishing method, device and server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
GITLAB: "GitLab Markdown", 《GITLAB 中文文档》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609428A (en) * 2021-08-09 2021-11-05 平安国际智慧城市科技股份有限公司 Method, device, equipment and medium for online checking prototype design file based on Git
CN114841127A (en) * 2022-06-29 2022-08-02 天津联想协同科技有限公司 Layer superposition method and device based on streaming electronic collaboration document
CN114841127B (en) * 2022-06-29 2022-09-23 天津联想协同科技有限公司 Layer stacking method and device based on streaming electronic collaboration document

Similar Documents

Publication Publication Date Title
US10242041B2 (en) Dynamic filter processing
JP6850907B2 (en) Generate and execute query plans in a relational database management system with a temporal-relational database
JP5085548B2 (en) Real-time synchronization of XML data between applications
US9170999B2 (en) Method, system, and program product for transferring document attributes
JP5813499B2 (en) Simultaneous collaborative review of documents
CN110119393B (en) Code version management system and method
US20100205206A1 (en) System and method for displaying data on a thin client
CA2403044A1 (en) Method and apparatus for storing changes to file attributes without having to store an additional copy of the file contents
CN106776783B (en) Unstructured data memory management method and system
CA2627270A1 (en) System and method for displaying data on a thin client
CN102917009B (en) A kind of stock certificate data collection based on cloud computing technology and storage means and system
US8805777B2 (en) Data record collapse and split functionality
US8782631B2 (en) Copy management of process versions over lifecycle
CN101765831A (en) Database contradiction solution method
CN105787091B (en) Support the content delivering system and method for multiple terminals
US7512941B2 (en) Method and system for distributing and updating heterogeneous resources
CN103853543A (en) Method used for quickly constructing forms in enterprise information system development process
CN112817915A (en) Automatic multi-product document uniform publishing and displaying method
US9244707B2 (en) Transforming user interface actions to script commands
CN105760520A (en) Data control platform and architecture
CN109885642B (en) Hierarchical storage method and device for full-text retrieval
CN102880683A (en) Automatic network generation system for feasibility study report and generation method thereof
CN110737506A (en) virtual machine image version management method
CN102355499A (en) Cloud computing system
US20040167905A1 (en) Content management portal and method for managing digital assets

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210518

RJ01 Rejection of invention patent application after publication