Comments (6)
Thanks for your issue. The COVID-19 really influenced a lot. I'm very honored that my theme would help you to help those people. :)
Let's back to our main topic.
First, let's introduce some terms:
recipies
is asection
of Hugo blog.categories
andingredients
aretaxonomies
of a blog.
So this feature request can be described as: to implement a taxonomy
under each section
.
(The original behaviour of taxonomy page is to show all the things, whichever the section
they belong to.)
Furst, I found a solution to do this on Hugo forum (see madipse's reply). And this solution needs some modifications to single.html
. An annoying point is: if you have some other contents before, they needs to be modified, too.
I think there is a better practice.
GitHub pages enables you to set up a site under every project repositories. (if you have a repo named recipes
, and add a branch gh-pages
. Then upload some webpages, you will get a sub-site: https://your-github-name.github.io/recipes)
You can establish a seperate site for these recipes. In this way, you need to:
- Set up a sub-site.(For details, you can see this link.)
- Rename the default "contents/posts" folder to "contents/recipes"
- Add two
taxonomies
inconfig.toml
:categories
andingredients
. - To classify these contents, you can declare in the
frontmatter
of each post, for example:
---
title: "An example recipe"
date: 2018-03-18T12:13:32+05:30
description: "This is an example recipe."
ingredients: ["tomato","potato","cheese"]
categories: "simple foods"
---
This solution may also need some small modifications to single.html
.(To replace tags
with ingredients
) It's easier to do, comparing with the first solution.
If you'd like this solution, tell me and i will open a branch to do these small modifications.
Welcome other ideas on this. I'm very glad to help.
from hugo-theme-diary.
hi, thanks for the fast reply.
it wouldnt even have to be that complex. menu is generated via [[menu.main]]
entries in config.toml. hugo has support for nesting menues, but the theme does not render it, or has css/js to style it.
just to clarify: i understand the internals of hugo and know how to use them. i am a backend/devops-dude. i just suck hard at frontend work because i never work on js/css.
all i care about is proper rendering, especially on mobile devices because i expect people to bring them into the kitchen - not the laptop ;-)
that would be more than enough
thx
from hugo-theme-diary.
hugo has support for nesting menues, but the theme does not render it, or has css/js to style it.
If you are meaning to render something like this,
[[menu.main]]
url = "/recipes/categories"
parent = "recipes"
name = "Categories"
weight = 2
...and there is only submenu not working in this theme:
I've added support for rendering submenu in the lastest commit.
Also adapted for mobile view.
Now, the menu with children items is expandable on sidebar. When click on it, the list will expand, you will see items in it.
And please reply to me if any further things needs to be added. (It's the first time for me to use this feature, not familiar to me.)
Thanks. :)
from hugo-theme-diary.
Hi bmaeser,
Could you give me some feedback on this function since this commit?
I think this function is ready to use.
If no further modifications needed, i'll close this issue. :)
Thanks.
from hugo-theme-diary.
你好,Rise!感谢你提供的 Hugo 主题,很喜欢它的简约、实用以及中英文显示都很不错,主题配置也很方便。在使用的过程中,没有找到关于站内搜索功能的。如果可以的话,期望在以后的版本中能增加这一功能。最后,再一次谢谢 Rise 分享!
关于站内搜索:#16
感谢你的支持,但是请不要在其他人的 issue 下面发表无关内容。如果有新的功能或建议,请另发 issue,并且建议在提出问题之前翻阅 wiki 和 issues。谢谢合作。
Please do not post unrelated questions under other issues. Thanks for cooperation.
from hugo-theme-diary.
i am so very sorry, i had to abandon the project for lack of time and forgot about it.
it seams to work just fine, thank you very much for this.
sorry for the late feedback.
from hugo-theme-diary.
Related Issues (20)
- 是否可以考虑使用此字体 HOT 1
- 夜间模式下看不见表格内容 HOT 2
- images not displaying HOT 2
- Dark mode refactor HOT 4
- Single quote is replaced with ’ HOT 6
- How to add RSS feed? I don't understand where to add rss link. HOT 3
- Google Analytics 4 will be replaced by Universal Analytics HOT 3
- Way to remove the darkmode toggle? HOT 1
- The About page appears on the homepage article list HOT 2
- <br> new line is not supported in this theme? HOT 1
- Summary feature required
- Can you add Artalk comment function?
- Language meta label and <h1> needed for better SEO HOT 2
- Drawers are not hidden when clicking ToC items on mobile view. HOT 1
- Fix highlighting
- 作者能麻烦您考虑一下加上视频播放功能吗 HOT 1
- URL for Tags does not seem to use baseURL
- error calling Paginator: pagination not supported for this page HOT 5
- iOS safari scrolls pages upwards / incorrect css syntax when headlines are used? HOT 2
- can't deploy site with vercel.
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 hugo-theme-diary.