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
How do I build the styleguide without running a server? #779
Comments
To create a static version you need to remove |
Just small correction: you will still need a server running in the output folder. Such as |
So there is no real static static version? I wanted to copy the styleguide to my github page. Is there a way to do so, without a server at all? |
Static version is generated if you do not use |
Thank you for that link. I tried Here is my gulpfile:
When I open
|
Styleguide always requires minimal webserver, otherwise browser is unable to load external resources. However, if your goal is to host styleguide on github, it is possible by setting |
Thank you, that helped a lot :) Running now at http://alexa.sc/styleguide_static/. Saved my day! |
Hi @varya every time I try to generate a static version of my styleguide I get just a blank page. It looks to me that relative paths to the /js/app.js are not right. Everything works great locally with this: https://github.com/zetagraph/monoset/blob/dev/gulpfile.js but when I remove "server: true, and port: 3005," and regenerate the styleguide I would just get a blank page. The stylguide is currently here: http://zetagraph.github.io/monoset/styleguide/ Tried to use github pages as in your example: http://varya.me/en/posts/sc5-styleguide-for-smallers/ What am I missing here? Заранее спасибо! |
Have you set rootPath? https://github.com/SC5/sc5-styleguide#user-content-option-rootPath |
@kraftner I belive I do. Its in here: https://github.com/zetagraph/monoset/blob/dev/gulpfile.js#L143 withe the rootPath being: "styleguide" in here: https://github.com/zetagraph/monoset/blob/dev/gulpfile.js#L9 I also remove the server: true, and port: 3005, before trying to generate the static version. |
Hi @zetagraph! To be able to see the result on your machine, you will need to run your own server. For example:
Then on http://localhost:8000/#/ you will see the website. If you want the server to be run in the root of your project, add Proof-pic: https://fotki.yandex.ru/next/users/toivonens/album/44279/view/614430 |
@varya Thanks a lot. I kinda figured it out eventually by messing with the path to the styleguide in relation to where it was to the Drupal theme. For me it was: Great tip about the "python -m SimpleHTTPServer" never new I can do that :) On a different note how do I get custom colours to work? If I want a different colour for the header for example. I tried to override the variables by creating "_styleguide_variables.scss" in my theme and that worked at some point but then something change and I lost them. Probably missing something simple again. Еще раз спасибо! |
How I can I build a styleguide without running the build in server? I actually want a static version of the styleguide, so I can just open the
index.html
file in the browser and it just runs.The text was updated successfully, but these errors were encountered: