How to export a site with theme

I followed the instructions and created a new hugo site locally. Using the themes hyde or vienna, when I run the local server

hugo server --theme=vienna

I can open the http://localhost:1313 and see the site locally.

But I wanted to export the site into a directory, so that I can use it with gh-pages. I tried

hugo --theme=vienna --destination=outputdir

I see that the output directory does not contain any stylesheets linked.

Any suggestion as how can I use hugo for something other than trying to see if it works locally?

Not sure how vienna links the stylesheet (you will get a hint if you view the source), but my guess is uses baseUrl as a prefix. Check your config.toml (or similar).

Yeah, first check the source in /public/. What does the stylesheet link to? Just like bjornerik advises, I’ve got mine set up with BaseURL:

<link rel="stylesheet" href="{{ .Site.BaseURL }}themes/highlighter/css/screen.css"/>

and the first line in my config.toml is:

BaseURL = "http://theurlofthewebsite"

Just make sure you don’t put slash after {{ .Site.BaseURL }}, otherwise you’ll get double slash and things will break.

Let us know how it went.