Skip to content

Commit a39891e

Browse files
committed
api_refs.sh: Add Ibexa favicon
1 parent 9200f29 commit a39891e

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

tools/api_refs/api_refs.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ PHPDOC_CONF="$(pwd)/tools/api_refs/phpdoc.dist.xml"; # Absolute path to phpDocum
1717
PHPDOC_TEMPLATE_VERSION='3.8.0'; # Version of the phpDocumentor base template set
1818
PHPDOC_DIR="$(pwd)/tools/api_refs/.phpdoc"; # Absolute path to phpDocumentor resource directory (containing the override template set)
1919
REDOCLY_CONFIG="$(pwd)/tools/api_refs/redocly.yaml"; # Absolute path to Redocly configuration file
20+
REDOCLY_TEMPLATE="$(pwd)/tools/api_refs/redocly.hbs"; # Absolute path to Redocly wrapping template
2021

2122
PHP_BINARY="php -d error_reporting=`php -r 'echo E_ALL & ~E_DEPRECATED;'`"; # Avoid depreciation messages from phpDocumentor/Reflection/issues/529 when using PHP 8.2 or higher
2223
TMP_DXP_DIR=/tmp/ibexa-dxp-phpdoc; # Absolute path of the temporary directory in which Ibexa DXP will be installed and the PHP API Reference built
@@ -206,7 +207,7 @@ $PHP_BINARY bin/console ibexa:openapi --yaml \
206207
| sed "s@info:@info:\n x-logo:\n url: 'https://doc.ibexa.co/en/latest/images/ibexa-dxp-logo.png'@" \
207208
> openapi.yaml;
208209
echo 'Build REST Reference… ';
209-
redocly build-docs openapi.yaml --output $REST_API_OUTPUT_FILE --config $REDOCLY_CONFIG;
210+
redocly build-docs openapi.yaml --output $REST_API_OUTPUT_FILE --config $REDOCLY_CONFIG --template $REDOCLY_TEMPLATE;
210211

211212
if [ 1 -eq $FORCE_DXP_INSTALL ]; then
212213
echo 'Remove temporary directory…';

tools/api_refs/redocly.hbs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
<meta charset="utf8" />
6+
<title>{{title}}</title>
7+
<!-- needed for adaptive design -->
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<link rel="icon" href="https://doc.ibexa.co/en/latest/images/favicon.png" />
10+
<style>
11+
body {
12+
padding: 0;
13+
margin: 0;
14+
}
15+
</style>
16+
{{{redocHead}}}
17+
{{#unless disableGoogleFont}}<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">{{/unless}}
18+
</head>
19+
20+
<body>
21+
{{{redocHTML}}}
22+
</body>
23+
24+
</html>

0 commit comments

Comments
 (0)