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

Author pages and tag pages returns 404 #16

Open
alan-yeh opened this issue Jan 18, 2016 · 14 comments
Open

Author pages and tag pages returns 404 #16

alan-yeh opened this issue Jan 18, 2016 · 14 comments

Comments

@alan-yeh
Copy link
Contributor

Nice theme!
There is a problem in my blog. I had changed the 'categories' and 'tags' in my markdown posts and it works well in local server but not in pages.github.com. I wander if there is any mistake I made.

@biomadeira
Copy link
Member

Hi @poi-son,

The problem you get is because for security reasons, Github doesn't run the plugins (under _plugins/) for authors/tags page when deploying with Github Pages. As explained in deployment, for getting it to work:

  1. you need to generate your site locally (more details below) and push the resulting HTML to a Github repository; or

  2. built the site with travis-ci (with goodies from jekyll-travis) automatically pushing the generated _site/ files to your gh-pages branch. This later approach is the one I am currently using to generate the live demo.

For option 1) simply clone this repository (master branch), and then run jekyll serve inside the directory. Upload the resulting _site/ contents to your repository (master branch if uploading as your personal page (username.github.io) or gh-pages branch if uploading as a project page (as for the demo).

For option 2) you will need to set up travis-ci for your personal fork. Briefly all you need then is to change your details in _config.yml so that you can push to your github repo. You will also need to generate a secure key to add to your .travis.yml (you can find more info on how to do it in that file). Also make sure you read the documentation from jekyll-travis. This approach has clear advantages in that you simply push changes to your files and all the html files are generated for you. Also you get to know if everything is still fine with your site builds. Don't hesitate to contact me if you still have any issues (see below about issue tracking).

Let me know if this is clear to you, otherwise I will give it another shot...

Cheers

@alan-yeh
Copy link
Contributor Author

Thanks for your answer.
I'm new in jekyll. I am trying to solve this problem in another way although I'm not sure whether it works.
Best with you.

@hungdh0x5e
Copy link

I have same problem, i follow option 1, but not change :(, plz help me.
My site: http://hungdh.me/

@biomadeira
Copy link
Member

@hungdh0x5e I went looking for your jasper fork and I guess the problem is that you pushed the contents of the master branch instead of the contents of the _site/ folder. The contents of the folder should look like what you see for the jasper demo here https://github.com/biomadeira/jasper/tree/gh-pages

Let me know if this helps.

@farmanp
Copy link

farmanp commented Mar 18, 2016

@biomadeira I'm also getting this error too. It was originally working, but I've deleted the repo three times to get it to work again and it's no good.

@biomadeira
Copy link
Member

Sorry @hungdh0x5e and @farmanp

Can you check whether the links in https://github.com/biomadeira/jasper/blob/master/_includes/navigation.html#L12 are pointing the your username/nickname and the same for the tags you use?

Cheers

@biomadeira biomadeira reopened this Mar 22, 2016
@hungdh0x5e
Copy link

@biomadeira Thanks for your answer, it's working.

@itumel
Copy link

itumel commented Apr 14, 2017

Hi @biomadeira I also have the same problem as @alan-yeh and @hungdh0x5e

I am also using Option 1 as a personal page. My source files are at https://github.com/itumel/itumel.github.io

My demo is http://abeginnersguidetohackathons.com

I have checked that navigation.html points towards my username/nickname and the same for tags.

If you click on author on my site you get 404.html.

I am new to Jekyll. Please help.

@biomadeira
Copy link
Member

@itumel Sorry to hear that you are getting some problems.

Not sure if you fixed some already, but your author page http://abeginnersguidetohackathons.com/author/sharon/ seems to be working fine. As for the tags I am not sure why you have product and preparation tags in the navigation, whereas you only seem to have posts about introduction. This later tag seems to be working fine...

@itumel
Copy link

itumel commented Apr 17, 2017

Hi @biomadeira

Yes I managed to fix the problem. I followed the advice on Option 1 to the letter by pushing to remote server only the contents of the /_site/ folder instead of the entire jekyll project.

I am still writing the articles for product and preparation.

Thank you.

@jordant97
Copy link

@biomadeira Please help me with clearer instruction on option 2, from what I understand:

  1. Gem install travis
  2. Travis encrypt github_username, github_email and travis_ci_api_key (Is this right? Or is it supposed to come from github)
  3. Add the key into travis.yml
  4. In config.yml, configure the following settings
    username: github_username repo: repo_name branch: master relative_source: (Not really sure what this should be) destination: (Not really sure what this should be, is it supposed to be gh-pages?) production_url: https://datcjordan.github.io/testingforestry/ source_url: https://github.com/datcjordan/testingforestry/
  5. When you push to your github, travis ci will install all the plugins and push the _site folder to gh-pages

But I am having some problem with Travis CI. This is the error I have received:
1.39s$ bundle exec rake site:deploy --quiet Cloning into '../jasper-pages'... Switched to branch 'master' Your branch is up to date with 'origin/master'. error: pathspec 'gh-pages' did not match any file(s) known to git. rake aborted! Command failed with status (1): [git checkout gh-pages...] /home/travis/build/[secure]/testingForestry/Rakefile:61:in block (3 levels) in <top (required)>'
/home/travis/build/[secure]/testingForestry/Rakefile:61:in chdir' /home/travis/build/[secure]/testingForestry/Rakefile:61:in block (2 levels) in <top (required)>'
/home/travis/.rvm/gems/ruby-2.4.2/gems/rake-12.3.1/exe/rake:27:in <top (required)>' /home/travis/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in eval'
/home/travis/.rvm/gems/ruby-2.4.2/bin/ruby_executable_hooks:15:in <main>' Tasks: TOP => site:deploy (See full trace by running task with --trace) The command "bundle exec rake site:deploy --quiet" exited with 1. cache.2 store build cache $ bundle clean Cleaning all the gems on your system is dangerous! If you're sure you want to remove every system gem not in this bundle, run bundle clean --force. 0.01s 1.81snothing changed, not updating cache Done. Your build exited with 1.

@datamadness
Copy link

datamadness commented May 27, 2018

Hello @biomadeira,
Thanks for your work on Japer2. I love it and would like to use it. Unfortunately, I am currently unable to generate author and tags. I followed your option 1 and the problem is that even the folders "author" and "tag" are not generated in the site content (only about and assets folders are generated in _site).

Could you point me to what I might be doing wrong?

If I try to uncomment author permalink in _config.yml, I get:
jekyll 3.6.2 | Error: The URL template doesn't have author keys. Check your permalink template!

I have tested it on both your fork without any changes and my version where I modified _data/author names so it matches author in the post.

Thanks, your help is much appreciated.

@zkf85
Copy link

zkf85 commented Jun 12, 2018

Hi I'm still having this problem, after following your instruction, which is, just push contents in the _site/ folder to my github.io repo, but the problem's still there. Could you please help?

flavioab pushed a commit to flavioab/flavioab.github.io that referenced this issue Sep 28, 2019
@biomadeira
Copy link
Member

@zkf85 I think you need to play with the baseurl. There is a difference when running a project-based site (e.g. jekyller.github.io/jasper/) and a personal site (e.g. username.github.io/). Could you try that?

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

No branches or pull requests

8 participants