Comments (28)
Sorry, I cannot quite understand what's your meaning. Could you give some detail examples?
from hexo-theme-next.
Don't underatand u: how to disable sidebar from data?
from hexo-theme-next.
@ivan-nginx Disable sidebar for a single folder or page, such as source/data/
, source/games/
.
In this case http://blog.eson.org/games/2048/ . I want to disable sidebar for all pages under source/games/
.
from hexo-theme-next.
how about hexo clean
before hexo d
.
or use comments: false
in your added menu page?
i have no bug in my added menu page.
from hexo-theme-next.
@sli1989 comments: false
only disable the comments, not the sidebar
from hexo-theme-next.
@xu-song sorry for the misleading. you can see the above PR.
not suggest to use heading in your custom page for now.
after the PR, you can update the latest theme and add sidebar: false
in front matter of your post and cumtom page.
from hexo-theme-next.
sorry, what PR stands for? @sli1989
The following is my heading config in source\games\2048\index.html
. But it doesn't work. The rendered page is http://blog.eson.org/games/2048/
---
sidebar: false
---
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>2048</title>
@sli1989 My Hexo and NexT are Latest Master branch.
from hexo-theme-next.
Pull Request, you can try to know it using google search.
such as http://www.ruanyifeng.com/blog/2017/07/pull_request.html
from hexo-theme-next.
@xu-song It has not been merged into the latest branch yet, please take a wait.
from hexo-theme-next.
Add a feature in PR #93 , please have a try. @xu-song
from hexo-theme-next.
@tsanie Thanks for your prompt reply. Your commit truly works for markdown file. But it does not work for html. Can u take another commit if possible.
source/games/2048/index.html
---
sidebar: false
---
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>2048</title>
from hexo-theme-next.
Wait, which html, do you mean that you've written the html file in the hexo/source
folder? It is not the right way to build a page, and that would lead the hexo to generate a strange html page.
Please use the .md
files, and of course you can insert some html tags into the .md
file, then you can generate the whatever page you want.
And you can surround the html tags by using {% raw %}...{% endraw %}
, if you worried about some words maybe processed by the markdown render.
from hexo-theme-next.
Is there a special render for html? Or .html
and .md
share the same render engine?
It works now. Just the same config as .md
. Thanks for your help.
title
date
sidebar
comments
all work for html as heading config.
from hexo-theme-next.
If there is no more problem, please close this issue.
from hexo-theme-next.
Is there a god way to customize subfolder configuration? like .gitignore
does, Can we set multiple .yml
in different (sub)directories? @ivan-nginx @tsanie
----update
for example. can we define multiple theme_config like the following schema?
blog/─┬─_config.yml # hexo config
├─theme───next
│ ├──_config.yml # theme config -- main
│
├─source/
├── _post/
├── folderA
│ ├── _config.yml # theme config -- overwrite main_config
│ ├── a.md
│ ├── folderB
│ └── b.md
│
├── folderB
│ ├── _config.yml # theme config -- overwrite main_config
We can put the following config in source/folderA/_config.yml
, which works for all the subdirectory.
sidebar: false
comments: false
Maybe it is a bit complicated.
Or it should be a feature of Hexo instead of Theme? Maybe not. I don't know
from hexo-theme-next.
@xu-song Yeah, it is a bit complicated, and it should be a feature of Hexo. Maybe you can ask Hexo for the question.
from hexo-theme-next.
@xu-song can u explain why u need this? In short words.
For example: i want this feature because i need to...
from hexo-theme-next.
customization
@ivan-nginx
from hexo-theme-next.
Customize what?
from hexo-theme-next.
just like you cusomize
a single file with heading config. This feature can cusomize
a batch of files by less config.
If you ask me why need customization
. I don't know how to reply. Theme is born for customization
. @ivan-nginx And this feature is doable in Theme level. Not belong to Hexo.
The above schema is just one choice of batch_configuration, surely not the best. But batch_config is better than config one by one.
from hexo-theme-next.
I asking u because i think there are all already can be customized. I just don't understand what exactly u need to customize.
For example, i want 2 different sites with 2 different Hexo & NexT configs to work under 1 Hexo node_modules
, i create:
- In main Hexo dir file called
site1.yml
and add here all configs from Hexo & NexT in accoriance with Hexo data files guide. - I do the same, but only difference in config filename, called now
site2.yml
— this will absolute another site with anothersource
andpublic
directories. - I use
hexo clean --config site1.yml && hexo g --config site1.yml
— to generate site 1. - I use
hexo clean --config site2.yml && hexo g --config site2.yml
— to generate site 2.
from hexo-theme-next.
I think I have express my need clearly. If not , you can read again. And I don't like your style @ivan-nginx
We never talk about two sites.
If user's desired pattern conflicts with your roadmap, u can argue.
If you have another way to make user get what he expected, the lost user will be appreciated if u can help him.
Reply with a single word "why" or "what" makes me confusing about your point.
from hexo-theme-next.
We can put the following config in source/folderA/_config.yml
, which works for all the subdirectory.
sidebar: false
comments: false
No, we not put the following into theme config because it must be write in post's front-matter which must generate Hexo.
Maybe it is a bit complicated.
Maybe. Or maybe not.
Let's suppose we have ~500 posts. And u want to create ~100 configs in many subdirectories for that? Really? This is big waste of resources i think.
It's can be maked if strongly needed, but for now i don't see in what cases it can be implemented. If u want to customize each post — front-matter for this already exists.
U firstly ask for hide sidebar feature (and i still in shocked why it can be need) and this feature was added.
For now u want feature what will bring bigger problem for maintenance and less for useful. This is a little bit boldly.
If u lazy for add vars in front-matter and want to use some automatization with batch files, u can add same strings in front-matter also (at least -1 addition created _config.yml will be).
Issue will be closed due already implemented feature in the head.
from hexo-theme-next.
You prefer 500 posts with 500 heading. Okay
comments: false
or
sidebar: false
or
category:
- web
....
from hexo-theme-next.
And u prefer 500 posts with 500 configs?)
from hexo-theme-next.
In many cases, 1-5 batch_configuration works.
Batch is better than one by one, Undoubtedly.
from hexo-theme-next.
In most case, we 1-5 batch_configuration works.
Wow! I see now. Let explain situation:
- U want to set in main NexT config
sidebar: false
, for example. - Not to put in each front-matter post this var, but
- Want to use something like template by inherit to set
sidebar: true
again?
I don't see any logic. Go as another corner:
U want to see sidebar or not want? U need sidebar? If u need, turn it on and all be done.
If no need, turn it off.
And u just now talking something about: i want sidebar, but don't need it on 25% in my site pages, right? So, u can disable sidebar for pages and use pages as this 25% of your posts. And else exists some plugins to customize (add) other types insted of post
and page
, if u did't know about that.
I think I have express my need clearly. If not , you can read again. And I don't like your style @ivan-nginx
We never talk about two sites.
Yeah, i write this comment while u just added your 1 explain, something like «Is there a god way to customize subfolder configuration?». You know, God customization can do only by God, because he's God, i think. We are not Gods here and can't to do special for u all of u need and wish, for free.
Again: this feature in this key hard to implement right now. But i see what u mean and in generally this good (not god) idea and will be backloged in our simple peoples heads. 😄
from hexo-theme-next.
thanks
from hexo-theme-next.
Related Issues (20)
- 无法设置自动折叠帖子 HOT 5
- click tags btn but get 404 page HOT 1
- Archive page cannot be rendered and displayed normally. HOT 1
- NexT note with customize link color HOT 1
- 如何添加博客分享功能? HOT 2
- <tr> tag with class="header" displayed incorrectly HOT 1
- 如何更换自定义字体 HOT 1
- ~/source/_data/footer.swig can't work as well HOT 1
- 能不能在主题中增加一个按标签进行分类,在搜索框前面增加选择标签的下拉框,进而实现分类搜索的功能?? HOT 1
- 移动端国内访问博客只显示框架,不显示文字 HOT 2
- 使用utteranc作为评论系统, 点击github注册按钮后, 总是返回到http://example.com/... 然后页面找不到 HOT 2
- 自定义:添加代码块折叠
- 空格宽度不一样 HOT 2
- 能否支持配置备案跳转地址 HOT 1
- Gitter集成问题 HOT 1
- insert a inline image in text, but the image and text are not aligned horizontally HOT 1
- next 主题如何设置首页为Archives HOT 1
- 有中文说明的config.yml吗? HOT 1
- 将官网链接替换为 theme-next.js.org HOT 2
- 關於中文段首空格與豎排的支持諮詢。 HOT 1
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 hexo-theme-next.