Skip to content

Restructure backups sidebar #4049

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -1343,7 +1343,18 @@ const sidebars = {
"operations/startup-scripts",
"operations/storing-data",
"operations/allocation-profiling",
"operations/backup",
{
type: "category",
label: "Backup/Restore",
collapsed: true,
collapsible: true,
items: [
{
type: "autogenerated",
dirName: "operations/backup_restore",
}
]
},
"operations/caches",
"operations/workload-scheduling",
"operations/update",
Expand Down
4 changes: 3 additions & 1 deletion src/theme/CodeBlock/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import CodeViewer from "../../components/CodeViewer";


function countLines(text) {
// Handle undefined or null input
if (!text) return 1; // Return 1 as default line count
// Split the string by newline characters
const lines = text.split('\n');
// Return the number of lines
Expand Down Expand Up @@ -36,7 +38,7 @@ function parseMetaString(meta = '') {
export default function CodeBlockWrapper(props) {
const lineHeight = 18.85;
const [isLoaded, setIsLoaded] = useState(false);
const [estimatedHeight, setEstimatedHeight] = useState(countLines(props.children)*lineHeight);
const [estimatedHeight, setEstimatedHeight] = useState(countLines(props.children || '') * lineHeight);
const codeBlockRef = useRef(null);

const handleIntersection = useCallback((entries) => {
Expand Down
Loading