I suggest you ...

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.

167 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Crt Mori shared this idea  ·   ·  Admin →

    7 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Anonymous commented  · 

        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:
        #!/bin/sh
        /usr/local/bin/git-doxygen-hook.sh

        and made it executable (chmod 750).
        The referenced script is more comples and reads:
        #!/bin/sh
        REPO=`pwd`
        PROJECT=$( echo $REPO | /bin/sed 's/\(.*\)\/\([^\/]*\).git/\2/g' )
        if [ -z "$PROJECT" ]; then
        echo "$0: cannot detect project name" &>&2
        exit 1
        fi

        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
        exit 1
        fi
        fi

        /bin/mkdir "$PROJECTDIR"

        if [ ! -e "$PROJECTDIR" ]; then
        echo "$0: cannot mkdir $PROJECTDIR" &>&2
        exit 1
        fi

        cd "$PROJECTDIR"

        /usr/bin/git clone "$REPO"
        STATUS=$?
        if [ "$STATUS" -ne 0 ]; then
        echo "$0: cannot clone from $1" &>&2
        exit 1
        fi

        cd "$PROJECT"

        if [ -f "$PROJECT.cfg" ]; then
        CFGFILE="$PROJECT.cfg"
        elif [ -f "doxygen.cfg" ]; then
        CFGFILE="doxygen.cfg"
        elif [ -f "doxygen/$PROJECT.cfg" ]; then
        CFGFILE="doxygen/$PROJECT.cfg"
        elif [ -f "doxygen/doxygen.cfg" ]; then
        CFGFILE="doxygen/doxygen.cfg"
        fi

        if [ -z "$CFGFILE" ]; then
        echo "$0: no doxygen config file found"
        exit 1
        fi

        echo "OUTPUT_DIRECTORY=$PROJECTDIR/doxygen" >> "$CFGFILE"
        /usr/bin/doxygen "$CFGFILE"
        if [ -f "$PROJECTDIR/doxygen/html/index.html" ]; then
        /bin/mkdir "/var/www/doxygen/$PROJECT"
        cp -R $PROJECTDIR/doxygen/html/* "/var/www/doxygen/$PROJECT"
        fi

        cd /
        /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).

      • Anonymous commented  · 

        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

      • Anonymous commented  · 

        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?

      Feedback and Knowledge Base