Open YoobinLee opened 11 months ago
Here I make an example of "links". You can see the final result in YoobinPage.
open /layout/index.ejs, insert:
<% if (site.data.links) { %> <section id="links"> <span class="h1"><a href="<%- url_for(theme.links_url) %>"><%= __('index.links') %></a></span> <ul class="link-list"> <% for(var obj in site.data.links){ %> <li class="link-item"> <a href="<%= site.data.links[obj].url %>"><%= site.data.links[obj].name %></a>: <%- markdown(site.data.links[obj].desc) %> </li> <% } %> </ul> </section> <% } %>
open /source/css/_partial/index.styl, insert:
.link-list padding: 0 list-style: none .link-item margin-bottom: 5px p display: inline
links: Friend Links
Return to the root, build new source/_dada/links.json, insert:
[ { "name":"", "url":"", "desc":"" } ]
If you want to add hyperlink to the title in the index page:
cd to root file, input command in the terminal: hexo new page links
hexo new page links
open /cactus/_config.yml, insert: links_url = /links/
links_url = /links/
Correct me if I'm wrong, but looking into your github-pages source code, this should be an implementation for hexo-theme-cactus, not hugo-theme-cactus. Either way, cool addition!
Here I make an example of "links". You can see the final result in YoobinPage.
open /layout/index.ejs, insert:
open /source/css/_partial/index.styl, insert:
links: Friend Links
Return to the root, build new source/_dada/links.json, insert:
If you want to add hyperlink to the title in the index page:
cd to root file, input command in the terminal:
hexo new page links
open /cactus/_config.yml, insert:
links_url = /links/