In the previous section, we covered the basics of blogging and made it easy to manage blog posts in the foreground. However, because the front end management only involves simple publishing and editing, more complex back-end management functions cannot be realized. So in this section, we’ll show you how to add backend functionality.

First of all, what are the functions of the blog background?

Generally speaking, because the blog itself is not complex, so need to use the functions will not be too much, basically need the functions will be: background login, management home page, system Settings, navigation Settings, content and picture Settings, article management, classification management, picture management, comment management, etc.. Because our blog is in line with SEO optimization, therefore, we also need to add some convenient SEO optimization operation functions, such as: Robots management, SItemap management, friendship link management, search engine push management and other SEO optimization functions.

There is almost a general idea of the background function. For the convenience of development, we first use XMind mind mapping software to outline the function we conceived above with mind mapping:

Through the mind map above, we can see at a glance, blog background roughly function distribution. Some functions are described in detail. From the mind map, we have divided the backend functions into four chunks:

Blog Background home page

This is the easy one. Background login, the first foothold, is the background home page. Naturally, we want to be able to see our blog data easily and visually in a prominent place on the back page. Therefore, on the back page of the blog, we mainly put three pieces of content:

  • The content data statistics section can intuitively see how many articles, categories, comments and other data blog.
  • On the homepage of the blog background, we place quick links for some common operations, such as publishing articles, viewing comments and other contents, which can directly reach the specific operation interface
  • Copyright Information The copyright information helps inform users of the current software version, upgrade information, and functions and features of the software version. You can also put some help documents, so that users encounter problems in the process of use, you can easily get help.

Blog System Settings

This part includes the front-end and back-end Settings of the blog, such as site information, content Settings, SEO Settings, navigation Settings, account Settings and other content. Now let’s break it down into five pieces.

Global Settings

Global Settings include the website name, website logo, record number, copyright information, background address, website status, site closure prompt and other information.

  • Site name The site name is used to call the front-end blog page, generally, in SEO functions, generally used to add a suffix for the title and other places.
  • Website logo can be easily replaced in the background logo, website logo is the soul of a website, of course, it is not necessary to set if not set, the front header will be replaced by the site name, if set, the logo will be displayed.
  • Put on record the number of recent domestic to put on record inspection more and more strict, do not put on record website, cannot go on line in domestic server, put on record, also must hang put on record number, and want to connect to put on record center. Therefore, add a place to fill in the record number, which can be conveniently set up. After filling in the record number, the front desk call, will automatically add jump to the record center connection, no longer afraid of the record was cancelled.
  • Copyright information here can be customized copyright information, used to display in the blog footer place, equivalent to SEO optimization in one sentence navigation, here you can layout keywords, increase the efficiency of keyword optimization home page.
  • Background address is often a website is easy to be invaded, background address exposure accounted for a great reason. The advantage of this feature is that you can customize the background address and never worry about exposing the background address.
  • If you don’t want to open your blog for the time being, you can set the status of your blog to closed. Of course, in addition to the background, the background is still accessible, or you can no longer open the site.
  • Close the site prompt with the state of the site to use, when closed the site, want to show the content.

The content Settings

Content Settings can be a big help in making your blog more productive. Content Settings, we can easily manage content information in batches. Image Settings, etc. Its functions are:

  • In some cases, our articles are pasted from somewhere else and we want to localize the images. Automatic image capture is a great help.
  • From the perspective of SEO, if we only have outbound connection, no inbound connection, that is to guide the weight to others, it has become someone else’s external chain pool. So we sometimes need to set up the filter chain so that the weight stays in the station.
  • When zooming in on the image above, we are not deliberately sizing the image. We can set a uniform size in the background of the blog, no matter how big the picture uploaded, will be compressed to the specified size, can very well reduce the server bandwidth and storage space requirements.
  • Auto scale to specified size This is used in conjunction with auto scale large images. Use to specify the size of the zoom, 800 pixels wide by default.
  • Thumbnail Size This parameter is used to set the size of the automatically generated thumbnail. The default size is 250 x 250 pixels.
  • The thumbnail can be generated in three ways: scaling by equal proportion, scaling by the longest edge, padding by the shortest edge, and clipping by the center.
  • Default thumbnail When we call the thumbnail in the list, we can add a default thumbnail to the article without thumbnail for uniformity.
  • Batch generate thumbnail this function is also very useful, when we need to change the size of the thumbnail, you can batch generate thumbnail, so that the past and generated thumbnail, are now set to the same size.

SEO Settings

What comes to mind temporarily is to provide convenient homepage SEO Settings, homepage TDK, that is, title, description, keywords information. The background is convenient and quick to modify SEO information, follow up keyword optimization at any time. Save every time to modify the home PAGE TDK information, need to modify the trouble in the code.

Navigation Settings

Setting up navigation in the background also saves the trouble of adding navigation in the code. This is especially helpful for blogs that need to change their navigation information frequently. We can adjust the home page, classified page and external chain as navigation information in navigation Settings, and can also add secondary navigation and other functions.

Account Settings

Administrator account Settings Because the blog is too simple, there is no separate module for storing administrator account Settings. We can simply set here to adjust the account name, and modify the administrator’s password information. In fact, we can also expand the functions of administrator group, permission assignment, multi-administrator, etc. For the sake of simple operation, we omit it here, and we will extend it later when we have time.

Content management

In the content management module, we have large functions, which are article management, classification management and picture resource management.

Article management, you can preview articles, edit articles, delete articles and other operations.

In category management, you can add, delete, and set multi-level categories.

In picture management, you can manage and upload pictures online, delete, add, replace and other operations.

Functional management

The function management here is mainly to store some functions to assist SEO optimization, such as: Robots management, Sitemap management, friendship link management, search engine push management, etc.

  • Search engine push management currently baidu search. Bing search supports API active push, so we wrote active push codes for these two search engines. Other search engines only support JS automatic push, that is, JS codes are put on the front page, and JS is triggered to push the connected content to the search engine when users visit the page. Js push code addition is also supported.
  • Sitemap management Now all search engine Sitemap support Txt format Sitemap, so Sitemap function, only Txt format Sitemap. Later, if you have more time, extend Sitemap to support XML format.
  • Robots management has some pages, we do not want to search engines included, sometimes do not want to let some search engines included, for example, some users do not want Baidu to capture, you can simply and quickly set Robots rules here.
  • Friendship link management friendship link is an indispensable step in website SEO optimization, the background dynamic increase and decrease friendship link, can be more efficient exchange chain.
  • Comments management User comments are displayed here. As some users may take comments to send advertising and other SAO operations, so the default comments need to be audited. You can preview and review comments here.

The above is the general content of the background function. After implementing the functions listed above, our blog background is fully up to standard.

In the next section, we will implement each of the functions listed above. Please read on.

The complete project sample code is hosted on GitHub. The complete project code can be viewed at github.com/fesiong/gob… You can also fork a copy to make changes on it. Welcome to Star.