mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-03 20:00:20 +03:00
adds ability to override default font family
This commit is contained in:
parent
d4cd6f7fbd
commit
68ada43409
|
@ -30,6 +30,7 @@ ENV BASE_PATH=
|
||||||
ENV SPEC_URL="http://petstore.swagger.io/v2/swagger.json"
|
ENV SPEC_URL="http://petstore.swagger.io/v2/swagger.json"
|
||||||
ENV PORT=80
|
ENV PORT=80
|
||||||
ENV REDOC_OPTIONS=
|
ENV REDOC_OPTIONS=
|
||||||
|
ENV FONT_FAMILY_URL="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
|
||||||
|
|
||||||
# copy files to the nginx folder
|
# copy files to the nginx folder
|
||||||
COPY --from=0 build/bundles /usr/share/nginx/html
|
COPY --from=0 build/bundles /usr/share/nginx/html
|
||||||
|
|
|
@ -49,6 +49,7 @@ Another issue with OpenShift is that the default exposed port `80` cannot be use
|
||||||
- `SPEC_URL` (default `"http://petstore.swagger.io/v2/swagger.json"`) - URL to spec
|
- `SPEC_URL` (default `"http://petstore.swagger.io/v2/swagger.json"`) - URL to spec
|
||||||
- `PORT` (default `80`) - nginx port
|
- `PORT` (default `80`) - nginx port
|
||||||
- `REDOC_OPTIONS` (optional) - [`<redoc>` tag attributes](https://github.com/Redocly/redoc#redoc-tag-attributes)
|
- `REDOC_OPTIONS` (optional) - [`<redoc>` tag attributes](https://github.com/Redocly/redoc#redoc-tag-attributes)
|
||||||
|
- `FONT_FAMILY_URL` (default `"https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"`) - URL to font family
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ sed -i -e "s|%PAGE_FAVICON%|$PAGE_FAVICON|g" /usr/share/nginx/html/index.html
|
||||||
sed -i -e "s|%BASE_PATH%|$BASE_PATH|g" /usr/share/nginx/html/index.html
|
sed -i -e "s|%BASE_PATH%|$BASE_PATH|g" /usr/share/nginx/html/index.html
|
||||||
sed -i -e "s|%SPEC_URL%|$SPEC_URL|g" /usr/share/nginx/html/index.html
|
sed -i -e "s|%SPEC_URL%|$SPEC_URL|g" /usr/share/nginx/html/index.html
|
||||||
sed -i -e "s|%REDOC_OPTIONS%|${REDOC_OPTIONS}|g" /usr/share/nginx/html/index.html
|
sed -i -e "s|%REDOC_OPTIONS%|${REDOC_OPTIONS}|g" /usr/share/nginx/html/index.html
|
||||||
|
sed -i -e "s|%FONT_FAMILY_URL%|${FONT_FAMILY_URL}|g" /usr/share/nginx/html/index.html
|
||||||
sed -i -e "s|\(listen\s*\) [0-9]*|\1 ${PORT}|g" /etc/nginx/nginx.conf
|
sed -i -e "s|\(listen\s*\) [0-9]*|\1 ${PORT}|g" /etc/nginx/nginx.conf
|
||||||
|
|
||||||
exec nginx -g 'daemon off;'
|
exec nginx -g 'daemon off;'
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<link
|
<link
|
||||||
href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700"
|
href="%FONT_FAMILY_URL%"
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
/>
|
/>
|
||||||
</head>
|
</head>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user