Comments (5)
Ok, looks like the alternative value in the list_
helpers for "style" is false
.
from site.
Hey @derikb 👋
One option for advanced users and theme makers is to use those variables directly.
These will be the variables available by default:
https://hexo.io/docs/front-matter#Settings-amp-Their-Default-Values
https://hexo.io/docs/variables#Page-Variables
In the front matter at the top you can create your own too:
title: one two three
tags:
- four
- five
- six
customThing: seven
In the template it should be available as page.tags
or post.tags
, depending on the context. If you want to get at customThing
it would be like page.customThing
or post.customThing
.
Default use:
https://github.com/hexojs/hexo-theme-landscape/blob/master/layout/_partial/post/tag.ejs#L2
site.tags
also:
https://github.com/theme-next/hexo-theme-next/blob/999f0f786f06f63493d117e413c8e7724bc66d80/layout/_partials/sidebar/site-overview.swig#L59
So, if you know how to edit the templates you can access and loop through each of these things.
The database it's using is called warehouse. It has a lot of nifty queries it can do. If you start using that in your theme and want some help just ping us back!
Was any of that of help?
from site.
Not really... @tcrowe but thanks for responding...
Does looping through post.tags
just get me an array of strings? Was kind of hoping it gave me some other data (like the archive url for that tag, etc.)? (I wanted to further customize what list_tags()
gives me by directly accessing the tag data, but I'm not clear what is in that data.
And post.next
and post.prev
... are they objects that have all the same vars I would have if I were in the template/layout for the individual post? If so, that would be a good thing to have in the docs to clarify that.
from site.
If you jump into your templates in ./theme/your-theme/...
you can start outputting the data and you can see what's in it. It just takes a little time and effort.
from site.
@derikb I have made various PR on list_tags
in 2020, look now there are plenty new options and the doc was updated.
from site.
Related Issues (20)
- 文档中所说部署到 coding.net 上的分支为什么是 coding-pages ?? HOT 2
- hexo g生成访问public文件夹下的index.html是原文件信息 HOT 4
- Site
- 'simple-black' theme preview redirects to malicious website HOT 1
- 主题的搜索框似乎不支持中文搜索 HOT 2
- Dark Mode
- Git Section in one-command-deployment.html is incorrect HOT 1
- What is the license, please? HOT 2
- npm install failed HOT 3
- 请问怎么在hexo里用视频作为背景壁纸? HOT 1
- A slight error regarding the helpers.md document
- <!DOCTYPE html>
- WarehouseError: ID `themes` has been used HOT 1
- Does the theme page no longer have maintenance? HOT 2
- Teste site
- Fix `v7.0.0` migration guide HOT 2
- Use crowdin to translate documents HOT 14
- site
- Proposal: Japanese Translation of the Documentation HOT 1
- Hacking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from site.