Skip to content

Commit

Permalink
generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 committed Jul 4, 2024
1 parent 495e353 commit 59e7f73
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ DEPFILES=$(MANPAGES_NAMES:%.3=$(DEPDIR)/%.d)

PAGES=$(MANPAGES)

$(DEPDIR):
$(DOCSDEST):
mkdir -p $@

$(DOCSDEST):
$(DEPDIR): $(DOCSDEST)
mkdir -p $@

$(DEPDIR)/%.d: $(DOCSDIR)/%.3
Expand All @@ -27,9 +27,9 @@ $(DOCSDEST)/%.html: $(DOCSDIR)/%.3 $(DEPDIR)/%.d
echo "layout: page" >> $(DOCSDEST)/$*.html
echo "---" >> $(DOCSDEST)/$*.html
cat $(DOCSDEST)/$*.raw >> $(DOCSDEST)/$*.html
rm -f $(DOCSDEST)$*.raw
rm -f $(DOCSDEST)/$*.raw

$(DEPFILES): $(DOCSDEST) $(DEPDIR)
$(DEPFILES): $(DEPDIR)

include $(DEPFILES)

Expand All @@ -39,6 +39,6 @@ all: $(PAGES)

clean:
find . -name "*~" -exec rm {} \;
rm -rf $(DOCSDEST)/*.html $(DOCSDEST)/*.raw
rm -rf $(MANPAGES) $(DOCSDEST)/*.raw
rm -rf $(DEPDIR)

2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ github_username: c-ares
markdown: GFM
theme: minima
plugins:
- jekyll-feed
# - jekyll-feed

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
Expand Down
17 changes: 17 additions & 0 deletions docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
menu: Docs
title: c-ares documentation
layout: page
permalink: /docs/
---

c-ares provides a set of library functions, datatypes, and enumerations
which integrators will use for their implementations. When you install c-ares,
you get man pages which describe their use and meanings.

{% assign docs_paths = site.pages | where_exp: "page", "page.path contains 'docs/'" | map: "path" | sort -%}
{%- for path in docs_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
- [{{ my_page.path | replace: "docs/", "" | replace: ".html", "" }}]({{ my_page.path }})
{% endfor -%}

0 comments on commit 59e7f73

Please sign in to comment.