Skip to content
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

category and tag don't show up #18

Open
pharrellyhy opened this issue Jan 3, 2018 · 24 comments
Open

category and tag don't show up #18

pharrellyhy opened this issue Jan 3, 2018 · 24 comments
Labels

Comments

@pharrellyhy
Copy link

It works fine in local but doesn't work after committed to github.

@yous
Copy link
Owner

yous commented Jan 3, 2018

Hi, it's because whiteglass is using jekyll-archives gem for categories and tags archive, but GitHub Pages doesn't support it. I've been used Travis CI to build it, and if you want to know how to do it, see #13.

It's a bother to configure Travis CI to push site contents, so I'm considering removing jekyll-archives gem dependency and add similar features with our own source. Here's some examples:

@pharrellyhy
Copy link
Author

pharrellyhy commented Jan 3, 2018 via email

@hussaintamboli
Copy link

It didn't work on local for me. I followed "Quick start".

@yous
Copy link
Owner

yous commented Jan 4, 2018

Hi @hussaintamboli, can you show me your _config.yml?

@hussaintamboli
Copy link

_config.yml

title: For Stack, that never gets Full
author: Hussain Tamboli
theme: jekyll-whiteglass
gems:
  - jekyll-archives
  - jekyll-paginate
  - jekyll-sitemap

permalink: /:year/:month/:day/:title/
paginate_path: /posts/:num/
paginate: 5

jekyll-archives:
  enabled:
    - categories
    - tags
  layout: category_archives
  permalinks:
    category: /categories/:name/
    tag: /tags/:name/

google_analytics: MyGA
comments: true

@yous
Copy link
Owner

yous commented Jan 4, 2018

If you see jekyll and update links like this, it's working.
screenshot 2018-01-04 17 42 30

When you enter the jekyll link:
screenshot 2018-01-04 17 45 08

When you enter the update link:
screenshot 2018-01-04 17 45 46

@hussaintamboli
Copy link

hussaintamboli commented Jan 4, 2018

I see this instead

screen shot 2018-01-04 at 4 55 10 pm

jekyll 3.6.2
Bundler version 1.16.1
jekyll-whiteglass 1.5.0

@yous
Copy link
Owner

yous commented Jan 4, 2018

That's weird. I can't reproduce with Ruby 2.5.0, 2.3.6.

Gemfile:

source 'https://rubygems.org'
gem 'jekyll', '~> 3.6.2'
gem 'jekyll-whiteglass'

Gemfile.lock:

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.5.2)
      public_suffix (>= 2.0.2, < 4.0)
    colorator (1.1.0)
    ffi (1.9.18)
    forwardable-extended (2.6.0)
    jekyll (3.6.2)
      addressable (~> 2.4)
      colorator (~> 1.0)
      jekyll-sass-converter (~> 1.0)
      jekyll-watch (~> 1.1)
      kramdown (~> 1.14)
      liquid (~> 4.0)
      mercenary (~> 0.3.3)
      pathutil (~> 0.9)
      rouge (>= 1.7, < 3)
      safe_yaml (~> 1.0)
    jekyll-archives (2.1.1)
      jekyll (>= 2.4)
    jekyll-paginate (1.1.0)
    jekyll-sass-converter (1.5.1)
      sass (~> 3.4)
    jekyll-sitemap (1.1.1)
      jekyll (~> 3.3)
    jekyll-watch (1.5.1)
      listen (~> 3.0)
    jekyll-whiteglass (1.5.0)
      jekyll (~> 3.3)
      jekyll-archives (~> 2.1)
      jekyll-paginate (~> 1.1)
      jekyll-sitemap (~> 1.0)
    kramdown (1.16.2)
    liquid (4.0.0)
    listen (3.1.5)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)
      ruby_dep (~> 1.2)
    mercenary (0.3.6)
    pathutil (0.16.1)
      forwardable-extended (~> 2.6)
    public_suffix (3.0.1)
    rb-fsevent (0.10.2)
    rb-inotify (0.9.10)
      ffi (>= 0.5.0, < 2)
    rouge (2.2.1)
    ruby_dep (1.5.0)
    safe_yaml (1.0.4)
    sass (3.5.4)
      sass-listen (~> 4.0.0)
    sass-listen (4.0.0)
      rb-fsevent (~> 0.9, >= 0.9.4)
      rb-inotify (~> 0.9, >= 0.9.7)

PLATFORMS
  ruby

DEPENDENCIES
  jekyll (~> 3.6.2)
  jekyll-whiteglass

BUNDLED WITH
   1.16.1

@hussaintamboli
Copy link

hussaintamboli commented Jan 5, 2018

Can you check if it's because of

➜  ~ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]

@hussaintamboli
Copy link

By the way I am planning to put fresh blog using whiteglass at hussaintamboli.github.io. It will be great if you could clone it then and check what's the issue. Thanks.

@hussaintamboli
Copy link

Updated the blog

@yous
Copy link
Owner

yous commented Jan 7, 2018

Hi, I saw your blog source, and I think it's because of github-pages gem. By default, it disallows gems that aren't whitelisted for use on GitHub Pages. To allow use of jekyll-archives gem on your local machine, please try DISABLE_WHITELIST=true bundle exec jekyll serve.

@hussaintamboli
Copy link

hussaintamboli commented Jan 8, 2018

With the above fix, I can see categories and tags on local. Thanks.
So there is no support for this on live?

@yous
Copy link
Owner

yous commented Jan 8, 2018

As I commented above, GitHub Pages doesn't support jekyll-archives. Consider using Travis CI.

@hussaintamboli
Copy link

Thanks. I just setup travis as per the instructions.

Done. Your build exited with 0.

But I don't see the changes in my master branch.

By the way, I am getting this in the build response

GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
GitHub Metadata: GET https://api.github.com/repos/hussaintamboli/hussaintamboli.github.io: 403 - API rate limit exceeded for 52.3.55.28. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) // See: https://developer.github.com/v3/#rate-limiting

@yous
Copy link
Owner

yous commented Jan 8, 2018

I think it comes from github-pages gem. Try without it. You're using jekyll-remote-theme gem additionally, so add it to Gemfile and _config.yml.

@hussaintamboli
Copy link

Done. Still don't see master updated.

screen shot 2018-01-08 at 11 49 40 am

@yous
Copy link
Owner

yous commented Jan 8, 2018

I think then you should check your GitHub personal access token. As categories/general, tags/github-pages, tags/jekyll directories are generated properly, jekyll build succeeded. Go to https://github.com/settings/tokens, and check whether your token have public_repo permission or not, for cloning and pushing to your repository.

@hussaintamboli
Copy link

hussaintamboli commented Jan 8, 2018

Yes. That was the issue. Thank you so much!

Maybe I should write a blogpost on the same blog about this after all :)

@yous
Copy link
Owner

yous commented Jan 8, 2018

Nice! I'm considering making this theme work even if jekyll-archives isn't available.

@yous yous added the question label Jan 8, 2018
@dongminkim
Copy link

It would be great if @yous could remove the jekyll-archives dependency.

@yous
Copy link
Owner

yous commented Dec 7, 2018

Deploying to GitHub Pages using Travis CI is much easier with deploy key in .travis.yml. Please start from the updated section of README.md. Also take a look at .travis.yml of this repository. It builds master branch of the repository and deploys the site to gh-pages branch.

@yous
Copy link
Owner

yous commented Apr 24, 2020

Deploying to GitHub Pages is now much easier by using GitHub Actions. See https://github.com/yous/whiteglass-template. You only have to copy .github/workflows/main.yml, and then set secret JEKYLL_PAT to your repository.

@yous
Copy link
Owner

yous commented May 11, 2024

Now you don't even have to set JEKYLL_PAT secret in your repository. Copy .github/workflows/main.yml, and set the "Source" value to "GitHub Actions" in repository's "Settings → Pages → Build and deployment" section. Maybe you need to update on.push.branches values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants