You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 25, 2020. It is now read-only.
Bookmarklet to swap between GitHub Pages and local pretzel instance #290
I love pretzel, it's a great way to use static blogs on windows - THANK YOU for creating it!
I'm not sure if this is helpful to others, if it is, I'm not sure where to stick it, so creating an issue to have the discussion.
For reasons I don't yet understand, navigation works better in my GitHub pages (GHP) blog, then in my pretzel blog. Thus I navigate on GitHub Pages and then swap the URL to my local instance. I do this using the below code converted to a bookmarklet. Lastest code as gist :
functionswapLocalRemoteBlog(){/* * Pretzel renders, but doesn't navigate the same as github pages (GHP). * Thus use GHP to navigate, then use this bookmarklet to swap with local pretzel blog. */varcurrentUrl=document.URL;varerrorMessage="Only works on Igor's Blog";vargithubBlogURL="http://idvorkin.github.io";varlocalPretzelBlogUrl="http://localhost:8080";varnewUrl="";if(currentUrl.startsWith(githubBlogURL)){newUrl=currentUrl.replace(githubBlogURL,localPretzelBlogUrl);/*pretzel can't have a trailing slash - Issue 289, so remove it*/newUrl=newUrl.substr(0,newUrl.length-1)}elseif(currentUrl.startsWith(localPretzelBlogUrl)){newUrl=currentUrl.replace(localPretzelBlogUrl,githubBlogURL);}else{alert(errorMessage);return;}window.location=newUrl;};swapLocalRemoteBlog();void(0);
Several things aren't working locally on my site. Some of those things are certainly my fault, :) Others I'm logging bugs for as I debug them (e.g #289).
If you clone and run my site locally, you'll see no posts showing up on the main page, even though it works fine on GitHub pages. I assumed the problem was pagination, but it's quite possibly another issue.
I'll update the description in this issue, and log bugs for the other issues as I debug more.
Thanks! 😄
Pretzel was created years ago but since there are only few people who are still maintaining it, so we are far from having all features of Jekyll. And sadly I can't promess you that one day it will.
But we can still have a minimum of working stuff. 😃
What version of pretzel have you tried?
Builded from the source or from chocolatey?
I'm grateful for chocolatey even if you never make a single improvement :) Having single page rendering is very valuable for me, as it lets me write/edit/debug my styling/posts on windows, and only fire up a linux vm when I'm messing with pagination or complex navigation goop.
I use chocolatey today, but I can build from source if you recommend that.
@idvorkin RE: pagination: you have to specify paginate: 5 in the frontmatter of your file. I cloned your repository, added paginate: 5 to index.html, and it worked.
If you use the Chocolatey version please specify the version 0.3.0 when you install pretzel, it's the last version but hasn't been validated by chocolatey moderators yet.
Activity
thoemmi commentedon Dec 26, 2015
In what way does pagination not work with Pretzel? It works fine on my site.
idvorkin commentedon Dec 27, 2015
RE: Pagination, I wasn't clear:
Several things aren't working locally on my site. Some of those things are certainly my fault, :) Others I'm logging bugs for as I debug them (e.g #289).
If you clone and run my site locally, you'll see no posts showing up on the main page, even though it works fine on GitHub pages. I assumed the problem was pagination, but it's quite possibly another issue.
I'll update the description in this issue, and log bugs for the other issues as I debug more.
laedit commentedon Dec 28, 2015
Thanks! 😄
Pretzel was created years ago but since there are only few people who are still maintaining it, so we are far from having all features of Jekyll. And sadly I can't promess you that one day it will.
But we can still have a minimum of working stuff. 😃
What version of pretzel have you tried?
Builded from the source or from chocolatey?
idvorkin commentedon Dec 28, 2015
I'm grateful for chocolatey even if you never make a single improvement :) Having single page rendering is very valuable for me, as it lets me write/edit/debug my styling/posts on windows, and only fire up a linux vm when I'm messing with pagination or complex navigation goop.
I use chocolatey today, but I can build from source if you recommend that.
thoemmi commentedon Dec 28, 2015
@idvorkin RE: pagination: you have to specify
paginate: 5in the frontmatter of your file. I cloned your repository, addedpaginate: 5toindex.html, and it worked.idvorkin commentedon Dec 28, 2015
@thoemmi - Huge thanks for making the effort -- that was incredibly helpful. Is there something obvious to fix tags as well?
From:
laedit commentedon Dec 28, 2015
If you use the Chocolatey version please specify the version 0.3.0 when you install pretzel, it's the last version but hasn't been validated by chocolatey moderators yet.
laedit commentedon Dec 29, 2015
The version 0.3.0 has just been validated, you only need to do: