GithubHelp home page GithubHelp logo

velron / doxygen-bootstrapped Goto Github PK

View Code? Open in Web Editor NEW
400.0 28.0 73.0 104 KB

Customize doxygen output to use the twitter bootstrap framework.

License: Apache License 2.0

JavaScript 49.75% CSS 29.20% HTML 13.84% C++ 7.22%

doxygen-bootstrapped's Introduction

doxygen-bootstrapped

Customize doxygen (v1.8.9) output to use the twitter bootstrap framework (v3.3.1)

Demo

This started as work done by Stratify Labs and was extended further here. Credit

Customizing Doxygen

Doxygen provides a handful of ways to customize the output. The simplest way is to customize the HTML output.

Doxygen allows you to customize the HTML output by modifying a master HTML header, footer and stylesheet. You can then include additional stylesheets and javascript files. The following command will generate the default Doxygen files.

doxygen -w html header.html footer.html customdoxygen.css

Modifying these files alone is not enough to get good Twitter Bootstrap integration. Bootstrap requires that certain classes be applied within the HTML. For example, a Bootstrap “table” needs to have a class called “table” in order to apply the Bootstrap table formatting. We just need to augment the default HTML with these Bootstrap classes. To do this, we use the provided doxy-boot.js javascript file.

Also, you can augment doxygen’s default stylesheet with a customdoxygen.css stylesheet. This is where you would place any custom styling such as sticky footers.

How to Integrate

To integrate this into your own project tell your doxyfile to use these 4 files in the HTML section (see the example site for an example of each file):

  • HTML_HEADER=header.html
    • Adds a Bootstrap navbar
    • Wraps the content in a Bootstrap container/row
  • HTML_FOOTER=footer.html
    • Closes the extra divs opened in the header.html
  • HTML_EXTRA_STYLESHEET=customdoxygen.css
    • Adds additional styling such as a sticky footer
  • HTML_EXTRA_FILES=doxy-boot.js
    • Where the magic happens to augment the HTML with bootstrap

NOTE: The header.html file needs to include the Bootstrap css/javascript for this to work. This is where you can specify your own bootstrap compilation. These files will need to be manually added to the html directory, added as additional files in the doxyfile HTML_EXTRA_FILES section or referenced externally (see example site header.html).

NOTE: If you want to use the customdoxygen.css stylesheet from this repository, then you will need to replace the customdoxygen.css style sheet generated by the doxygen command above. If your customdoxygen.css file is in the directory when you run the doxygen command, it will be moved to customdoxygen.css.bak and you can restore it by overwriting the new version with the backup.

See the example-site directory for a minimal working example.

Todo List

  • Menu is not correctly displayed when Doxygen sidebar is enabled.

doxygen-bootstrapped's People

Contributors

alankelly avatar allanleal avatar janhajer avatar kiawin avatar orzechow avatar tyler-gilbert avatar uaftab avatar velron avatar zeioth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

doxygen-bootstrapped's Issues

"@tparam" sections not generated in final HTML

I'm using the example sites header/footer to generate docs for C++.
With vanilla doxygen, @tparam generates a template parameter section.
With doxygen-bootstrap, @tparam is seemingly ignored with nothing at all being generated.

Broken with doxygen 1.8.12

Hello,

I believe this theme is broken when using doxygen 1.8.12.
I've simply cloned the project and ran doxygen from example-site.

The generation seems fine, but going on the page gives a javascript error related to the search, and that prevent some other script to run. The result is that the whole page header ("main page", "related page", "namespace", etc) is not present.

No Bibliography

If I use the theme my whole Bibliography vanishes. The references are fine and linking to the empty Bibliography. If I remove header, footer, extra_stylesheet and extra_files the Bibliography is available.
Doxygen-version: 1.8.11

Menu hidden on module pages and main page

I'm using the doxygen v1.1.12+ branch with doxygen v1.8.17.
My doc includes modules (using @defgroup and @ingroup) which each have a seperate page (linked from modules.html, which itself renders fine).

Opening one of these modules pages undesirable hides the menu bar (which includes navigation back to modules.html, for instance). Is there anyway to prevent this, so that the menu bar is visible on every page?

Suggestion: customize layout

#Label: Idea#
I just have a suggestion: to have a more usable documentation I think that the detailed description of a class should go on top of the page, and not after the list of all members and function, which can often be veery long.
For doing this I used the custom layout suggested in this SO answer: https://stackoverflow.com/questions/19831837/documenting-with-doxygen-put-details-on-top.
What do you think about it?

P.S.
I really like the way you modified doxygen, you made an old but strong tool look modern, this repo should be way more famous! ;)

Not working on latest Doxygen version 1.8.14

There's an error in the example page, i tried with the older version 1.8.9.1 and it works, but i think it should work with the latest versions.

search.js:318 Uncaught TypeError: Cannot read property 'style' of null
at SearchBox.CloseResultsWindow (search.js:318)
at HTMLDocument. (doxy-boot.js:270)
at j (jquery-2.1.1.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.1.1.min.js:2)
at Function.ready (jquery-2.1.1.min.js:2)
at HTMLDocument.I (jquery-2.1.1.min.js:2)

Sidebar not compatible

After setting up with the provided documents, and using GENERATE_TREEVIEW = YES, the resulting page unexpectedly looks like the following.
screenshot from 2014-12-15 23 49 07

With GENERATE_TREEVIEW = NO, it appears as I would expect.
bootstrap

The generation did not use any additional external styles/formatting. It would be difficult to navigate this particular documentation without some sort of side bar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.