Skip to content

Commit

Permalink
docs: Use README.md to generate mainpage with doxygen
Browse files Browse the repository at this point in the history
Actually we are using a slightly modified one that removes the
`Table of Contents` section and replaces it with the doxygen-compatible
`[TOC]` to auto-generate a TOC that has working links.
  • Loading branch information
nikias committed Feb 21, 2024
1 parent 3ca4f14 commit 86c3ef2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,7 @@ docs/html: $(top_builddir)/doxygen.cfg $(top_srcdir)/include/plist/*.h
rm -rf docs/html
doxygen doxygen.cfg

docs: doxygen.cfg docs/html
docs/README.doxygen.md: README.md
awk '/\#\# Table of Contents/{while(getline && $$0 != ""){}{print "[TOC]"}}1' README.md > $@

docs: doxygen.cfg docs/README.doxygen.md docs/html
10 changes: 9 additions & 1 deletion doxygen.cfg.in
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,8 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.

INPUT = include/plist/plist.h
INPUT = include/plist/plist.h \
docs/README.doxygen.md

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
Expand Down Expand Up @@ -625,6 +626,13 @@ FILTER_PATTERNS =

FILTER_SOURCE_FILES = NO

# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
# is part of the input, its contents will be placed on the main page
# (index.html). This can be useful if you have a project on for instance GitHub
# and want to reuse the introduction page also for the doxygen output.

USE_MDFILE_AS_MAINPAGE = docs/README.doxygen.md

#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion include/plist/plist.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ extern "C"
#include <stdio.h>

/**
* \mainpage libplist : A library to handle Apple Property Lists
* libplist : A library to handle Apple Property Lists
* \defgroup PublicAPI Public libplist API
*/
/*@{*/
Expand Down

0 comments on commit 86c3ef2

Please sign in to comment.