blob: 2ef48742e880e4ae8a88d22f2b1ccd60d1f95940 [file] [log] [blame]
---
layout: home
title: Home
stylesheet: home
---
<div class="hero">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--12-col-desktop mdl-cell--8-col-tablet
mdl-cell--4-col-phone">
<h1>Beautiful Documentation for Build Rules</h1>
<p class="lead">
Stardoc is an easy-to-use documentation generator for Bazel build rules
written in Starlark.
</p>
<p class="lead">
(Stardoc is a recent replacement of the documentation generator tool named "Skydoc")
</p>
<a href="/docs/getting_started_stardoc.html" class="mdl-button mdl-js-button
mdl-button--raised mdl-js-ripple-effect">Get Started with Stardoc</a>
<a href="/docs/getting_started.html" class="mdl-button mdl-js-button
mdl-button--raised mdl-js-ripple-effect">Take me to Skydoc documentation instead</a>
</div>
</div>
</div>
<div class="feature">
<div class="mdl-grid">
<div class="mdl-cell mdl-cell--4-col-desktop mdl-cell--8-col-tablet
mdl-cell--4-col-phone">
<h1>Python docstrings</h1>
<p>
Document your Starlark rules
<a href="docs/writing_stardoc.html">alongside their definition</a>.
</p>
{% highlight python %}
my_rule = rule(
implementation = _my_rule_impl,
doc = """
Example rule documentation.
Example:
Here is an example of how to use this rule.
""",
attrs = {
"srcs" : attr.label_list(
doc = "Source files used to build this target.",
),
"deps" : attr.label_list(
doc = "Dependencies for this target.",
),
}
)
{% endhighlight %}
</div>
<div class="mdl-cell mdl-cell--4-col-desktop mdl-cell--8-col-tablet
mdl-cell--4-col-phone">
<h1>Convenient Build Rules</h1>
<p>
Skydoc's own convenient Bazel <a href="docs/generating_stardoc.html">build
rules</a> making it to integrate Skydoc into your build or release
pipeline.
</p>
{% highlight python %}
load("@io_bazel_skydoc//stardoc:stardoc.bzl",
"stardoc")
stardoc(
name = "checkstyle-docs",
input = "checkstyle.bzl",
out = "checkstyle_doc.md",
)
{% endhighlight %}
<pre class="term">$ <span class="info">bazel</span> build :checkstyle-docs</pre>
</div>
<div class="mdl-cell mdl-cell--4-col-desktop mdl-cell--8-col-tablet
mdl-cell--4-col-phone">
<h1>Beautiful Documentation</h1>
<p>
Generate <a href="docs/skylark.html">documentation</a> in Markdown.
</p>
<img src="/images/sample.png" class="responsive">
</div>
</div>
</div>