Comments (6)
Interesting - page_articles should be a paginated subset of the articles for that year/tag, not the whole list. @rumpuslabs, care to comment?
from middleman-blog.
We iterate over page_articles
to allow the template to be used for both paginated and unpaginated blogs. When blog.paginate
is not set, setting page_num
in the template frontmatter will limit page_articles
to the last n
articles, equivalent to the old articles[0...10]
construct. If blog.paginate
is false and page_num
is not set in the template frontmatter, page_articles
will be equal to articles
. This is the default if blog.paginate
is not set in config.rb
.
from middleman-blog.
I was playing with the default templates, which have pageable: true at the top, but I have blog.paginate set to false in my config. I haven't set page_num anywhere.
With those settings I am seeing articles be the correct subset (for the tag or year) but page_articles be an unfiltered list of all the blog articles.
I'm using middleman-blog-3.1.0 and middleman-3.0.4.
from middleman-blog.
(Please forgive my ignorance and general bumbling, I just started looking at the code last night.)
It looks like in extension.rb, Middleman::Blog::Helpers::page_articles is defined and directly references blog.articles. I wonder if this should be referring to something like current_resource.metadata[:locals]["articles"] instead? Otherwise it ignores the filtering set in tag_pages.rb and calendar_pages.rb.
from middleman-blog.
You're absolutely right. Working on a fix now.
from middleman-blog.
middleman-blog 3.1.1 is out, and includes this fix.
from middleman-blog.
Related Issues (20)
- Add more informations in head of article HOT 2
- Extension should not fail to activate if middleman-core/cli is missing
- Paging on untagged posts HOT 1
- How to make paginate work with localize blog? HOT 2
- Cyrillic tags stopped working in 4.0.2 HOT 2
- Support i18n mount_at_root option in permalinks HOT 3
- 4.0.2 regression bug when specifying the blog in the front-matter HOT 7
- feed.xml error on multi-blog site HOT 1
- RuntimeError flag --blog HOT 1
- 4.0.2 on RubyGems.org has different dependencies to the git repo HOT 3
- Very poor and outdated blog template which does not match with default template HOT 4
- Iterating through blog.tags spits out extraneous frontmatter HOT 5
- How to get links to all calendar/tag pages HOT 5
- Calendar and tag pages without .html aren't rendered within layout automatically HOT 1
- How to configure URLs of articles with underscore HOT 6
- `middleman article` generates incorrect yaml when the title contains characters that should be escaped HOT 1
- Middleman blog frontmatter evaluating files under build directory HOT 3
- preserve i18n locale on non-localized article page HOT 2
- YAML error on Ruby 3.1.0 HOT 7
- Paginate is showing as false even if set in config.rb to true HOT 4
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 middleman-blog.