The routing table component is mainly used for SEO (Search Engine Optimization), which enables Search engines to Search our web pages. Generally speaking, the routing table can be directly used as a database to store text content. Now let’s talk about the specific use method with demo.

1.SEO fundamentals

When a search engine crawls the data, it takes the links to all the sub-pages from the main page’s source code and iterates through each link in turn, Description (Abstract), keywords (keywords), path (path), title (title), article content and so on in the section tag taken from the page source code of the sub-page are stored in the database of the search engine. Finally, according to the algorithm matching, it is the web page link that meets the conditions.

Then let’s look at the routing table component. After adding a routing table component in the background, its data table will automatically add four fields: path, title, keyword, and description. When the page is rendered, it automatically loads the contents of the routing table (path, title, keyword, description, custom fields, etc.), generates page links, And generate description, keywords, path, title, custom fields, etc. in the page link section tag. With these contents in the web source code, it is natural to support SEO. Of course, without the use of routing table, there is no page link, and it will not generate description, keywords, path, title and other attributes, so the search engine can not climb the data and can not search the web page made.

In the foreground, we made two pages, respectively as the main page and details page. In addition, add the initialization event to the front desk, first read the current routing information of the system, if it is not empty, jump to the routing interface; If it is empty, tell the routing table to print the data to an array of objects under the main page, and then loop through to create the presentation information.