Doxygen generated documentation page
I use doxygen style commenting and would be very happy if GitLab could autogenerate doxygen documentation (using doxygen configuration file commited to root) which would then be viewed as Code Documentation tab (just as wiki). This could be made by daily trigger or with each commit (preferably) to master. That way we can keep documentation completely up to date directly from code to and avoid linking to doc directory to display.
I am currently using git´s post-receive hook to autogenerate the doxygen files. Works like a charm, but requires some amnual work in each repository (but I am sure this could be automated).
In each repository, I have created a file called custom_hooks/post-receive with the following content:
and made it executable (chmod 750).
The referenced script is more comples and reads:
PROJECT=$( echo $REPO | /bin/sed 's/\(.*\)\/\([^\/]*\).git/\2/g' )
if [ -z "$PROJECT" ]; then
echo "$0: cannot detect project name" &>&2
PROJECTDIR="/tmp/$PROJECT.`/usr/bin/shuf -i 10000-99999 -n 1`"
if [ -e "$PROJECTDIR" ]; then
/bin/rm -rf "$PROJECTDIR"
if [ -e "$PROJECTDIR"; then
echo "$0: cannot remove $PROJECTDIR" &>&2
if [ ! -e "$PROJECTDIR" ]; then
echo "$0: cannot mkdir $PROJECTDIR" &>&2
/usr/bin/git clone "$REPO"
if [ "$STATUS" -ne 0 ]; then
echo "$0: cannot clone from $1" &>&2
if [ -f "$PROJECT.cfg" ]; then
elif [ -f "doxygen.cfg" ]; then
elif [ -f "doxygen/$PROJECT.cfg" ]; then
elif [ -f "doxygen/doxygen.cfg" ]; then
if [ -z "$CFGFILE" ]; then
echo "$0: no doxygen config file found"
echo "OUTPUT_DIRECTORY=$PROJECTDIR/doxygen" >> "$CFGFILE"
if [ -f "$PROJECTDIR/doxygen/html/index.html" ]; then
cp -R $PROJECTDIR/doxygen/html/* "/var/www/doxygen/$PROJECT"
/bin/rm -rf "$PROJECTDIR"
The Doxygen config file needs to be placed in either the root directory of the project or a subdirectory called doxygen and must be named doxygen.cfg (or have the name of the repository, see code).
This would be really really awesome. Make it possible to host some doxygen docu at least without auto generation as first approach.
Olle Kelderman commented
this seems like something a ci-server would do imo.. Not sure
I agree that this would be nice, and opens up a lot of interesting possibilities for integration between doxygen data and gitlab
Crt Mori commented
I do not think Gitlab CI allows autogeneration of Doxygen documentation. Although months have passed, I still think this feature would be nice.
Kay Strobach commented
Use gitlab ci+commits to the wiki to don that easily
Matias Ghioldi commented
This is a great idea. How come it doesn't have more traction?