Comments (2)
FYI, it works for me out of the box.
Are you sure you followed the setup instructions?
from hugo-material-docs.
Hi,
Yes, i'm pretty sure i did it correctly, but i might have gotten something wrong. Here's what i did (im on Windows 10, Hugo 0.2):
$ C:\temp
$ mkdir materialdocs
$ cd materialdocs
$ git clone https://github.com/digitalcraftsman/hugo-material-docs.git themes/hugo-material-docs
$ xcopy /E themes\hugo-material-docs\exampleSite*.*
$hugo version
Hugo Static Site Generator v0.20 windows/amd64 BuildDate: 2017-04-10T15:16:39+02:00
Now, if i run
$ hugo server
And go to http://localhost:1313/ the site renders correctly. If i look at the Adding content menu item on the left, its link is to http://localhost:1313/adding-content/ which works when i navigate there.
Now lets try offline:
$ hugo
If i simply run open the /public/index.html page i get this:
Clearly not right. But the default config has a base url property. Lets remove it and add the relativeurls property, since its meant to be used for offline viewing according to the hugo docs:
By default, all relative URLs are left unchanged by Hugo, which can be problematic when you want to make your site browsable from a local file system.
So in config.toml, i comment out the baseurl property and add the relativeurl:
#baseurl = "https://example.org/"
relativeURLs = true
Trying again:
$ hugo
Now the site renders correctly:
But the link to the Adding content item is
file:///C:/Temp/materialdocs/public/adding-content/
Navigating to that produces this (im using firefox, your browser may show something different, but the outcome is the same, you wont see the page):
This is what i meant by the theme does not work for offline sites - some links don't include a file name (index.html or whatever) so will only work online behind a server that maps requests from / to /index.html
from hugo-material-docs.
Related Issues (20)
- .Now throws an error HOT 1
- The weight in menu item doesn't work as expected in example HOT 3
- Bottom navigation doesn't work as expected HOT 3
- Is it possible to remove the footer?
- Primary and secondary menus ?
- Calling for contributors
- example site fails to run - here is the fix HOT 2
- Hamburger menus render as hollow squares
- No CSS styles rendering when run in server HOT 4
- exampleSite broken on Hugo v0.32-0.34 HOT 8
- Dynamic table of contents
- Admonition more?
- Errors on site without expected parameters set HOT 2
- Code blocks show different grey levels HOT 1
- Loading failed for the <script> with source “http://localhost:1313/javascripts/modernizr.js”.
- no demo HOT 2
- Menu and folders HOT 1
- failed on hugo 0.48 win64 HOT 3
- Page's .Prev and .Next will be deprecated in a future Hugo release
- Broken on 0.50? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-material-docs.