yous / whiteglass

Minimal, responsive Jekyll theme for hackers
https://yous.github.io/whiteglass/
MIT License
725 stars 197 forks source link

category and tag don't show up #18

Open pharrellyhy opened 6 years ago

pharrellyhy commented 6 years ago

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

yous commented 6 years ago

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 commented 6 years ago

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

On Wed, Jan 3, 2018 at 12:57 PM, Chayoung You notifications@github.com 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 .

hussaintamboli commented 6 years ago

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

yous commented 6 years ago

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

hussaintamboli commented 6 years ago

_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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Can you check if it's because of

➜  ~ ruby --version
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-darwin16]
hussaintamboli commented 6 years ago

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 commented 6 years ago

Updated the blog

yous commented 6 years ago

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 commented 6 years ago

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

yous commented 6 years ago

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

hussaintamboli commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Done. Still don't see master updated.

screen shot 2018-01-08 at 11 49 40 am
yous commented 6 years ago

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 commented 6 years ago

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

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

yous commented 6 years ago

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

dongminkim commented 6 years ago

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

yous commented 5 years ago

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 commented 4 years ago

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 commented 4 months ago

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.