-
Notifications
You must be signed in to change notification settings - Fork 27.3k
Fix wrong first_page_path because of hard-coded page:num
#3778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
If you're using GitHub Actions, you certainly have the option to use Paginate V2. I suppose you meant "using GitHub Pages", didn't you? Also, at first glance, your code might break down once Shopify/liquid#862 gets fixed. Correct me if I'm wrong. It might be a better fix to simply replace |
|
Yes I meant "GitHub Pages". Thank you for pointing that out. I searched with other keywords and finded the same issue #997. As for Shopify/liquid#862, the I have not learned Ruby so I searched on Google and found it should be an expected behavior with Ruby. The
Liquid So I believe if Shopify/liquid#862 is to be fixed, they will add an optional |
|
Anyway, changing |
* Update CHANGELOG and history * fix: change heading tag of related posts section from `h4` to `h2` for SEO enhancement (mmistakes#3064) * Update heading tag from `h4` to `h2` * Update heading tag from `h4` to `h2` * Update CHANGELOG and history * Add instructions on how to unminify main.js for easier browser debugging (mmistakes#3055) * Add instructions on how to unminify main.js for easier browser debugging * Fixed Markdown style like sggested by @iBug * Update CHANGELOG and history * Make small grammar changes * Update 01-quick-start-guide.md * Add Microformats (mmistakes#3052) * Add rel=me to author profile links * Add h-card Microformats markup * Add h-entry microformat markup * Fix missing anchor tag * Fix h-entry microformat markup on single template * Use minimal subset of Microformat elements * Move dt-published to `page__date.html` and remove dt-updated * Remove "author" and "summary" Leaves "url" as a hidden element * Add page link to h1 tag The h1 tag now contains the Schema-org `url` itemprop and the Microformats `url` class in an anchor tag. The anchor tag is styled to not look like a link. * Put author 'u-url' on author__name h3 This also puts the same `{{ author.home | default: '/' | absolute_url }}` construct on `author__avatar` to remove the Jekyll `author.home` conditional. Also addresses SCSS text color error. * Update CHANGELOG and history * Enable toc sidebar scrolling (mmistakes#2874) * Enable toc sidebar scrolling * Refactor style rules * Move style rules from 'navigation' to 'sidebar' * Remove custom scrollbar styles * Enable sticky toc on test post * Update CHANGELOG and history * Add margin around Google ads * Add role to search (mmistakes#3086) * Update CHANGELOG and history * Added Danish translations (mmistakes#3095) * Added Danish translations * Fixed wrong commit. * Update CHANGELOG and history * Enable magnific popup on <a> tags only when it has <img> (mmistakes#3114) * Update CHANGELOG and history * Remove extra semi-colon * Bump path-parse from 1.0.6 to 1.0.7 Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7. - [Release notes](https://github.com/jbgutierrez/path-parse/releases) - [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7) --- updated-dependencies: - dependency-name: path-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> * Update CHANGELOG and history * include video does not survive compress.html (mmistakes#3117) * Update CHANGELOG and history * Use GitHub issue templates (mmistakes#3133) https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository * Delete stale.yml * Delete stale.yml * Added optional label attribute (mmistakes#3128) Added label attribute as per utterances optional label setting. * Fix broken link & Add Baidu site verification (mmistakes#3139) * Fix broken link Link to Bing Webmaster Tools was broken. * Fix broken link Link to Open Graph debug tool was broken. * Add Baidu site verification (mmistakes#2830) Added `baidu_site_verification` to `_config.yml` * Making verbiage consistent w/current _config.yml (mmistakes#3180) The plugin in question comes by-default listed in _config.yml ; it's better to say that the user must _retain_ it as listed, not that the user needs to add it. * Link clarifying adding plugins (mmistakes#3181) The phrase "put them here!" doesn't sufficiently clarify what to do; I add link to the Jekyll documentation with the proper syntax. * feat: Sort comments by date ascending (mmistakes#3184) * Update Brazilian Portuguese translation (mmistakes#3204) * Update Brazilian Portuguese translation * Revert some translations to reduce friction * Update CHANGELOG and history * Update CHANGELOG and history * Fix keybase class (mmistakes#3221) * Fix keybase class * Fix fas->fab * Update CHANGELOG and history * ✏ fix typo (mmistakes#3232) * Update CHANGELOG and history * Add missing comma (mmistakes#3318) Co-authored-by: Yuchen Zhong <[email protected]> * Update CHANGELOG and history * Automatically close invalid PRs using GitHub Actions (mmistakes#3313) * Try auto-closing bad PRs * Include empty PR body as well * Add "Type: Invalid" label as well * Update CHANGELOG and history * Added sameAs (mmistakes#3087) * Update CHANGELOG and history * Use <a> color for blockquote.notice border (mmistakes#3140) Close mmistakes#3068 * Update CHANGELOG and history * Fix inline code style not applied to stylized text (mmistakes#3253) * bug: inline code style not applied to stylized text * Use double colons for pseudoelements * Update CHANGELOG and history * Update to Jquery 3.6.0 (mmistakes#3254) * Update CHANGELOG and history * fix typo about loading javascript in footer (mmistakes#3350) * Update CHANGELOG and history * add optinal lunr searching of pages (mmistakes#3352) * Update CHANGELOG and history * Exclude `main.scss` from Lunr search index * Add Kiswahili translation (mmistakes#3489) * Add Kiswahili translation * Add Kiswahli to README * Add Kiswahili to documentation * Update * Update attribution link (mmistakes#3553) * Update CHANGELOG and history * Update link to Font Awesome gallery (mmistakes#3599) * Update CHANGELOG and history * Make it possible to enable breadcrumbs per page (mmistakes#3096) * Make it possible to disable breadcrumbs per page * Update single.html * Update single.html * Update algolia-search-scripts.html (mmistakes#3102) Fix issue mmistakes#3101 * Update CHANGELOG and history * Replace with public YouTube video Close mmistakes#3649 * Replace with public YouTube video embeds * Update CHANGELOG and history * Fix mmistakes#3096 enabling breadcrumb on all pages (mmistakes#3668) * Remove IE9 upgrade notice (mmistakes#3666) * Update CHANGELOG and history * Fix mmistakes#3668 breaking "disable per-page when globally enabled" (mmistakes#3669) * Fix mmistakes#3668 breaking "disable per-page when globally enabled" * `default:` filter doesn't fit here https://shopify.github.io/liquid/filters/default/ * Update CHANGELOG and history * Improve PR close auto-comment message (mmistakes#3713) * Improve auto-comment message * Lock these PRs after closing * Delete .github/FUNDING.yml * Update README.md * load latest fontawesome package (mmistakes#3765) Co-authored-by: Marco Omainska <[email protected]> * Update CHANGELOG and history * Fixed a grammar mistake. (mmistakes#3890) * Update the Polish translation (mmistakes#3969) * Update CHANGELOG and history * Remove redundant downcase from _layouts/categories.html (mmistakes#4531) * Improve Finnish translations (mmistakes#4595) Co-authored-by: Niklas Engblom <[email protected]> * Remove JS and other files from search index (mmistakes#4000) To avoid getting JS and irrelevant files indexed remove pages where title is null. This gives a much cleaner Lunr store with more relevant content. * Lazy-load InstantSearch scripts and stylesheets (mmistakes#3691) * Lazy-load InstantSearch scripts and stylesheets * Replace outdated script parts * Fix wrong `first_page_path` because of hard-coded `page:num` (mmistakes#3778) * Fix Linkedin social share link (mmistakes#4754) Removed url encoding of the article link * Add site.copyright and site.copyright_url config options (mmistakes#4313) * Allow to optionally define website copyright holder name and url using site.copyright and site.copyright_url * Update _config.yml --------- Co-authored-by: iBug <[email protected]> * Fix non-English characters being url encoded in breadcrumb (mmistakes#3819) * Fix non-English characters being url encoded in breadcrumb * Remove `| replace: '%20', ' ‘` * Update CHANGELOG and history Call it a day for now * Sync CHANGELOG with history * Add Rakefile for automatically syncing CHANGELOG with history * Consolidate hard-coded version numbers where possible Now only 4 files left untouchable. Search README.md for "Dev note" for details. * Fix bad Liquid include syntax * Remove remainders of browser-upgrade.html * Release 4.25.0 💎 * Bump shell-quote from 1.7.1 to 1.7.3 (mmistakes#3692) * Update CHANGELOG and history * Add Ukrainian translation (mmistakes#4273) Co-authored-by: Andrii Burkatskyi <[email protected]> * Update CHANGELOG * Bump node.js dependencies * Remove h1 from 18-history.md * Add _includes/after-content.html and remove docs site default layout override * Add _includes/before-related.html and remove docs site single layout override * Add a missing include to before-related.html * Exclude hidden posts from page__related, fix mmistakes#4653 * GitHub Workflows security hardening (mmistakes#3884) Signed-off-by: sashashura <[email protected]> * Update CHANGELOG and history * Add more configuration for Giscus (mmistakes#4274) * update giscus * fix site variable name --------- Co-authored-by: Andrii Burkatskyi <[email protected]> * Update CHANGELOG and history * Bump jekyll-toc to v1.2.1 * Replace fontawesome.com/v5/search with v6 * Try an FAQ page * Replace dead link in _includes/head.html, close mmistakes#4421 * Update quick-start guide to use 4.25.0, fix mmistakes#4809 * Fix where_exp for Jekyll < 4.0 'and' and 'or' are new in Jekyll 4.0. Ref: https://stackoverflow.com/posts/comments/111965719 * Release 4.25.1 💎 * Rewrite skin previews on `05-configuration.md` in Liquid template * Add documentation for the incoming Jekyll Paginate V2 support * Add proper support for sverrirs' Jekyll Paginate V2 plugin (excl. AutoPages) (mmistakes#2636) * Add .notice--danger for unsupported settings in j-p-v2 * Remove unused classes from `_layouts/single.html` * Auto scroll sticky ToC with content (mmistakes#3115) * Update CHANGELOG and history * Try sticky ToC on all docs pages * Fix logic error in toc-scroll * 04-upgrading.md: Minor formatting and grammar fixes * page__hero.html: Fix an unclosed `<p>` tag * Replace "hidden" check in Liquid with `where_exp` * Migrate `npm run` scripts to `Rakefile` tasks Rakefile is like Makefile - it has dependency management, while npm run scripts do not. Aside from that, this also allows us to drop literally all Node.js packages, as uglify-js is self-contained and has no dependencies. Reduced node_modules from 17M to 374K. * Merge banner.js into Rake task Also let uglify-js produce source map for easier debugging * Gemfile: No newline at end of file * Remove deprecated "page.header.cta_url" setting (mmistakes#4821) * Update CHANGELOG and history * Add Rake task `:version` For updating all hard-coded version numbers from `package.json` * Update CHANGELOG and history * Update README * Merge `categories` and `tags` layout into `_includes/posts-taxonomy.html` * Rakefile: Add jQuery to uglify targets Regression of 0b8b523 * bundle exec rake js * Multiple Sidebar Nav Lists (mmistakes#2843) Co-authored-by: Tom Manner <[email protected]> Co-authored-by: iBug <[email protected]> * Update CHANGELOG and history * Update Social Sharing links section (mmistakes#4066) * Update 10-layouts.md Update social sharing section for appropriate Reddit example and resource locations. * Update as reviewed --------- Co-authored-by: iBug <[email protected]> * Update CHANGELOG and history * Revert f3c617f on _includes/figure to make way for mmistakes#3119 * Add popup parameter for figure include (mmistakes#3119) * Update CHANGELOG and history * Add target attribute for navigation link (mmistakes#3056) * Update CHANGELOG and history * Remove overlay and revert X to hamburger icon when popup disappears (mmistakes#3958) the `.hidden-links` popup disappears after you move the cursor out of it. However, the white overlay on the screen does not disappear, as well as the `x` nav button on the top-right, remains as is. Now when you click anywhere on the screen the popup appears again, and the `x` nav button turns back to a hamburger menu button. And when you click on the hamburger menu, the popup disappears. now it's happening the exact opposite. To remedy this, the pop up menu as well as the `x` nav button should also return back to normal once the popup disappears. This commit fixes this issue. * Split schema to a separate include file (mmistakes#3085) * Make changes to schema easier * Only show on one page not on all pages * Move schema.html to _includes/ and move the URL guard out --------- Co-authored-by: iBug <[email protected]> * Update CHANGELOG and `bundle exec rake` * Fix SEO title when it contains a vertical bar (mmistakes#3113) * Do not markdownify title * Support markup in titles * Support markup in titles * Fix seo.html as reviewed * seo_title is now unconditionally computed --------- Co-authored-by: iBug <[email protected]> * Cleanup seo.html and update CHANGELOG * Remove "sticky sidebar" JS in favor of CSS media queries * Add "copy to clipboard" button for code blocks (mmistakes#2812) * Add copy-to-clipboard button and JS * Ignore line numbers if present * Rewrite heading permalink code to use vanilla JS * README: Add credits to zenorocha/clipboard.js (MIT License) @iBug really wants a place here in the Credits section :P * Add .no-copy for hiding the button, update docs * Add td.rouge-code to selectors * Fix navigator.clipboard branch * Add screenreader text for copy button * Restore focus to the button after copying * Add site-wide enable switch * Update CHANGELOG and `bundle exec rake` * Add "new in v4.26.0" in documentation * Release 4.26.0 💎 * Add success indicator for code block copy button * Try fixing copy button flying out * Disable copy button for bad pre blocks * Fix typo: dribbble → dribble seems like nobody uses it anyways * Oops, fixed the typo the wrong way * Rewrite social icons SCSS with a loop * Limit "auto scroll ToC" to Chromium-based * Actually 3 B's in "dribbble" * Release 4.26.1 💎 * Update CHANGELOG and history * _includes/figure: Replace remove:<p> with strip_html, fix mmistakes#4841 * assets/css/main.scss: Add trailing newline * changelog: Clarify mmistakes#4841 only triggers with popup=true * feat: add Czech localization (mmistakes#4866) * Update CHANGELOG and history * Allow overriding HTML lang on a per-page basis (mmistakes#4862) The W3C [recommends](https://www.w3.org/International/questions/qa-html-language-declarations) to specify language using identifiers as per [RFC 5646](https://tools.ietf.org/html/rfc5646) which uses dashes. * Update CHANGELOG and history * Release 4.26.2 💎 * Update CHANGELOG and history * Change the link it is redirecting to - Fix ahref issue (mmistakes#4882) ahref is warning about this since the link redirects to the new path * Add missing Polish translation (mmistakes#4890) * Add RTL Support (mmistakes#4886) Signed-off-by: Hamed Faramarzi <[email protected]> Co-authored-by: Hamed Faramarzi <[email protected]> Co-authored-by: iBug <[email protected]> * Update CHANGELOG and history * Replace '[dir=rtl] &' with CSS logical properties where it makes sense * Fix two misdirections * Update all CSS to use logical properties - Vendor CSS's are excluded for now - Removed <IE7 asterisk prefix items * Fix the remaining issues with CSS logical properties * Fix wrong direction for feature_row with type=right, fix mmistakes#4061 * Update CHANGELOG and history * Accidentally committed a test file * Update Algolia index with GH Actions * _config.yml: Drop explicit default `false`s * Update bug_report issue template * Remove unnecessary "type" attribute (mmistakes#4956) * The "if" means the default is never used (mmistakes#4955) * Fix: Prevent double title issue in SEO metadata by updating seo.html (mmistakes#4959) * Update CHANGELOG * Use `include documents-collection.html` in `home` layout * Use $doc-font-size in _reset.scss, fix mmistakes#4983 * Additionally label "spam" for spam PRs * Fix JavaScript null error on home and splash layouts (mmistakes#4939) * Update CHANGELOG * fix(_includes/figure): Apply escape_once on include.alt * Add Bulgarian localization (mmistakes#5003) * fix(_includes/post_pagination.html): Remove trailing newline * Hide hidden links & remove the overlay when one is clicked (mmistakes#5042) * Update CHANGELOG and regenerate JS * feat(single.html): Add provider and comments info for non-production (mmistakes#5068) * Update CHANGELOG and history * Fix typo in docs/_docs/05-configuration.md (mmistakes#5106) * Mastodon button color (mmistakes#5109) * Tweak contrast skin $primary-color to adhere to WCAG guidelines (mmistakes#5126) * Update CHANGELOG and history * _config.yml: Add minimal-mistakes-jekyll.gemspec to exclude, fix mmistakes#5193 * Update Social Share Buttons to Reflect Twitter Rebranding to X (mmistakes#5210) * Update CHANGELOG and history * Add a "Share on Bluesky" button (mmistakes#5179) * Release 4.27.0 💎 * Update CHANGELOG and history * Modern font stack (mmistakes#5033) * Update CHANGELOG and history * Fix X share button icon and color, close mmistakes#5221 * Release 4.27.1 💎 * Attempt to fix X button color again * Update X share button to match brand color (mmistakes#5245) * Update CHANGELOG and history * Additional HTML escaping for titles and metadata (mmistakes#5276) * Hide page__footer-follow if there are no links nor atom feed. (mmistakes#5279) Co-authored-by: iBug <[email protected]> * Optional `footer.since` for copyright time range (mmistakes#5275) Co-authored-by: iBug <[email protected]> * Update history from CHANGELOG * Add `escape_once` to gallery title and alt text * Release 4.27.2 💎 * Add CSS for .sr-only So we're not relying on Font Awesome 6- * Release 4.27.3 💎 * Updated Traditional Chinese translation (mmistakes#5250) * Update CHANGELOG and history * Delete Travis CI config * Add built-in support for jekyll-gfm-admonitions (mmistakes#5312) * Update CHANGELOG and history * Replace private YouTube video As per mmistakes#3649 (comment) * cleanup * remove images * fix typo * use remote theme * fix missing file --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: sashashura <[email protected]> Signed-off-by: Hamed Faramarzi <[email protected]> Co-authored-by: Michael Rose <[email protected]> Co-authored-by: Kulbhushan Chand <[email protected]> Co-authored-by: Erik Westrup <[email protected]> Co-authored-by: Michael Rose <[email protected]> Co-authored-by: Peter Murray <[email protected]> Co-authored-by: Johnson <[email protected]> Co-authored-by: Lars Olesen <[email protected]> Co-authored-by: iBug <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: John Scott <[email protected]> Co-authored-by: Nathan Cho <[email protected]> Co-authored-by: Jason Hemann <[email protected]> Co-authored-by: Daniel Schroeder <[email protected]> Co-authored-by: Georger Araújo <[email protected]> Co-authored-by: Andrew McIntosh <[email protected]> Co-authored-by: Sander Holvoet <[email protected]> Co-authored-by: Yuchen <[email protected]> Co-authored-by: Yuchen Zhong <[email protected]> Co-authored-by: Nicholas Perry <[email protected]> Co-authored-by: Benson Muite <[email protected]> Co-authored-by: FavorMylikes <[email protected]> Co-authored-by: Marco Omainska <[email protected]> Co-authored-by: Marco Omainska <[email protected]> Co-authored-by: Tirthankar Mazumder <[email protected]> Co-authored-by: Leszek 'skolima' Ciesielski <[email protected]> Co-authored-by: eabneka <[email protected]> Co-authored-by: Niklas Engblom <[email protected]> Co-authored-by: Niklas Engblom <[email protected]> Co-authored-by: LasseAhhMann <[email protected]> Co-authored-by: yusanshi <[email protected]> Co-authored-by: Moose <[email protected]> Co-authored-by: Mauricio Tavares <[email protected]> Co-authored-by: Huangbo <[email protected]> Co-authored-by: Andrii B <[email protected]> Co-authored-by: Andrii Burkatskyi <[email protected]> Co-authored-by: Alex <[email protected]> Co-authored-by: Tom Manner <[email protected]> Co-authored-by: Tom Manner <[email protected]> Co-authored-by: Jeremiah Strong <[email protected]> Co-authored-by: Dmitriy Derepko <[email protected]> Co-authored-by: Dominique Deluvio <[email protected]> Co-authored-by: Michal Stanke <[email protected]> Co-authored-by: Steffen Uhlig <[email protected]> Co-authored-by: Deepak Mahakale <[email protected]> Co-authored-by: wssbck <[email protected]> Co-authored-by: Yash <[email protected]> Co-authored-by: Hamed Faramarzi <[email protected]> Co-authored-by: Dave Cross <[email protected]> Co-authored-by: Adel Aloui <[email protected]> Co-authored-by: Archer <[email protected]> Co-authored-by: Salif Mehmed <[email protected]> Co-authored-by: Jason Williscroft <[email protected]> Co-authored-by: Hyuk Min <[email protected]> Co-authored-by: Pablo Alonso <[email protected]> Co-authored-by: Jan De Luyck <[email protected]> Co-authored-by: Lukas Vermeer <[email protected]> Co-authored-by: vyshnaviJammi <[email protected]> Co-authored-by: Paul Gross <[email protected]> Co-authored-by: Yosuke Kawaguchi <[email protected]> Co-authored-by: Pander <[email protected]> Co-authored-by: Keyang556 <[email protected]> Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <[email protected]>
This is a bug fix.
Summary
In code
assign first_page_path = ... | replace: 'page:num', '' | ...,page:numis hard-coded. So ifsite.paginate_pathdoesn't ends withpage:num/orpage:num,first_page_pathwill get a wrong value.The PR tries parsing the last part from
site.paginate_path, instead of using a hard-codedpage:num.Context
The same issue with: #2431 (comment)
The author of #2413 addressed the issue with Paginate V2. But I'm using GitHub Actions and only V1 is supported so I have to make the fix.
BTW, I'm new to Liquid and
"/blog/:num/" | split: "/"returns["", "blog", ":num"], instead of["", "blog", ":num", ""]as I expected. Weird... Shopify/liquid#862