# Doxygen Template for C++ API Documentation
When upgrading Doxygen, the following customizations have been made.
## Export Doxygen Templates
Doxygen templates have several parts:
1. Doxygen Layout file `DoxygenLayout.xml`
1. Template files:
1. `header.html`
1. `footer.html`
1. `style.css` (renamed from `customdoxygen.css`)
Further documentation on customizing Doxygen can be found here: https://www.doxygen.nl/manual/customize.html
To export the layout file:
```powershell
cd eng\docs\api\assets
doxygen -l
```
To export the HTML/CSS files:
```powershell
cd eng\docs\api\assets
doxygen -w html header.html footer.html style.css
```
## Configure templates
### DoxygenLayout.xml
Around line 6, change:
```xml
```
To read:
```xml
```
### header.html
In the `
` of the page add the following snippets:
Add Google analytics tag:
```html
```
Add logic that populates and handles interactions with the version dropdown:
```html
```
For the following look for and replace the sections bounded by
`` and `` with the following:
In the project name section add the version selection dropdown in the
PROJECT_NUMBER section:
```html
$projectbrief
|
```
### footer.html
No changes
### style.css
Stylesheet changes may require more work to properly incoporate into the layout.
To be successful here when iterating through changes, make changes in the
browser's "inspect element" tools and then copy those changes to the stylesheet
file. Here are the most obvious changes:
Add these variables:
```css
--title-foreground-color: white;
```
Change the title background color:
```css
--title-background-color: rgb(0, 113, 197);
```
Change `#projectlogo`:
```css
#projectlogo
{
text-align: center;
vertical-align: bottom;
border-collapse: separate;
padding-left: 8px;
}
```
Change `#projectname`:
```css
#projectname
{
font-size: 200%;
font-family: var(--font-family-title);
margin: 0px;
padding: 2px 0px;
color: var(--title-foreground-color);
#versionSelector {
font-size: 24px;
}
}
```
## How it's wired up
See `cmake-modules/AzureDoxygen.cmake` to see how the layout files and and
templates are incorporated into the doxygen build. The build uses `logo.svg`
from `eng/common/docgeneration` instead of the repo-specific folder in
`eng/docs/api/assets`.