Method, device and equipment for constructing Web based on Markdown
By using Markdown files and related plug-ins in website development, the website development process is simplified, solving the problems of cumbersome website development and requiring programming knowledge in the existing technology, and realizing rapid development and update functions without server access.
Patent Information
- Application Number
- CN202410838840.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-08
AI Technical Summary
Existing website development methods are based on HTML, CSS, JS, etc., resulting in a cumbersome development process for web pages with fixed styles and simple content, which requires programming knowledge, increases workload, and requires maintaining menu bar information files, which increases complexity. sex.
By creating tool files, use the file-loader library to obtain the Markdown file content and file name, install markdown-it and markdown-it-highlightjs plug-ins, introduce code block highlighting style files, add md2html and insetTemplateMdStr functions, and obtain file name rendering The menu bar renders Markdown files based on the file name splicing path, enabling website development without server access.
It simplifies the website development process, reduces the workload of text writing, and requires only basic front-end knowledge to make and update websites, achieving rapid development and deployment.
Smart Images

Figure CN118747251A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of web page development and design, and specifically to a method, device and equipment for building a Web based on Markdown. Background Art
[0002] Most of the existing Web sites build web page content based on native HTML (Hyper Text Markup Language), CSS (Cascading Style Sheets), JS (JavaScript, a directly interpreted scripting language), etc., or convert back-end languages such as PHP (Hypertext Preprocessor) into HTML and then build web page content.
[0003] For example, by writing a custom Markdown Loader (Webpack loader), you can quickly parse the Markdown (a lightweight markup language) file and render the Vue (a JavaScript framework for building user interfaces) component information it contains onto the page. Although it can dynamically generate menus, the information used to generate the menu bar needs to be stored in a specified file. This method is cumbersome for users, and when adding a new page, you also need to maintain the menu bar information file and add the routing correspondence between the menu name and the file path.
[0004] It can be seen that for some blogs, promotional pages and other web pages with fixed styles and simple content, traditional website production methods are too complicated and not conducive to rapid development and deployment. In addition, users are required to understand programming languages and have certain programming knowledge, which leads to a large workload for website development. Summary of the invention
[0005] The present application provides a method, device and equipment for building a Web based on Markdown, which can effectively reduce the workload of website development and text writing.
[0006] In a first aspect, an embodiment of the present application provides a method for constructing a Web based on Markdown, the method for constructing a Web based on Markdown comprising:
[0007] Create a tool class file for reading the content and file name of the Markdown file, and obtain the content and file name of the Markdown file through the file-loader library;
[0008] Create a tool class file for conversion, install the markdown-it plug-in and the markdown-it-highlightjs plug-in, and introduce the corresponding library and code block highlight style file;
[0009] Added md2html function and insetTemplateMdStr function based on md2html function extension in the tool class file for conversion;
[0010] Get the file name of the Markdown file, render the menu bar according to the file name, concatenate the relative path of the Markdown file based on the file name to get the URL, and render the content of the Markdown file.
[0011] In combination with the first aspect, in one implementation, the steps of creating a tool class file for reading the content and file name of a Markdown file and obtaining the content and file name of the Markdown file through a file-loader library include:
[0012] Create a tool class file in the project directory to read the content and file name of the Markdown file;
[0013] Install the file-loader plug-in through npm and import the file-loader library to obtain the content and file name of the Markdown file through the file-loader library.
[0014] In combination with the first aspect, in one implementation, creating a new tool file for conversion, installing the markdown-it plug-in and the markdown-it-highlightjs plug-in, and introducing the corresponding library and code block highlight style file specifically include:
[0015] Create a new tool file for conversion in the project directory;
[0016] Install the markdown-it plugin and markdown-it-highlightjs plugin via npm;
[0017] Import the markdown-it library, markdown-it-highlightjs library, and code block highlight style files.
[0018] In combination with the first aspect, in one implementation, the md2html function is used to convert the content of a newly added or edited Markdown file into string type data in HTML format through the markdown-it library, and convert the string type data into a DOM structure using a native browser.
[0019] In combination with the first aspect, in one implementation, using a native browser to convert the string type data into a DOM structure specifically includes:
[0020] The parseFromString method of the DOMParser object of the native browser is used to convert the string type data into a DOM structure.
[0021] In combination with the first aspect, in one embodiment, the insetTemplateMdStr function is used to, when a special identifier is used in a Markdown file to insert the file name of another Markdown file, parse the string through the md2html function to filter out the special identifier, obtain the file name of the reused Markdown file, and parse the reused Markdown file through the md2html function to insert the parsed content into the special identifier of the Markdown file.
[0022] In combination with the first aspect, in one implementation, obtaining the file name of the Markdown file, rendering the menu bar according to the file name, obtaining the URL based on the relative path of the Markdown file concatenated with the file name, and rendering the content of the Markdown file specifically includes:
[0023] Get the file name of the Markdown file and render the menu bar according to the file name;
[0024] Based on the file name, the relative path of the Markdown file is concatenated to get the URL to replace the URL of the current browser tab to render the content of the Markdown file.
[0025] In a second aspect, an embodiment of the present application provides a device for building a Web based on Markdown, wherein the device for building a Web based on Markdown includes:
[0026] Create a module to create a tool class file for reading the content and file name of a Markdown file, and obtain the content and file name of a Markdown file through the file-loader library;
[0027] Create a new module, which is used to create a tool file for conversion, install the markdown-it plug-in and the markdown-it-highlightjs plug-in, and introduce the corresponding library and code block highlight style file;
[0028] Add a module to add the md2html function and the insetTemplateMdStr function based on the md2html function extension in the tool class file for conversion;
[0029] The rendering module is used to obtain the file name of the Markdown file, render the menu bar according to the file name, obtain the URL based on the relative path of the Markdown file spliced based on the file name, and render the content of the Markdown file.
[0030] In conjunction with the second aspect, in one implementation, the steps of creating a tool class file for reading the content and file name of a Markdown file and obtaining the content and file name of a Markdown file through a file-loader library include:
[0031] Create a tool class file in the project directory to read the content and file name of the Markdown file;
[0032] Install the file-loader plug-in through npm and import the file-loader library to obtain the content and file name of the Markdown file through the file-loader library.
[0033] In a third aspect, an embodiment of the present application provides a device for building a Web based on Markdown, wherein the device for building a Web based on Markdown comprises a processor, a memory, and a program for building a Web based on Markdown stored in the memory and executable by the processor, wherein when the program for building a Web based on Markdown is executed by the processor, the steps of the method for building a Web based on Markdown described above are implemented.
[0034] The beneficial effects brought by the technical solution provided in the embodiments of the present application include:
[0035] By creating a tool class file for reading the content and file name of the Markdown file, and obtaining the content and file name of the Markdown file through the file-loader library, then creating a new tool class file for conversion, and installing the markdown-it plug-in and markdown-it-highlightjs plug-in, introducing the corresponding library and code block highlight style file, and then adding the md2html function and the insetTemplateMdStr function based on the md2html function extension in the tool class file for conversion, and then obtaining the file name of the Markdown file, rendering the menu bar according to the file name, and obtaining the url based on the relative path of the Markdown file spliced based on the file name, and rendering the content of the Markdown file. This makes it possible to create a website without server access, and only requires mastering the basic knowledge of the front-end. At the same time, updating articles only requires adding new Markdown files, which is simple and convenient, and effectively reduces the workload of website development and text writing. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a flowchart of the method for building a Web based on Markdown in this application;
[0037] Figure 2 This is a schematic diagram of the functional modules of the device for building a Web based on Markdown in this application;
[0038] Figure 3 This is a schematic diagram of the hardware structure of the device used to build the Web based on Markdown in this application. DETAILED DESCRIPTION
[0039] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0040] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0041] On the first aspect, the embodiment of the present application provides a method for building a Web based on Markdown, so that when making a website, there is no need for server access, and only the basic knowledge of the front-end needs to be mastered. At the same time, updating an article only requires adding a new Markdown file, which is simple and convenient.
[0042] In one embodiment, referring to Figure 1 , Figure 1 This is a flowchart of the method for building a Web based on Markdown in this application. Figure 1 As shown, the methods for building a Web based on Markdown include:
[0043] S1: Create a tool class file for reading the content and file name of the Markdown file, and obtain the content and file name of the Markdown file through the file-loader library;
[0044] Furthermore, in one embodiment, a tool class file is created for reading the content and file name of a Markdown file, and the content and file name of the Markdown file are obtained through the file-loader library. The specific steps include:
[0045] S101: Create a tool class file in the project directory for reading the content and file name of a Markdown file;
[0046] S102: Install the file-loader plug-in through npm (Node Package Manager, a NodeJS package management and distribution tool), and import the file-loader library, and obtain the content and file name of the Markdown file through the file-loader library. The file-loader is used to generate a file to the output directory when a file is imported / required in the JavaScript code, and return the address of the file in the JavaScript code.
[0047] That is, create a tool class file requireFiles.js in the project directory to read the content and file name of the Markdown file, then install the file-loader plug-in through npm, introduce the corresponding library, and obtain the content and file name of the Markdown file through the file-loader library.
[0048] S2: Create a tool file for conversion, install the markdown-it plug-in and the markdown-it-highlightjs plug-in, and introduce the corresponding library and code block highlight style file;
[0049] Further, in one embodiment, a tool class file for conversion is created, and the markdown-it plug-in and the markdown-it-highlightjs plug-in are installed, and the corresponding library and code block highlight style file are introduced, specifically including:
[0050] S201: Create a new tool file for conversion in the project directory;
[0051] S202: Install the markdown-it plug-in and markdown-it-highlightjs plug-in through npm; markdown-it is a markdown parser, and markdown-it-highlightjs is used to highlight the content in the code block;
[0052] S203: Introduce the markdown-it library, markdown-it-highlightjs library, and code block highlight style files.
[0053] Specifically, create a new tool file md2html.js for conversion in the project directory, then install the markdown-it plug-in and markdown-it-highlightjs plug-in through npm, and introduce the corresponding library and code block highlight style file highlight.js / styles / default.css.
[0054] S3: Add the md2html function and the insetTemplateMdStr function based on the md2html function extension to the tool class file used for conversion; that is, add two functions, namely the md2html function and the insetTemplateMdStr function, to the tool class file md2html.js.
[0055] Specifically, the md2html function is used to convert the content of a newly added or edited Markdown file into string type data in HTML format through the markdown-it library, and use the native browser to convert the string type data into a DOM (Document Object Model) structure.
[0056] In the present application, the string type data is converted into a DOM structure using a native browser, specifically including: using the parseFromString (used to deserialize (parse) the data in the string into a specified message structure class) method of the DOMParser (a parser used in JavaScript to parse a string into a DOM document) object of the native browser to convert the string type data into a DOM structure.
[0057] That is, the md2html function is used to convert the content of the Markdown file added or edited by the user into string type data in HTML format through the markdown-it library, and use the parseFromString method of the native browser's DOMParser object to convert this string type data into a DOM structure. For this DOM structure, the md2html function can perform special processing on the Markdown file, such as adding a copy function to each code block.
[0058] Specifically, the insetTemplateMdStr function is used to, when a special identifier is used in a Markdown file to insert the file name of another Markdown file, parse the string through the md2html function to filter out the special identifier, obtain the file name of the reused Markdown file, and parse the reused Markdown file through the md2html function, and insert the parsed content into the special identifier of the Markdown file.
[0059] The insetTemplateMdStr function is an extension based on the md2html function. When special identifiers are used in Markdown files, such as {{another Markdown file name}}, the insetTemplateMdStr function can parse the string through the md2html function to filter and identify this special string {{}}, and obtain the file name of the reused Markdown file. The reused Markdown file is then parsed through the md2html function, and the parsed content is inserted into the special identifier of the original Markdown file. The corresponding Markdown file content can be rendered in the parsed page. This function greatly improves the convenience of users, provides corresponding functions for adding public content to global pages, and reduces a lot of workload.
[0060] S4: Get the file name of the Markdown file, render the menu bar according to the file name, concatenate the relative path of the Markdown file based on the file name to get the URL, and render the content of the Markdown file.
[0061] Further, in one embodiment, the file name of the Markdown file is obtained, a menu bar is rendered according to the file name, a URL is obtained by concatenating the relative path of the Markdown file based on the file name, and the content of the Markdown file is rendered, which specifically includes:
[0062] S401: Get the file name of the Markdown file, and render the menu bar according to the file name;
[0063] S402: Based on the file name, the relative path of the Markdown file is concatenated to obtain a url (uniform resource locator) to replace the url of the current browser tab to render the content of the Markdown file.
[0064] The method for building a Web based on Markdown in an embodiment of the present application creates a tool class file for reading the content and file name of a Markdown file, obtains the content and file name of the Markdown file through the file-loader library, then creates a new tool class file for conversion, installs the markdown-it plug-in and the markdown-it-highlightjs plug-in, introduces the corresponding library and code block highlight style file, then adds an md2html function and an insetTemplateMdStr function based on the md2html function extension in the tool class file for conversion, then obtains the file name of the Markdown file, renders a menu bar according to the file name, obtains the url based on the relative path of the Markdown file spliced based on the file name, and renders the content of the Markdown file, so that there is no need for server access when making a website, and only the basic knowledge of the front-end needs to be mastered. At the same time, updating an article only requires adding a new Markdown file, which is simple and convenient, and effectively reduces the workload of website development and text writing.
[0065] In a second aspect, an embodiment of the present application also provides a device for building a Web based on Markdown.
[0066] In one embodiment, referring to Figure 2 , Figure 2 This is a functional module diagram of a device for building a Web based on Markdown in this application. Figure 2 As shown, the apparatus for building a Web based on Markdown includes: creating a module, creating a new module, adding a module, and rendering a module.
[0067] In this application, a tool class file is created to read the content and file name of a Markdown file, and the content and file name of the Markdown file are obtained through the file-loader library. The specific steps include:
[0068] Create a tool class file in the project directory to read the content and file name of the Markdown file;
[0069] Install the file-loader plug-in through npm and import the file-loader library to obtain the content and file name of the Markdown file through the file-loader library.
[0070] In this application, a new tool file for conversion is created, and the markdown-it plug-in and markdown-it-highlightjs plug-in are installed, and the corresponding library and code block highlight style file are introduced, including:
[0071] Create a new tool file for conversion in the project directory;
[0072] Install the markdown-it plugin and markdown-it-highlightjs plugin via npm;
[0073] Import the markdown-it library, markdown-it-highlightjs library, and code block highlight style files.
[0074] In this application, the md2html function is used to convert the content of a newly added or edited Markdown file into string type data in HTML format through the markdown-it library, and use the native browser to convert the string type data into a DOM structure.
[0075] In this application, the native browser is used to convert the string type data into a DOM structure, specifically including:
[0076] The parseFromString method of the DOMParser object of the native browser is used to convert the string type data into a DOM structure.
[0077] In this application, the insetTemplateMdStr function is used to, when a special identifier is used in a Markdown file to insert the file name of another Markdown file, parse the string through the md2html function to filter out the special identifier, obtain the file name of the reused Markdown file, and parse the reused Markdown file through the md2html function, and insert the parsed content into the special identifier of the Markdown file.
[0078] In this application, the file name of the Markdown file is obtained, the menu bar is rendered according to the file name, the URL is obtained by concatenating the relative path of the Markdown file based on the file name, and the content of the Markdown file is rendered, which specifically includes:
[0079] Get the file name of the Markdown file and render the menu bar according to the file name;
[0080] Based on the file name, the relative path of the Markdown file is concatenated to get the URL to replace the URL of the current browser tab to render the content of the Markdown file.
[0081] The device for building a Web based on Markdown in the embodiment of the present application creates a tool class file for reading the content and file name of a Markdown file, obtains the content and file name of the Markdown file through the file-loader library, then creates a new tool class file for conversion, installs the markdown-it plug-in and the markdown-it-highlightjs plug-in, introduces the corresponding library and code block highlight style file, then adds an md2html function and an insetTemplateMdStr function based on the md2html function extension in the tool class file for conversion, then obtains the file name of the Markdown file, renders a menu bar according to the file name, obtains the url based on the relative path of the Markdown file spliced based on the file name, and renders the content of the Markdown file, so that there is no need for server access when making a website, and only the basic knowledge of the front-end needs to be mastered. At the same time, updating an article only requires adding a new Markdown file, which is simple and convenient, and effectively reduces the workload of website development and text writing.
[0082] In a third aspect, an embodiment of the present application provides a device for building a Web based on Markdown. The device for building a Web based on Markdown may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.
[0083] Reference Figure 3 , Figure 3 This is a schematic diagram of the hardware structure of a device for building a Web based on Markdown involved in the embodiment of the present application. In the embodiment of the present application, the device for building a Web based on Markdown may include a processor, a memory, a communication interface, and a communication bus.
[0084] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.
[0085] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces, which are used to interconnect devices within the device for building a Web based on Markdown, and interfaces for interconnecting the device for building a Web based on Markdown with other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.
[0086] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.
[0087] The processor may be a general-purpose processor, which may call a program for building a Web based on Markdown stored in a memory and execute the method for building a Web based on Markdown provided in an embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the program for building a Web based on Markdown is called may refer to the various embodiments of the method for building a Web based on Markdown in the present application, which will not be described in detail here.
[0088] Those skilled in the art will understand that Figure 3 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0089] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.
[0090] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.
[0091] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.
[0092] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.
[0093] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.
[0094] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.
[0095] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for building a Web based on Markdown, characterized in that: The method for building a Web based on Markdown includes: Create a tool class file for reading the content and file name of the Markdown file, and obtain the content and file name of the Markdown file through the file-loader library; Create a tool class file for conversion, install the markdown-it plug-in and the markdown-it-highlightjs plug-in, and introduce the corresponding library and code block highlight style file; Added md2html function and insetTemplateMdStr function based on md2html function extension in the tool class file for conversion; Get the file name of the Markdown file, render the menu bar according to the file name, concatenate the relative path of the Markdown file based on the file name to get the URL, and render the content of the Markdown file.
2. A method for building a Web based on Markdown as claimed in claim 1, characterized in that: The specific steps of creating a tool class file for reading the content and file name of a Markdown file and obtaining the content and file name of a Markdown file through the file-loader library include: Create a tool class file in the project directory to read the content and file name of the Markdown file; Install the file-loader plug-in through npm and import the file-loader library to obtain the content and file name of the Markdown file through the file-loader library.
3. A method for building a Web based on Markdown as claimed in claim 1, characterized in that: The tool class file for conversion is created, and the markdown-it plug-in and markdown-it-highlightjs plug-in are installed, and the corresponding library and code block highlight style file are introduced, specifically including: Create a new tool file for conversion in the project directory; Install the markdown-it plugin and markdown-it-highlightjs plugin via npm; Import the markdown-it library, markdown-it-highlightjs library, and code block highlight style files.
4. A method for building a Web based on Markdown as claimed in claim 3, characterized in that: The md2html function is used to convert the content of a newly added or edited Markdown file into string data in HTML format through the markdown-it library, and convert the string data into a DOM structure using a native browser.
5. A method for building a Web based on Markdown as claimed in claim 4, characterized in that: The converting the string type data into a DOM structure using a native browser specifically includes: The parseFromString method of the DOMParser object of the native browser is used to convert the string type data into a DOM structure.
6. A method for building a Web based on Markdown as claimed in claim 3, characterized in that: The insetTemplateMdStr function is used to, when a special identifier is used in a Markdown file to insert the file name of another Markdown file, parse the string through the md2html function to filter out the special identifier, obtain the file name of the reused Markdown file, and parse the reused Markdown file through the md2html function to insert the parsed content into the special identifier of the Markdown file.
7. A method for building a Web based on Markdown as claimed in claim 6, characterized in that: The method of obtaining the file name of the Markdown file, rendering the menu bar according to the file name, obtaining the URL by concatenating the relative path of the Markdown file based on the file name, and rendering the content of the Markdown file specifically includes: Get the file name of the Markdown file and render the menu bar according to the file name; Based on the file name, the relative path of the Markdown file is concatenated to get the URL to replace the URL of the current browser tab to render the content of the Markdown file.
8. A device for building a Web based on Markdown, characterized in that: The device for constructing a Web based on Markdown includes: Create a module to create a tool class file for reading the content and file name of a Markdown file, and obtain the content and file name of a Markdown file through the file-loader library; Create a new module, which is used to create a tool file for conversion, install the markdown-it plug-in and the markdown-it-highlightjs plug-in, and introduce the corresponding library and code block highlight style file; Add a module to add the md2html function and the insetTemplateMdStr function based on the md2html function extension in the tool class file for conversion; The rendering module is used to obtain the file name of the Markdown file, render the menu bar according to the file name, obtain the URL based on the relative path of the Markdown file spliced based on the file name, and render the content of the Markdown file.
9. The device for constructing a Web based on Markdown as claimed in claim 8, characterized in that: The specific steps of creating a tool class file for reading the content and file name of a Markdown file and obtaining the content and file name of a Markdown file through the file-loader library include: Create a tool class file in the project directory to read the content and file name of the Markdown file; Install the file-loader plug-in through npm and import the file-loader library to obtain the content and file name of the Markdown file through the file-loader library.
10. A device for building a Web based on Markdown, characterized in that: The device for building a Web based on Markdown includes a processor, a memory, and a program for building a Web based on Markdown stored in the memory and executable by the processor, wherein when the program for building a Web based on Markdown is executed by the processor, the steps of the method for building a Web based on Markdown as described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method for analyzing Markdown containing Vue component based on Webpack
CN117950666A
Cross-browser toolbar and method thereof
US20100122157A1
System and method for managing file access
US20190394163A1
