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

Bash - Hugo Serve - results in 404 #48

Closed
2 tasks done
SamFritz opened this issue Jul 13, 2018 · 15 comments
Closed
2 tasks done

Bash - Hugo Serve - results in 404 #48

SamFritz opened this issue Jul 13, 2018 · 15 comments
Assignees
Labels

Comments

@SamFritz
Copy link
Member

While updating the Vancouver event page, I noticed that when I launched Hugo serve command, it brings me to the archivesunleashed.org main page, however navigating to any other page to view changes resulting in 404 error.

Checked:

  • on correct branch
  • homebrew is up-to-date (1.6.14)

Will try to see if there are any other paths that might not be syncing correctly.

Attached documentation for reference:

Bash-Hugo serve- results in 404.pdf

screen shot 2018-07-12 at 11 17 49 pm
screen shot 2018-07-12 at 11 17 56 pm

@ruebot
Copy link
Member

ruebot commented Jul 13, 2018

This happened to me a few months ago, and I had no idea why. Didn't dig into it much at the time, and probably should have.

@ianmilligan1
Copy link
Member

Weird!

@SamFritz could you visit the main page that works, and then visit a page that doesn't work. Then go in and copy and paste the output from the terminal window that's running hugo serve. Maybe there will be a clue there.

@SamFritz
Copy link
Member Author

Tested out hugo while I was making some edits.

Steps

  • launched hugo serve
  • opened: http://localhost:1313/
  • navigated to Vancouver event page --> got the 404 page and nothing changed in terminal
  • saved the vancouver index page in sublime text --> terminal screen shot below

screen shot 2018-07-13 at 10 24 52 am

Will continue to investigate

@ianmilligan1
Copy link
Member

Weird. And going to

http://localhost:1313/vancouver directly leads to the 404?

Any error message that pops up when you do that?

@SamFritz
Copy link
Member Author

correct, went to http://localhost:1313/vancouver shows the 404 but there is no error message in terminal.

@ruebot was this the same experience for you? no error in terminal? are you still unable to launch hugo serve or did it clear up for you?

@SamFritz
Copy link
Member Author

I think I found the problem/solution - there has been a noted issue for hugo serve

Trying out suggestions listed on ticket, fingers crossed!

@ianmilligan1
Copy link
Member

👍 fingers crossed.

One thing that can help is in Safari under

Safari -> Preferences -> Advanced

selecting "Show full URL"

screen shot 2018-07-13 at 10 44 07 am

@SamFritz
Copy link
Member Author

SamFritz commented Jul 13, 2018

This is just continuing to document 404 issue, looks like we are getting closer

Not sure if this is a quick fix or if it will stick but I now have http://localhost:1313/ working for all pages now, however, it brings me back to an earlier version of our website (there is no vancouver menu, it's displaying when our Toronto event was running)

Steps:

  • Rename the home page content file to "_index.md"

This was based on threads from digitalcraftsman/hugo-material-docs Issue #84

Seems that v0.32-0.34 have caused some problems related to 404.

screen shot 2018-07-13 at 11 12 40 am

screen shot 2018-07-13 at 11 14 59 am

@ruebot
Copy link
Member

ruebot commented Jul 13, 2018

That makes sense. If you don't mind renaming all the content pages for each directory, that'd be awesome.

@ruebot
Copy link
Member

ruebot commented Jul 13, 2018

...and I'll assume @ianmilligan1 has the older version of Hugo still. iirc, we had different versions back a few months ago when it was happening to me.

For me:

$ hugo version  
Hugo Static Site Generator v0.40.3 linux/amd64 BuildDate: 2018-05-09T07:46:33Z

@SamFritz
Copy link
Member Author

@ruebot - yep, just renaming now :)

screen shot 2018-07-13 at 11 19 27 am

Ah, okay that makes sense why @ianmilligan1 wasn't experiencing this hiccup. I'm on same version as you

screen shot 2018-07-13 at 11 20 28 am

@ianmilligan1
Copy link
Member

Good catch! Yeah, at least on this machine I'm on an earlier version (I think my laptop and desktop are on different versions). I'll update to the most recent one.

@SamFritz
Copy link
Member Author

No longer a 404 page, however when navigating to any page (except home page) they are blank and no error is presented in terminal.

Steps:

  1. Changing files names
  • (from terminal): renamed all content index files using git mv index.md _index.md. This was successful
  1. Running Local 1313
  • git pull was up to date
  • git branch on issue-48
  • git status 10 renames to be committed
  • hugo serve

http://localhost:1313 renders homepage only; clicking on any other page displays as follows with no errors or notices listed in terminal. This was tested on Safari Version 11.1.1 (13605.2.8) and Chrome Version 67.0.3396.99 (Official Build) (64-bit)

screen shot 2018-07-13 at 12 24 55 pm
screen shot 2018-07-13 at 12 25 51 pm

@ianmilligan1
Copy link
Member

Just chatting with @SamFritz in Slack, I'll take a quick try right now too..

@SamFritz
Copy link
Member Author

Conversation with @ianmilligan1 in slack:

  • if you have an earlier version of hugo, switch over: brew switch hugo 0.30.2. This rollback worked for Ian to view locally.

For those that do not have previous versions of hugo, a possible solution might be found via:

if you change something in the YAML header on a page it executes a "WRITE" and creates it - but the writes aren't happening with hugo server by default

ianmilligan1 pushed a commit that referenced this issue Aug 21, 2018
* updated advisory board information
* minor change to AB member information
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

3 participants