Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
145 posts
|
Hi,
When w use Guard + livereload (http://asciidoctor.org/docs/editing-asciidoc-with-live-preview/), the HTML generated contains a reference to a css file but this file is not created by the tool and is not available in the local folder <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta name="generator" content="Asciidoctor 0.1.4"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Untitled</title> <link rel="stylesheet" href="./asciidoctor.css"> </head> Is it possible that guard + asciidoctor generate it ? Is there a by default css file available from Git Repo ...? Regards, Charles
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
15 posts
|
I think you should be able to add the linkcss option to solve your problem:
guard 'shell' do watch(/^mydoc\.adoc$/) {|m| Asciidoctor.render_file(m[0], {:in_place => true, :linkcss => true}) } end NOTE: I haven't tried this and I am not 100% on the syntax - educated guess :) |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
145 posts
|
Been able to solve my issue after adding these properties to my xxx.adoc page
:stylesdir: ./styles :stylesheet: styles.css
Charles Moulliard
Apache Committer / Technologist Evangelist / Blogger / MiddleWare Specialist Twitter : @cmoulliard |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
2681 posts
|
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 Dan Allen | http://google.com/profiles/dan.j.allen
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
2681 posts
|
In reply to this post by ch007m
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. 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:
... [show rest of quote] Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |