Comments (9)
I am not sure that "vary-on" is the best name for this thing. Any other ideas?
from wok.
This would in effect provide pseudo filtering correct?
from wok.
I think another way to phrase it would be 'filter-by'.
from wok.
It would only be single tag filtering? I don' think that is such a bad idea, the difficult thing is if you want to provide and combination of tags to filter by, I think the permutations for that could get rather large. Even though the code might be pretty fun to write.
Would an example URL structure look like this:
/blog/category/sports
or /blog/category/sports+computers
?
from wok.
The result would look something like filtering, yes, but from the stand point of the file being edited, it is more like a map() than a filter(). I think 'filter-by' makes me think of somehow filtering a list, instead of working my way through it.
from wok.
Some clarification on this. Lets say I want to filter by tags (which is probably the most obvious thing this system could do). I would make this content item
title: Filter by Tag
vary-on: site.tags
type: varytags
url: /filter/tags/{vary-item}.html
---
And the template varytags.html
{% extend base.html %}
<h1>All pages with tag {{ vary-item }}</h1>
<ul>
{% for subpage in site.tags[vary-item] %}
<li><a href="{{ subpage.url }}">{{ subpage.title }}</a></li>
{% endfor %}
</li>
This would generate one file per tag. So if you have tags linux
, wok
, hamper
, then the pages /filter/tags/linux.html
, /filter/tags/wok.html
, /filter/tags/hamper.html
would be generated, and each one would have a list of all pages with that tag.
from wok.
Moving this to milestone 1.0
from wok.
See 461f553 for an initial implementation.
from wok.
Closing because it was implemented over 2 years ago. If it's broken, someone will file a new issue :)
from wok.
Related Issues (20)
- why cannot publish chinese post? HOT 3
- Create Hierarchical Navigation Structure HOT 2
- Not rendering files with .md extension HOT 6
- Travis is broken. HOT 2
- wok_hooks HOT 2
- Question about installation dependencies (setup.py)
- Bug: Missing heading when using rst sources with lonely 1st level heading HOT 2
- Feature: Option to set the initial header level for reStructuredText
- Missing urls in site.pages
- Numbered lists break codeblocks. HOT 1
- Feature request - ignore pattern config item
- Audit dependencies HOT 1
- pep8 compliance HOT 3
- Wok doesn't exit 1 when there are errors.
- reStructuredText rendering errors don't show filename, just "string" HOT 6
- reStructuredText rendering errors have incorrect line numbers HOT 1
- I can't integrate tagging with pagination HOT 1
- Error when using tilde in author field
- Custom jinja2 filters?
- how to fix the error: "jinja2.exceptions.TemplateAssertionError: no filter named 'rejectattr' "??
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 wok.