Skip to content

Commit 5757c50

Browse files
authored
code block + typesense persistence (#206)
1 parent 5be2633 commit 5757c50

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

apps/docs/content/postgresql/how-to/manage.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ You can install these tools with a simple one-click import in Zerops:
5151
{
5252
label: 'AdminerEvo',
5353
language: 'yaml',
54-
title: 'Import AdminerEvo to Zerops',
5554
code: `services:
5655
- hostname: adminerevo
5756
type: php-apache@8.3
@@ -61,7 +60,6 @@ You can install these tools with a simple one-click import in Zerops:
6160
{
6261
label: 'phpMyAdmin',
6362
language: 'yaml',
64-
title: 'Import phpMyAdmin to Zerops',
6563
code: `services:
6664
- hostname: phpmyadmin
6765
type: php-apache@8.1+2.4

apps/docs/content/typesense/overview.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ num-collections-parallel-load: 8
2828
2929
These defaults are optimized for most common use cases and managed by the platform. If you need to adjust these settings, please contact us through our [support channels](#support).
3030
31+
### Data Persistence
32+
33+
Typesense data is automatically persisted to disk at `/var/lib/typesense`.
34+
35+
This ensures that data remains intact during service restarts (Typesense automatically reloads the persisted data into memory upon startup).
36+
37+
This persistence mechanism works in both HA and non-HA deployment modes, though with different reliability guarantees as detailed below.
38+
3139
### Deployment Modes
3240

3341
:::warning

apps/docs/src/components/TabbedCodeBlock/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ const TabbedCodeBlocks = ({ tabs, defaultTab }) => {
1919
// Find the currently active tab object
2020
const activeTabData = tabs.find(tab => tab.label === activeTab) || tabs[0];
2121

22+
// Determine title - only use title if it's non-empty
23+
const codeTitle = activeTabData.title ? activeTabData.title : null;
24+
2225
return (
2326
<div className={styles.tabbedCodeContainer}>
2427
<div className={styles.tabsHeader}>
@@ -35,7 +38,7 @@ const TabbedCodeBlocks = ({ tabs, defaultTab }) => {
3538
<div className={styles.codeBlockWrapper}>
3639
<CodeBlock
3740
className={`language-${activeTabData.language || 'yaml'}`}
38-
title={activeTabData.title || activeTabData.label}
41+
title={codeTitle}
3942
>
4043
{activeTabData.code}
4144
</CodeBlock>

apps/docs/src/components/TabbedCodeBlock/styles.module.css

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@
5151
color: var(--ifm-color-danger);
5252
}
5353

54-
.codeHeader {
55-
display: flex;
56-
justify-content: space-between;
57-
align-items: center;
58-
width: 100%;
54+
.tabbedCodeContainer :global(.code-header) {
55+
@apply rounded-tl-none rounded-tr-none border-b-0;
56+
}
57+
58+
.tabbedCodeContainer :global(.language-yaml) {
59+
@apply rounded-tl-none rounded-tr-none border-b-0;
5960
}
6061

6162
.githubLink {

0 commit comments

Comments
 (0)