Comments (3)
So do you want to list nodes or resources?
You can:
{% for n in node.resources|sort(attribute='meta.order') %}
your code here...
{% endfor %}
or if more complex sorting needed you can:
{% set list = [] %}
{% for n in node.resources %}
insert some loop or condition to determine at which index of list to insert current n and:
{% do list.insert(i, n) %}
{% endfor %}
Here you can use your sorted and filtered list.
replace .resources with .child_nodes in order to list nodes
from hyde.
Also: If you want to list nodes(folders) - you can use walk
method or child_nodes
attribute.
Recursive:
{% for node in site.content.walk %}
...
{% endfor %}
(or) One Level:
{% for node in site.content.child_nodes %}
...
{% endfor %}
If both our answers are missing the point, perhaps you can give an example of what you are trying to accomplish?
Also, the user group is a better avenue for such questions than the issue list:
https://groups.google.com/forum/#!forum/hyde-dev
from hyde.
Thanks folks! node.resources|sort(attribute='meta.order')
is what I was looking for :)
from hyde.
Related Issues (20)
- RFC: Enable branch protection on master HOT 3
- Tests involving Pygments are fragile
- Hyde themes/templates HOT 7
- Python Markdown attr_list syntax ignored by hyde
- 400 bad message error HOT 1
- Missing context-variables documentation
- Publisher documentation is 404 HOT 1
- Is this project no longer maintained? HOT 7
- HydeException, traceback error on python 3.8 (mac and windows) HOT 3
- Replace Nose tests
- Convert setup.py to modern standards
- Convert Tox integration to nox
- Convert Travis CI to Github Actions
- Add documentation about developing version 1.0.0
- Look into Deepsource for coverage/CVE scans
- should python-dateutil be listed as a dependency?
- I installed hyde, but the commands don't work. HOT 2
- "Error occured when calling imagethumbnails" message HOT 1
- SyntaxError when trying to create website HOT 2
- XMPP: Post to PubSub
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 hyde.