Hi, bundle exec jekyll serve is working. In the local build, I can see the files in my posts folder. The theme I am using–Phantom by Jami Gibbs–has employed the use of jekyll-pagination-v2. I understand that is probably because jekyll-pagination-v2 is not supported by github. I am determined to get my website working(link to repo: https://github.com/Sebastian-O-Rodriguez/Sebastian-O-Rodriguez.github.io).
Please check the link to my site to see how it looks through github sebastian-o-rodriguez.github.io
I am unsure if changing to pagination supported by github or using a local build and sending it to github-pages. If I were to do either option, I have no idea where to start. I have tried the former and cannot get jekyll-pagination to work. On the other hand, I have no experience in building and pushing built files to the repo.
I could really use some advice of what the next step for me is, and possibly a reference to get going. Thanks in advance!
As you’ve learned, you can’t use jekyll-paginate-v2 with Github Pages. You didn’t say in your post if you need the functionality of that plugin or if you could use the supported jekyll-paginate. If you can get by without jekyll-paginate-v2, that would be the easier option. All you’ll need to do is update your config file per the docs.
If you wish to keep the jekyll-paginate-v2 plugin, you’ll need to setup a local development environment. I’ve got a script in my dotfiles that you can reference for getting the built files published on your gh-pages branch.
On an unrelated note, you should get a .gitignore file set-up with at least the following:
thanks for the welcome! After looking more into the matter, I do need jekyll-paginate-v2 after all. Your linked dotfile seems really useful, but I have some questions implementing it. As of now, I have updateed my .gitignore and added ghpages-deploy.shto the master folder. How do I use this script to deploy a static build of the website (where non-whitelisted plugins will work)?
As a side note, I have also tried to use this to build my site and deploy it, to little avail.
Before you start, a disclaimer: I’ve never tested that deploy script on a Mac. For all I know it’ll burn your system to the ground. Now, with that out of the way…
You’ll probably want to move that script to your ~/bin directory so you can use it for more than just this project. Regardless, you’ll need to make it executable: chmod +x ghpages-deploy.sh. Before you run the script, you’ll need to make sure you have a gh-pages branch ( git branch gh-pages). After that you should be able to run ghpages-deploy.sh or ./ghpages-deploy.sh.
I don’t think computing power is an issue is it? As far as compatibility, I’ve built Jekyll sites on Windows and Linux and worked with people who have built them on Mac. Your operating system shouldn’t matter. If you are getting errors, publish them here and we’ll try to work through them.
It looks like everything worked except the files didn’t get pushed to Github. You created the branch locally but didn’t tell Github about it. Switch to your gh-pages branch (git checkout gh-pages). Type the code it shows there (git push --set-upstream origin gh-pages). Don’t forget to switch back to your master branch before making updates to the site.
I think this means everything worked for the most part, but the website is still not showing the posts like it does when i had run bundle exec jekyll serve --watch before.
Open your project directory in Finder and delete everything (including hidden files) execpt your .git directory. (Note, you can do this via the terminal but you can also burn everything to the ground in a hurry …so, Finder is probably best.)
Switch back to the master branch.
Remove temp directory from the previous build: rm -rf $HOME/.tmp/jekyll
Recreate the temp directory to hold the build output: mkdir -p $HOME/.tmp/jekyll
Build Jekyll and output to temp directory: JEKYLL_ENV=production jekyll build --destination $HOME/.tmp/jekyll
Switch back to the gh-pages branch.
Copy files from temp directory: cp -r $HOME/.tmp/jekyll/. .
Add files to index and commit: git add . && git commit -m "Deploy changes"
I believe that the necessary files were pushed to the gh-pages branch, but the website still hasn’t changed. it doesn’t seem to be (in my novice view) to be a problem with with the deploy script, but something else. What other steps could I take to fix the cause of this issue?
It looks like you’re pushing to the wrong place. In your first post you said we were working in the Sebastian-O-Rodriguez.github.io repository. In the screenshot you’ve added, you are pushing these built files to sebastianglobal.github.io.
I am currently at a loss. Not that it should matter, but I have been using github desktop to switch from gh-pages to master, and vice versa. Another concern I have is, I tried to use octopress to build locally before you responded to my post, and had added a source branch, I deleted it using set branch -d source. I don’t know if this will affect things. After, I did the following from sebastian-o-rodriguez directory:
Switch to your gh-pages branch.
git push --set-upstream origin gh-pages (just to make sure i did this in this correct directory)
Open your project directory in Finder and delete everything (including hidden files) execpt your .git directory. (Note, you can do this via the terminal but you can also burn everything to the ground in a hurry …so, Finder is probably best.)
Switch back to the master branch.
Remove temp directory from the previous build: rm -rf $HOME/.tmp/jekyll
Recreate the temp directory to hold the build output: mkdir -p $HOME/.tmp/jekyll
Build Jekyll and output to temp directory: JEKYLL_ENV=production jekyll build --destination $HOME/.tmp/jekyll
Switch back to the gh-pages branch.
Copy files from temp directory: cp -r $HOME/.tmp/jekyll/. .
Add files to index and commit: git add . && git commit -m "Deploy changes"
Looking at the gh-pages branch on GitHub it looks like everything worked. My guess now is your settings. Scroll down to GitHub Pages and check that your source branch set to gh-pages.
I compelled to let you know how grateful I am for all your help. It’s truly been a pleasure, and a great learning experience it has been.
In terms of source branch set to gh-pages I find myself in a bit of a pickle. I created sebastian-o-rodriguez.github.io as a USER site instead of a project site. From what I understand, this means i either have to morph the workflow of this site so that gh-pages merges into the master, or (I guess) create a github pages as a PROJECT site in order to do this.
For further reference, this is what my “set source” looks like
long story short, your ghpages-deploy.sh is really amazing. Something clicked today and I have everything working (well, the deploy process works lol). I easily use ghpages-deploy.sh to update my launched site, and am now working through aesthetic bugs much more easily. Thanks again man.
I’m glad things are making more sense for the local build/deploy script.
As for the project vs user issue, that’s more of a personal preference. My Bradonomics repo is setup to publish with a custom domain from my user account. Building my personal site at the root doesn’t preclude me from building project sites. See my SimpleSheets Shopping Cart for example. I have helped others setup orginizational accounts to host sites on Pages. It’s all up to your work flow.
I have decided that sebastian-o-rodriguez.github.io/about is just way too long, so I now have ownership over sebrod.com. According to documentation from github, I have gone to the settings and added ‘sebrod.com’ as a custom domain and saved it. On the website i bought from, namecheap.com, I added the following:
for TYPE, HOST, VALUE respectively CNAME record , www , sebastian-o-rodriguez.github.io
I set the four A record , @ , and each ip address to the namecheap website as well.
I am not sure what steps I will need to take. As a reminder, the repository currently hosting my site is ‘about’. If I go to www.sebrod.com things are looking really messed up. Also, I added a CNAME file including “www.sebrod.com” to my repository.