# Extensions [TOC] On top of the base theme provided by `doxygen-awesome.css`, this repository comes with Javascript extensions that require additional setup steps to get them running. The extensions require customizations in the header HTML-template. This is how you can create the default template with Doxygen: 1. Create default header template: ```sh doxygen -w html header.html delete_me.html delete_me.css ``` 2. Reference the template in your `Doxyfile`: ``` HTML_HEADER = header.html ``` [More details on header customization](https://www.doxygen.nl/manual/customize.html#minor_tweaks_header_css) ## Dark Mode Toggle Adds a button next to the search bar to enable and disable the dark theme variant manually. ### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-darkmode-toggle.js` - **HTML_EXTRA_STYLESHEET:** `doxygen-awesome-sidebar-only-darkmode-toggle.css` (ONLY required for the sidebar-only theme variant!) 2. In the `header.html` template, include `doxygen-awesome-darkmode-toggle.js` at the end of the `` and then initialize it: ```html ``` 3. The button can be customized to some extend: - Change the tooltip of the button: ```js DoxygenAwesomeDarkModeToggle.title = "Zwischen hellem/dunklem Modus wechseln" ``` - Change Icons. Both Emoji or SVG icons are supported: ```js DoxygenAwesomeDarkModeToggle.lightModeIcon = '🌞' // icon from https://fonts.google.com/icons DoxygenAwesomeDarkModeToggle.darkModeIcon = `` ``` All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`! ## Fragment Copy Button ***This feature is experimental!*** Shows a copy button when the user hovers over a code fragment: ### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-fragment-copy-button.js` 2. In the `header.html` template, include `doxygen-awesome-fragment-copy-button.js` at the end of the `` and then initialize it: ```html ``` 3. The button can be customized to some extend: - Change the tooltip of the button: ```js DoxygenAwesomeFragmentCopyButton.title = "In die Zwischenablage kopieren" ``` - Change Icons: ```js DoxygenAwesomeFragmentCopyButton.copyIcon = `` DoxygenAwesomeFragmentCopyButton.successIcon = `` ``` All customizations must be applied before calling `DoxygenAwesomeDarkModeToggle.init()`! ## Paragraph Linking ***This feature is experimental!*** Provides a button on hover behind every headline to allow easy creation of a permanent link to the headline: Works for all headlines and for many documentation section titles. ### Installation 1. Add the required resources in your `Doxyfile`: - **HTML_EXTRA_FILES:** `doxygen-awesome-paragraph-link.js` 2. In the `header.html` template, include `doxygen-awesome-paragraph-link.js` at the end of the `` and then initialize it: ```html ``` 3. The button can be customized to some extend: - Change the tooltip of the button: ```js DoxygenAwesomeParagraphLink.title = "Abschnitt verknüpfen" ``` - Change Icon. Both plain characters or SVG icons are supported: ```js DoxygenAwesomeParagraphLink.icon = "¶" ``` All customizations must be applied before calling `DoxygenAwesomeParagraphLink.init()`! Read Next: [Customization](customization.md)