A method and terminal for generating a document website
A website and document technology, which is applied in the document website generation method and the terminal field, can solve the problems of increasing debugging costs, slow writing code files, etc., and achieve the effects of easy reading, increased generation speed, and reduced debugging costs
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0064] Please refer to Figure 1 to Figure 2 , Embodiment 1 of the present invention is:
[0065] A method for generating a document website, comprising the steps of:
[0066] S1. Traverse the source code, obtain static files, and submit the static files to the static loader;
[0067] Among them, if there may be multiple static files in the source code, convert them one by one;
[0068] S2. Execute the static loader, convert the static file into a JS file, and generate a document website.
[0069] Wherein, the JS file includes dynamic js code, and the document website is generated according to the js code.
Embodiment 2
[0070] Please refer to Figure 1 to Figure 2 , the second embodiment of the present invention is:
[0071] A method for generating a document website. On the basis of the first embodiment above, the static file in step S1 is specifically an MD file, and the static loader is md loader.
[0072] Step S2 is specifically:
[0073] S21. Analyze the MD file to obtain the AST;
[0074] Wherein, "analyzing the MD file" in step S21 is specifically: analyzing the MD file through the md parser;
[0075] S22. Traversing the AST, and sequentially judging whether the tree nodes of the AST are in the agreed format, if so, returning the content of the tree nodes as native js code, otherwise converting the content of the tree nodes into the js code of the display format and returning, the display format is The display formats supported by the browser;
[0076] Wherein, in step S22, "convert the content of the tree node into the js code of the display format and return" specifically: conver...
Embodiment 3
[0092] Please refer to Figure 1 to Figure 2 , Embodiment three of the present invention is:
[0093] A document website generation terminal 1 includes a memory 3, a processor 2, and a computer program stored in the memory 3 and operable on the processor 2. When the processor 2 executes the computer program, the steps in the first embodiment above are realized.
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


