Re: Guard + LiveReload + CSS

Posted by mojavelinux on
URL: https://discuss.asciidoctor.org/Guard-LiveReload-CSS-tp676p702.html

Regarding your question about where the default stylesheet comes from, it's stored internally in a string an gets written to a file when the linkcss attribute is set.

There are also a number of stylesheets you can snag from the Asciidoctor stylesheet factory.

http://themes.asciidoctor.org

We plan to bundle up these themes so that you can consume them in the same way as the default stylesheet, but that's roadmap material :)

-Dan


On Fri, Oct 4, 2013 at 4:29 AM, Dan Allen <[hidden email]> wrote:
Charles,

If you are using the default stylesheet, you shouldn't need to set the stylesdir or stylesheet. You do, however, need to set the safe mode so that the copy feature is activated.

```ruby
guard 'shell' do 
  watch(/^mydoc\.adoc$/) {|m| 
    Asciidoctor.render_file m[0], :in_place => true, :safe => :unsafe, :attributes => 'linkcss'
  } 
end
```

As I mentioned in another thread, we're going to make sure to draw plenty of attention to the importance of setting the safe option.

 -Dan


On Thu, Oct 3, 2013 at 11:08 AM, ch007m [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Been able to solve my issue after adding these properties to my xxx.adoc page

:stylesdir: ./styles
:stylesheet: styles.css


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Guard-LiveReload-CSS-tp676p686.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--



--
Dan Allen | http://google.com/profiles/dan.j.allen