Skip to content

Commit 7234c2f

Browse files
authored
docs: small fixes for v1.4.0 (#636)
* docs: fix some broken values in env-vars.md and and improve table formatting * docs: fix page author info by updating fetch-depth in actions/checkout + supress unnecessary warnings in build logs
1 parent e052e37 commit 7234c2f

File tree

4 files changed

+91
-13
lines changed

4 files changed

+91
-13
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
working-directory: docs
2828
steps:
2929
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
3032

3133
- name: Copy OpenAPI spec
3234
run: mkdir -p docs/static && cp api/src/main/resources/rosetta-specifications-1.4.15/api.yaml docs/static/api.yaml

docs/docs/install-and-deploy/env-vars.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ The root folder contains several example `.env` files for different deployment s
2626
**Testing:**
2727
- `.env.IntegrationTest` - Integration tests with yaci devkit
2828

29-
> **Note**: Hardware profile files should be used **in combination** with a base `.env.docker-compose` file to apply performance tuning settings. See the Hardware Profile Variables section below.
29+
:::note
30+
Hardware profile files should be used **in combination** with a base `.env.docker-compose` file to apply performance tuning settings. See the Hardware Profile Variables section below.
31+
:::
3032

3133
## Main Environment Variables
3234

35+
<div class="env-vars-table">
36+
3337
| Variable | Description | Default | Notes |
3438
|-----------------------------------------------|-----------------------------------------------------------------------|----------------------------------------|-------------------------|
3539
| `LOG` | Log level | INFO | added in release 1.0.0 |
@@ -50,14 +54,14 @@ The root folder contains several example `.env` files for different deployment s
5054
| `CARDANO_NODE_SUBMIT_HOST` | Cardano node submit API host | cardano-submit-api | added in release 1.0.0 |
5155
| `NODE_SUBMIT_API_PORT` | Cardano node submit API port | 8090 | added in release 1.0.0 |
5256
| `CARDANO_NODE_DIR` | Cardano node base directory | /node | added in release 1.0.0 |
53-
| `CARDANO_NODE_SOCKET_PATH` | Cardano node socket file path | ${CARDANO_NODE_DIR}/node.socket | added in release 1.0.0 |
57+
| `CARDANO_NODE_SOCKET_PATH` | Cardano node socket file path | /node/node.socket | added in release 1.0.0 |
5458
| `CARDANO_NODE_DB` | Cardano node db path | /node/db | added in release 1.0.0 |
55-
| `CARDANO_CONFIG` | Cardano node config path | ./config/node/${NETWORK} | added in release 1.0.0 |
59+
| `CARDANO_CONFIG` | Cardano node config path | ./config/node/mainnet | added in release 1.0.0 |
5660
| `MITHRIL_VERSION` | Mithril client version | 2524.0 | added in release 1.2.9 |
5761
| `SNAPSHOT_DIGEST` | Mithril snapshot digest | latest | added in release 1.0.0 |
58-
| `AGGREGATOR_ENDPOINT` | Mithril aggregator endpoint (uses default if not set) | | added in release 1.0.0 |
59-
| `GENESIS_VERIFICATION_KEY` | Mithril genesis verification key (uses default if not set) | | added in release 1.0.0 |
60-
| `ANCILLARY_VERIFICATION_KEY` | Mithril ancillary verification key (uses default if not set) | | added in release 1.2.9 |
62+
| `AGGREGATOR_ENDPOINT` | Mithril aggregator endpoint (uses default if not set) | (empty) | added in release 1.0.0 |
63+
| `GENESIS_VERIFICATION_KEY` | Mithril genesis verification key (uses default if not set) | (empty) | added in release 1.0.0 |
64+
| `ANCILLARY_VERIFICATION_KEY` | Mithril ancillary verification key (uses default if not set) | (empty) | added in release 1.2.9 |
6165
| `API_DOCKER_IMAGE_TAG` | Docker Tag for API Image | main | added in release 1.0.0 |
6266
| `API_SPRING_PROFILES_ACTIVE` | API spring profile | staging | added in release 1.0.0 |
6367
| `API_PORT` | Rosetta API exposed port | 8082 | added in release 1.0.0 |
@@ -101,15 +105,19 @@ The root folder contains several example `.env` files for different deployment s
101105
| `POSTGRESQL_EXPORTER_PORT` | PostgreSQL exporter port for Prometheus | 9187 | added in release 1.3.0 |
102106
| `PEER_DISCOVERY` | Enable peer discovery job for automatic peer refreshing | false | added in release 1.3.2 |
103107
| `TOKEN_REGISTRY_ENABLED` | Enable token registry integration for native token metadata | false | added in release 1.4.0 |
104-
| `TOKEN_REGISTRY_BASE_URL` | Base URL for the token registry API | | added in release 1.4.0 |
108+
| `TOKEN_REGISTRY_BASE_URL` | Base URL for the token registry API | (empty) | added in release 1.4.0 |
105109
| `TOKEN_REGISTRY_CACHE_TTL_HOURS` | Cache TTL for token metadata in hours | 12 | added in release 1.4.0 |
106110
| `TOKEN_REGISTRY_LOGO_FETCH` | Enable fetching token logos from registry (increases response size) | false | added in release 1.4.0 |
107111
| `TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDS` | Token registry request timeout in seconds | 2 | added in release 1.4.0 |
108112

113+
</div>
114+
109115
## Hardware Profile Variables
110116

111117
The following variables are available only in hardware profile configuration files (`.env.docker-compose-profile-*-level`).
112118

119+
<div class="env-vars-table">
120+
113121
| Variable | Description | Default (mid-level profile) | Notes |
114122
|-----------------------------------------------|-----------------------------------------------------------------------|----------------------------------------|-------------------------|
115123
| `API_DB_POOL_MIN_COUNT` | Minimum number of connections API↔DB | 150 | added in release 1.2.5 |
@@ -133,10 +141,14 @@ The following variables are available only in hardware profile configuration fil
133141
| `DB_POSTGRES_BGWRITER_DELAY` | Delay between background writer cycles | 200ms | added in release 1.2.5 |
134142
| `DB_POSTGRES_AUTOVACUUM_MAX_WORKERS` | Maximum number of autovacuum workers | 5 | added in release 1.4.0 |
135143

144+
</div>
145+
136146
## Deprecated Environment Variables (Previous Versions)
137147

138148
The following environment variables were available in previous versions but are no longer supported:
139149

150+
<div class="env-vars-table">
151+
140152
| Variable | Description | Default | Notes |
141153
|-----------------------|-----------------------------------------------------------------|--------------------|-----------------------------------------------------------------------------------------------|
142154
| `DB_IMAGE_NAME` | Postgres docker image name | postgres | available in releases 1.0.0 - 1.2.8, replaced by `PG_VERSION_TAG` in 1.2.9 |
@@ -145,3 +157,5 @@ The following environment variables were available in previous versions but are
145157
| `PRUNING_SAFE_BLOCKS` | Number of recent blocks to keep spent UTXOs for (safety margin) | 2160 | available in releases 1.2.4 - 1.2.8, replaced by `REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT` |
146158
| `PRUNING_INTERVAL` | Interval in seconds between pruning cleanup jobs | 600 | available in releases 1.2.4 - 1.2.8, no longer configurable |
147159
| `LIMIT` | Search limit | 100 | available in releases 1.0.0 - 1.3.1, replaced by `SEARCH_LIMIT` in 1.3.2 |
160+
161+
</div>

docs/docusaurus.config.js

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const config = {
5454
'**/_test-results/**', // Exclude directories with underscore prefix
5555
],
5656
},
57+
blog: false, // Disable blog functionality
5758
theme: {
5859
customCss: './src/css/custom.css',
5960
},
@@ -146,7 +147,7 @@ const config = {
146147
{
147148
label: 'API Reference',
148149
route: '/cardano-rosetta-java/api',
149-
150+
150151
configuration: {
151152
url: '/cardano-rosetta-java/api.yaml',
152153
hideDownloadButton: true,
@@ -166,7 +167,7 @@ const config = {
166167
--scalar-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
167168
}
168169
`
169-
170+
170171

171172
},
172173
},
@@ -180,6 +181,49 @@ const config = {
180181
indexPages: true,
181182
},
182183
],
184+
function suppressDrawioSvgWarnings() {
185+
// Store original console methods
186+
const originalWarn = console.warn;
187+
const originalError = console.error;
188+
189+
// Filter function to check if message should be suppressed
190+
// @ts-ignore
191+
const shouldSuppress = (args) => {
192+
const message = args[0]?.toString() || '';
193+
return message.includes('.drawio.svg') ||
194+
message.includes('unsupported file type');
195+
};
196+
197+
return {
198+
name: 'suppress-drawio-svg-warnings',
199+
configureWebpack() {
200+
// Patch console.warn and console.error
201+
console.warn = function(...args) {
202+
if (!shouldSuppress(args)) {
203+
originalWarn.apply(console, args);
204+
}
205+
};
206+
207+
console.error = function(...args) {
208+
if (!shouldSuppress(args)) {
209+
originalError.apply(console, args);
210+
}
211+
};
212+
213+
return {
214+
ignoreWarnings: [
215+
(warning) => {
216+
if (!warning.message) return false;
217+
return (
218+
warning.message.includes('.drawio.svg') ||
219+
warning.message.includes('unsupported file type')
220+
);
221+
},
222+
],
223+
};
224+
},
225+
};
226+
},
183227
],
184228
};
185229

docs/src/css/custom.css

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,8 @@ article th {
876876
letter-spacing: 0.01em;
877877
text-transform: uppercase;
878878
font-size: 0.8rem;
879-
padding: 1rem;
879+
padding: 0.6rem 0.75rem;
880+
line-height: 1.25;
880881
background-color: var(--ifm-table-stripe-background, var(--grey-50));
881882
color: var(--grey-1000);
882883
border: none;
@@ -901,8 +902,8 @@ article tbody tr:hover {
901902
background-color: rgba(0, 0, 0, 0); /* Hovered row remains normal */
902903
}
903904
article td {
904-
padding: 0.9rem 1rem;
905-
line-height: 1.4;
905+
padding: 0.5rem 0.75rem;
906+
line-height: 1.25;
906907
vertical-align: middle;
907908
border: none;
908909
border-top: 1px solid var(--ifm-table-border-color, var(--grey-200));
@@ -928,6 +929,23 @@ article td:nth-child(3) {
928929
font-size: 0.9rem;
929930
}
930931

932+
/* Compact layout for environment variable tables */
933+
.env-vars-table th,
934+
.env-vars-table td {
935+
padding: 0.35rem 0.6rem;
936+
line-height: 1.2;
937+
}
938+
939+
.env-vars-table th:last-child,
940+
.env-vars-table td:last-child {
941+
white-space: normal;
942+
min-width: 0;
943+
}
944+
945+
.env-vars-table td code {
946+
padding: 0.05rem 0.3rem;
947+
}
948+
931949
/* Dark Mode for Tables */
932950
[data-theme='dark'] article table {
933951
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
@@ -1436,4 +1454,4 @@ details.alert--info summary h3 {
14361454
background: rgba(0, 224, 255, 0.07);
14371455
border-left: 2px solid var(--blue-1);
14381456
}
1439-
1457+

0 commit comments

Comments
 (0)