danielgtaylor / aglio

An API Blueprint renderer with theme support that outputs static HTML
4.75k stars 481 forks source link

--theme-style, --theme-variables confusion #132

Open danhodkinson opened 9 years ago

danhodkinson commented 9 years ago

if i run sudo aglio --theme-variables theme/my-colors.less -i input.apib -o test.html then my new theme colors are present in the html file.

However if I then run sudo aglio --theme-style theme/my-theme.less -i input.apib -o test.html then the colors revert to the default theme but my style changes occur.

Am I doing something wrong or should I be merging everything in to one file?

danielgtaylor commented 9 years ago

@danhodkinson why not pass both?

aglio --theme-variables 'theme/my-colors.less' --theme-style 'theme/my-theme.less' -i input.apib -o test.html

The idea is that the variables are processed first, then the style. The style may make use of the variables, including the default variables (i.e. your variables file appends to it instead of overwriting). I may need to make this more clear in the documentation.

Also, you probably don't want to run aglio with sudo as a general rule. If the first thing you ever did with npm is run sudo npm install -g ... then the permissions on ~/.npm might need to be fixed.

danhodkinson commented 9 years ago

when I run aglio --theme-style theme/my-theme.less -i input.apib -o new.html i get the following error: >> {"errno":-13,"code":"EACCES","path":"new.html"} which i presumed was a permissions issue but i've checked them all and they all seem ok to me.