Skip to content

Commit

Permalink
Add Rust API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Jun 11, 2024
1 parent 675a372 commit 59f740d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
19 changes: 15 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,34 @@ define runsile =
endef

.PHONY: static
static: examples lua-api-docs
static: examples lua-api-docs rust-api-docs

DOCSBRANCH = master

.PHONY: lua-api-docs
lua-api-docs: static/lua-api/index.html

static/lua-api/index.html: sile-sources-$(DOCSBRANCH)
pushd $<
touch aminclude.am
nix develop --phase autoreconf
nix develop --configure
nix develop --command bash -c "make lua-api-docs"
popd
rsync -av $</lua-api-docs/ $(@D)/

.PHONY: rust-api-docs
rust-api-docs: static/rust-api/sile/index.html

static/rust-api/sile/index.html: sile-sources-$(DOCSBRANCH)
pushd $<
nix develop --command bash -c "make rust-api-docs"
popd
rsync -av $</rust-api-docs/doc/ static/rust-api/

sile-sources-$(DOCSBRANCH):
git clone -b $(DOCSBRANCH) --depth 1 --recurse-submodules https://github.com/sile-typesetter/sile $@
pushd $@
touch aminclude.am
nix develop --phase autoreconf
nix develop --configure

.PHONY: examples
examples: $(EXAMPLEPDFS) $(DEVELEXAMPLEPDFS) $(EXAMPLEPNGS) $(EXAMPLETHBS)
Expand Down
1 change: 1 addition & 0 deletions templates/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</li>
<li> <a href="{{ get_url(path="/manual/sile-0.15.3.pdf") }}">Manual (PDF)</a></li>
<li> <a href="{{ get_url(path="/lua-api/") }}">Lua API</a></li>
<li> <a href="{{ get_url(path="/rust-api/sile/") }}">Rust API</a></li>
<li> <a href="{{ get_url(path="@/sil-grammar/index.md") }}">SIL Grammar</a></li>
<li> <a href="https://github.com/sile-typesetter/sile/releases"><strong>Download</strong></a></li>
</ul>

0 comments on commit 59f740d

Please sign in to comment.