-
Notifications
You must be signed in to change notification settings - Fork 861
Configuration
gnab edited this page Mar 8, 2013
·
51 revisions
Configuration is done either by setting configuration options directly in the <script>
tag or by calling the remark.config
method.
This method is convenient if you don't need any other JavaScript in your slideshow, as it saves you the trouble of creating that extra <script>
tag:
<script src="remark.js" language="text/javascript">
{ "option": "value" }
</script>
Please notice that the configuration option-value object must be valid JSON, i.e. quotation marks must be used for keys and value strings instead of single quotes.
This method uses ordinary JavaScript by calling the remark.config.set
API method, accepting the same configuration option-value object mentioned above:
remark.config.set({ "option": "value" });
If you've already got some JavaScript in your slideshow, this is the preferred way.
Check out the list of configuration options.
<title>Title</title>
<style>
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic);
<textarea id="source">
body { font-family: 'Droid Serif'; }
h1, h2, h3 {
font-family: 'Yanone Kaffeesatz';
font-weight: normal;
}
.remark-code, .remark-inline-code { font-family: 'Ubuntu Mono'; }
</style>
Code:
def add(a,b)
a + b
end
</textarea>
<script src="https://remarkjs.com/downloads/remark-latest.min.js">
</script>
<script>
var slideshow = remark.create();
</script>