whiteglass icon indicating copy to clipboard operation
whiteglass copied to clipboard

category and tag don't show up

Open pharrellyhy opened this issue 8 years ago • 24 comments

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

pharrellyhy avatar Jan 03 '18 04:01 pharrellyhy

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:

  • https://codinfox.github.io/dev/2015/03/06/use-tags-and-categories-in-your-jekyll-based-github-pages/
  • https://blog.webjeda.com/jekyll-categories/

yous avatar Jan 03 '18 04:01 yous

Thanks, Chayoung! I will take a look at it.

On Wed, Jan 3, 2018 at 12:57 PM, Chayoung You [email protected] wrote:

Hi, it's because whiteglass is using jekyll-archives https://github.com/jekyll/jekyll-archives gem for categories and tags archive, but GitHub Pages doesn't support it https://pages.github.com/versions/. I've been used Travis CI to build it, and if you want to know how to do it, see #13 https://github.com/yous/whiteglass/issues/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:

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/yous/whiteglass/issues/18#issuecomment-354937565, or mute the thread https://github.com/notifications/unsubscribe-auth/AP5Isc7i9WwDwnfvpCfhIb2nXTGYTOrzks5tGwjIgaJpZM4RRWGX .

pharrellyhy avatar Jan 03 '18 05:01 pharrellyhy

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

hussaintamboli avatar Jan 04 '18 08:01 hussaintamboli

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

yous avatar Jan 04 '18 08:01 yous

_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

hussaintamboli avatar Jan 04 '18 08:01 hussaintamboli

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

yous avatar Jan 04 '18 08:01 yous

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

hussaintamboli avatar Jan 04 '18 08:01 hussaintamboli

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

yous avatar Jan 04 '18 12:01 yous

Can you check if it's because of

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

hussaintamboli avatar Jan 05 '18 02:01 hussaintamboli

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 avatar Jan 05 '18 08:01 hussaintamboli

Updated the blog

hussaintamboli avatar Jan 07 '18 10:01 hussaintamboli

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.

yous avatar Jan 07 '18 12:01 yous

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

hussaintamboli avatar Jan 08 '18 02:01 hussaintamboli

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

yous avatar Jan 08 '18 02:01 yous

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

hussaintamboli avatar Jan 08 '18 03:01 hussaintamboli

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.

yous avatar Jan 08 '18 03:01 yous

Done. Still don't see master updated.

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

hussaintamboli avatar Jan 08 '18 03:01 hussaintamboli

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.

yous avatar Jan 08 '18 04:01 yous

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

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

hussaintamboli avatar Jan 08 '18 05:01 hussaintamboli

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

yous avatar Jan 08 '18 05:01 yous

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

dongminkim avatar Jan 12 '18 15:01 dongminkim

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 avatar Dec 07 '18 05:12 yous

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 avatar Apr 24 '20 08:04 yous