issue w `make preview-website`
bertdv opened this issue · 9 comments
I got an issue w SimpleHTTPServer, see below
$ make preview-website
hugo -t academic-group
Started building site
0 draft content
0 future content
13 pages created
0 non-page files copied
0 paginator pages created
0 categories created
0 tags created
in 57 ms
cd ./public; python -m SimpleHTTPServer 8000
/home/bert/anaconda3/bin/python: No module named SimpleHTTPServer
make: *** [preview-website] Error 1
@bertdv It's due to the fact that SimpleHTTPServer
was merged in the http.server
module in Python 3. I'll update the Makefile
tomorrow.
In the meantime you can edit the entry in the Makefile
, substituting
python -m SimpleHTTPServer 8000
with
python -m http.server
or use hugo debug server. It's fine for testing/editing/viewing purposes, but having a separate server helps to catch some minor bugs and mistakes in the code, which hugo corrects for you.
@bertdv what happens in that case is that config.toml
by default contains the parameter baseUrl
set up as http://example.org
, which results in improper rendering of the website.
I have an idea about elegant solution to the problem and it's currently WIP.
This issue is resolved with pull request #3.
@bertdv You should use command make-website-local
if you want hugo
to pick up the changes in local config file.
@bertdv Updating your theme: make update-theme
might help as well.
After make update-theme
and make preview-website-local
I get the same unstyled output at localhost:8000 as shown in image above
setting baseurl
in config.local.toml
to 'http://localhost:8000' fixes this.