How to get favicon to work with redoc-cli?
I'm using redoc-cli to build the HTML file. This is being done under CI/CD, which then copies the file to AWS S3.
I've added a favicon.ico file to the root of the S3 bucket but I cannot find a mechanism with redoc-cli to get it to include the favicon details into the constructed HTML.
It would seem that it should be possible to do this via the theme option but I cannot see how that can be achieved.
hey @pcolmer, I have come across this issue as well, and what I did was basically have my own template file which will include that icon.
Example:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf8" />
<title>{{title}}</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" type="image/png" href="favicon.ico"/>
<style>
body {
padding: 0;
margin: 0;
background-color: "blue"
}
</style>
{{{redocHead}}}
{{#unless disableGoogleFont}}<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">{{/unless}}
</head>
<body>
{{{redocHTML}}}
</body>
</html>
after that, i would run redoc-cli bundle --options=options.json -t template.hbs openApi.json
Brilliant! Thanks, @kyapwc
Thanks, it worked for me