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

only index.html works. All others pages fail to load and get a 404. #43

Open
ghost opened this issue Jan 2, 2019 · 6 comments
Open

Comments

@ghost
Copy link

ghost commented Jan 2, 2019

I pulled the code at:
https://github.com/wildhaber/gohugo-amp.gohugohq.com

Then checked out the "develop" branch and kicked it off using "npm run go".
It runs, but only the first page works on localhost:1313
All other pages like "http://localhost:1313/install/" get a 404.
Not sure what i am doing wrong.... ??

Sorry about this. Must be something simple i am not getting ?

my make script:

LIB=github.com/wildhaber/gohugo-amp.gohugohq.com
LIB_FSPATH=$(GOPATH)/src/$(LIB)

## install on gopath and run
go get -u $(LIB)/...
cd $(LIB_FSPATH) && git checkout develop
cd $(LIB_FSPATH) && yarn install 
cd $(LIB_FSPATH) && npm run go

output:


cd /Users/apple/workspace/go/src/github.com/wildhaber/gohugo-amp.gohugohq.com && npm run go

> gohugo-amp.gohugohq.com@1.0.0 go /Users/apple/workspace/go/src/github.com/wildhaber/gohugo-amp.gohugohq.com
> npm run hugo:server


> gohugo-amp.gohugohq.com@1.0.0 hugo:server /Users/apple/workspace/go/src/github.com/wildhaber/gohugo-amp.gohugohq.com
> hugo server --buildDrafts --buildFuture


                   | EN
+------------------+----+
  Pages            | 88
  Paginator pages  |  0
  Non-page files   |  0
  Static files     | 11
  Processed images |  0
  Aliases          |  0
  Sitemaps         |  1
  Cleaned          |  0

Total in 70 ms
Watching for changes in /Users/apple/workspace/go/src/github.com/wildhaber/gohugo-amp.gohugohq.com/{content,data,i18n,layouts,static,themes}
Watching for config changes in /Users/apple/workspace/go/src/github.com/wildhaber/gohugo-amp.gohugohq.com/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

@ghost
Copy link
Author

ghost commented Jan 2, 2019

I tried "npm run build:prod", and it generates the files in the "public" folder, but only the top level ones.

For instance, the index.html and no others.
Same with the sitemap.xml. It only has:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    
    <url>
        <loc>https://gohugo-amp.gohugohq.com/</loc>
        <lastmod>2016-10-16T19:28:41+02:00</lastmod>
        <changefreq>daily</changefreq>
        <priority>1</priority>
    </url>
    
    <url>
        <loc>https://gohugo-amp.gohugohq.com/</loc>
        <lastmod>2016-10-16T19:28:41+02:00</lastmod>
        <priority>0</priority>
    </url>
    
</urlset>

@ghost ghost changed the title only index.html works only index.html works. All others pages fail to load and get a 404. Jan 2, 2019
@ghost
Copy link
Author

ghost commented Jan 2, 2019

If anyone can help me out it would be great. Have tried everything I can think of.

@wildhaber
Copy link
Owner

Hey @gedw99, the example pages of the theme only contains an index.md (https://github.com/wildhaber/gohugo-amp/tree/develop/exampleSite/content)

If you're looking for the content of the documentation, you can find them here:
https://github.com/wildhaber/gohugo-amp.gohugohq.com/tree/develop/content

@ghost
Copy link
Author

ghost commented Jan 8, 2019

hey @wildhaber

thanks for the response.
I am running off the Content in gohugo-amp.gohugohq.com, NOT the example site.
You can see this in my Makefile in the first issue above.

So i have not idea whats wrong.
Maybe the hugo version ?
I am using:

hugo version
Hugo Static Site Generator v0.53/extended darwin/amd64 BuildDate: unknown

@ghost
Copy link
Author

ghost commented Jan 8, 2019

complete Makefile for replication:

# hugo based

# use this example site: github.com/wildhaber/gohugo-amp.gohugohq.com
LIB=github.com/wildhaber/gohugo-amp.gohugohq.com
LIB_FSPATH=$(GOPATH)/src/$(LIB)



print:
	@echo 
	@echo LIB :$(LIB)
	@echo LIB_FSPATH  : $(LIB_FSPATH)
	@echo
	ls $(LIB_FSPATH)


dep-all: dep-os dep dep-modules
	# get all deps

dep-os:
	brew install hugo
	brew install yarn

dep:
	# install on gopath
	mkdir -p $(LIB_FSPATH)
	cd $(LIB_FSPATH) && cd .. && rm -rf gohugo-amp && git clone https://$(LIB).git
	
	#cd $(LIB_FSPATH) git checkout develop
	
dep-modules:
	cd $(LIB_FSPATH) && yarn install 

code:
	cd $(LIB_FSPATH) && code .

clean:
	rm -rf $(LIB_FSPATH)

### 

run:
	cd $(LIB_FSPATH) && npm run go
run-d:
	rm -rf $(LIB_FSPATH)/public
	cd $(LIB_FSPATH) && hugo serve -p 1314 -v --baseURL http://localhost:1314 --buildDrafts --buildFuture --disableFastRender --renderToDisk --noHTTPCache

build:
	cd $(LIB_FSPATH) && npm run build:prod
build-d:
	rm -rf $(LIB_FSPATH)/public
	cd $(LIB_FSPATH) && hugo --buildDrafts --buildFuture --baseURL http://localhost:1315
	#cd $(LIB_FSPATH) && hugo gen



@yds
Copy link

yds commented May 9, 2019

@gedw99, I was having the same issue.

See https://GitHub.com/wildhaber/gohugo-amp.gohugohq.com/pull/11

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

2 participants