Layout template
Value | Meaning |
---|---|
page | Independent page |
post | Article page |
docs | Documentation page |
category | Category page |
tag | Tag page |
friends | Friends link page |
list | List page |
page & post & docs
These three types of pages are the same, but have the following subtle differences:
- When the post article has a title, scroll down the web page, the navigation bar will move up and out of the screen to display the article title, but page and docs will not.
- post At the end of the article, up to four modules can be displayed: "Reference", "Related Article", "Copyright Mark", and "Reward".
- At most one module of "reference" can be displayed at the end of the docs article.
Except that the archive page is automatically generated, other independent pages need to be created manually.
Archive page
The archive page is automatically generated and has been generated during initialization. The path is as follows:
# Directory |
About page
|
Category page
|
Tag page
|
List page
|
The result is to filter out all articles that contain group: mylist
in the front-matter
section.
Friends link page
Create page file
|
Choose a layout
Find the following in the theme configuration file:
pages: |
Three layout schemes are currently provided:
- simple: Simple layout, only avatar and title.
- traditional: Traditional layout, the style of the old version of Volantis.
- sites: site card layout, which is the new style of website card tags added in Volantis 4.x.
Set data source
The data source of Friends Chain is written in the following path, if not, please create it yourself:
blog/source/_data/friends.yml |
The content format is:
-group: # Group title |
Different layout methods will use some fields. Generally speaking, title
, ʻavatar and ʻurl
are all required. These data are converted into HTML tags and inserted into the <!-- more -->
part of the friend link page.
Use the issues tag to get JSON data from issues to parse and generate HTML to fill in the page. The usage is as follows:
{% issues sites | api=https://api.github.com/repos/xaoxuu/friends/issues?sort=updated&state=open&page=1&per_page=100&labels=active %} |
In this way, the way to add a friend chain becomes: the other party raises an Issue, reviews it by yourself, then adds the ʻactive` tag, and then refreshes the webpage to take effect. It is also very convenient to update the content of the friend chain. The creator of the issue has the right to modify and close it.
Create a new GitHub or Gitee repository and create the Issues template as follows:
{ |
For details on how to use the issues tag, see this article:
suggest
- Both can be used at the same time. It is recommended to open the issues friend chain to everyone, and save it to the static friend chain if you contact yourself frequently.
- The actual speed and stability of the GitHub API is not as good as Gitee. If you pursue stability, it is recommended to use Gitee.
404 page
|