Skip to content

Commit

Permalink
[Docs] Upgrade Go, Hugo, Docsy and Node dependencies (#22646)
Browse files Browse the repository at this point in the history
* Upgrade Go, Hugo, and Docsy

* Fixing issues with Bootstrap 5

* Hugo render hook for headings and change tab param in shortcodes

* Upgrade Node packages

* Renamed config.toml to hugo.toml

* Replace params.algolia_docsearch deprecated config

* Fix similar release version number issue

* Hide header image if not exist

* Replace data-toggle with data-bs-toggle for Bootstrap 5 in shortcodes

* Replace data-toggle with data-bs-toggle for Bootstrap 5 in content

* Add lead SCSS back

* Add style removed mistakenly

* Fix tab active on product-tabs shortcode

* Replace data-toggle with data-bs-toggle in stable and v2.20 versions
  • Loading branch information
samiahmedsiddiqui committed Jul 9, 2024
1 parent facf639 commit 9363f0b
Show file tree
Hide file tree
Showing 191 changed files with 3,077 additions and 10,325 deletions.
20 changes: 17 additions & 3 deletions docs/assets/scss/_code_block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ main {
> pre,
.highlight {
margin: 20px 0;
position: relative;
display: flex;
flex-direction: column;
min-width: 0;
word-wrap: break-word;
background-color: #fff;
background-clip: border-box;
border: 1px solid rgba(0, 0, 0, .125);
border-radius: .25rem;
}

li > p + pre,
Expand All @@ -90,6 +99,7 @@ main {
background: transparent !important;
padding: 0 !important;
margin: 0;
border: 0;
position: relative !important;
overflow-y: auto;
overflow-x: visible;
Expand Down Expand Up @@ -117,11 +127,11 @@ main {
overflow: auto;
scrollbar-width: thin;

&:only-child {
&:nth-child(2):last-child {
padding: 11px 15px;
}

&:not(:only-child) {
&:not(:last-child) {
> span > span {
padding-right: 40px;
}
Expand All @@ -140,7 +150,6 @@ main {

.highlight {
margin-bottom: 20px !important;

> pre {
margin-top: 1rem;
margin-bottom: 1rem;
Expand Down Expand Up @@ -232,6 +241,7 @@ main {
pre.can-be-copied {
width: calc(100% + 20px);
padding-right: 20px !important;
border: 0;
max-width: none;
min-height: 85px;

Expand All @@ -252,6 +262,10 @@ main {
border-radius: 5px;
}

.click-to-copy {
display: none;
}

button.copy {
right: 27px;

Expand Down
32 changes: 18 additions & 14 deletions docs/assets/scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1125,22 +1125,26 @@ body {
}
}

body>header .td-navbar.navbar-expand .page-header .navbar-nav form .td-search-input::-webkit-input-placeholder,
body>header .td-navbar.navbar-expand .top-nav .navbar-nav form .td-search-input::-webkit-input-placeholder{
width:98%
body > header .td-navbar.navbar-expand .page-header .navbar-nav form .td-search-input::-webkit-input-placeholder,
body > header .td-navbar.navbar-expand .top-nav .navbar-nav form .td-search-input::-webkit-input-placeholder {
width: 98%;
}

@media (max-width: 1129px) {
body>header .td-navbar.navbar-expand .page-header .navbar-nav form .td-search-input,
body>header .td-navbar.navbar-expand .top-nav .navbar-nav form .td-search-input {
width: 185px !important;
text-indent: 33px;
}
body > header .td-navbar.navbar-expand .page-header .navbar-nav form .td-search-input,
body > header .td-navbar.navbar-expand .top-nav .navbar-nav form .td-search-input {
width: 185px !important;
text-indent: 33px;
}
}
@media(max-width:1042px) AND (min-width:992px){
body>header .td-navbar.navbar-expand .page-header .navbar-nav.right-nav li,
body>header .td-navbar.navbar-expand .top-nav .navbar-nav.right-nav li {
margin-right: 0px;
}
body .tritiery-btn:not(.btn-priority) { padding: 0 8px 0 5px;}

@media(max-width:1042px) AND (min-width:992px) {
body > header .td-navbar.navbar-expand .page-header .navbar-nav.right-nav li,
body > header .td-navbar.navbar-expand .top-nav .navbar-nav.right-nav li {
margin-right: 0px;
}

body .tritiery-btn:not(.btn-priority) {
padding: 0 8px 0 5px;
}
}
8 changes: 5 additions & 3 deletions docs/assets/scss/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,10 @@ body.td-searchpage .td-content {
width: 280px !important;
}
}

@media (max-width: 767px) {
body>header .td-navbar.navbar-expand .page-header .navbar-nav form .td-search-input, body>header .td-navbar.navbar-expand .top-nav .navbar-nav form .td-search-input {
width: 100% !important;
}
body > header .td-navbar.navbar-expand .page-header .navbar-nav form .td-search-input,
body > header .td-navbar.navbar-expand .top-nav .navbar-nav form .td-search-input {
width: 100% !important;
}
}
47 changes: 45 additions & 2 deletions docs/assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Font Awesome Pro
// Font Awesome Pro 6
@import "../vendor/Font-Awesome-Pro/scss/fontawesome.scss";
@import "../vendor/Font-Awesome-Pro/scss/brands.scss";
@import "../vendor/Font-Awesome-Pro/scss/duotone.scss";
Expand Down Expand Up @@ -46,6 +46,45 @@ html {
-moz-osx-font-smoothing: grayscale;
}

a {
color: #3176d9;
text-decoration: none;
background-color: transparent;
}

.tab-body {
color: inherit;
}

.tab-body > :last-child {
margin-bottom: inherit;
}
.td-content {
.highlight {
.click-to-copy {
display: none;
}
}
}

.dropdown-list .dropdown-menu[data-popper-placement="top-start"] {
margin-bottom: -2px !important;
}

.dropdown-list .dropdown-menu[data-popper-placement="bottom-start"] {
margin-top: -1px !important;
}

.navbar-expand > .container,
.navbar-expand > .container-fluid,
.navbar-expand > .container-sm,
.navbar-expand > .container-md,
.navbar-expand > .container-lg,
.navbar-expand > .container-xl {
padding-right: 0;
padding-left: 0;
}

/******* Variables for Color Theme Switcher **********/
:root {
--theme-color: #312965;
Expand Down Expand Up @@ -75,10 +114,14 @@ html {

.breadcrumb-item {
font-size: 12px;
line-height: 28px;
line-height: 22px;
display: flex;
align-items: center;

&.active {
color: #4e5f6d;
}

&:only-child {
visibility: hidden;
}
Expand Down
23 changes: 21 additions & 2 deletions docs/assets/scss/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ main {
margin: 0 !important;
border: none;
box-shadow: none;
display: table;

@media (max-width:900px) {
min-width:650px;
Expand Down Expand Up @@ -40,6 +41,24 @@ main {
}
}

.table > :not(caption) > * > *,
.td-table:not(.td-initial) > :not(caption) > * > *,
.td-content table:not(.td-initial) > :not(caption) > * > *,
.td-box table:not(.td-initial) > :not(caption) > * > *{
padding: 12.75px 15px;
}

.table-striped > tbody > tr:nth-of-type(odd) > *,
.td-table:not(.td-initial) > tbody > tr:nth-of-type(odd) > *,
.td-content table:not(.td-initial) > tbody > tr:nth-of-type(odd) > *,
.td-box table:not(.td-initial) > tbody > tr:nth-of-type(odd) > * {
--bs-table-bg-type: #fbfcfd;
color: #25323d;
background-color: transparent;
border-width: 0;
}


table {
box-shadow: 0 0 0 1px #e9eef2;
border-radius: 6px;
Expand Down Expand Up @@ -150,7 +169,7 @@ main {
border-width: 0;
font-family: 'Inter';
font-style: normal;
color: #4e5f6d;
color: #4e5f6d!important;
text-transform: uppercase;
font-weight: 600;
font-size: 12px;
Expand All @@ -166,7 +185,7 @@ main {
font-size: 14px;
line-height: 26px;
color: #4e5f6d;
padding: 11.5px 16px;
padding: 11.5px 16px!important;
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions docs/assets/scss/_yb_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ body {
background: #5d5fef;
color: #fff;
}

&[data-bs-toggle="tab"]:hover {
background: inherit;
}
}

.secondary-btn:not(.btn-priority) {
Expand Down
5 changes: 5 additions & 0 deletions docs/assets/scss/_yb_container.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ html {
}

/******* Container Styling **********/
.row {
margin-left: -15px;
margin-right: -15px;
}

.left-menu-scrolling .td-main {
aside.td-sidebar .left-sidebar-wrap {
transition: none !important;
Expand Down
14 changes: 14 additions & 0 deletions docs/assets/scss/_yb_headings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,17 @@
}
}
}

.td-heading-self-link:before {
content: "";
background: url(/icons/heading-link.svg) 50% no-repeat;
height: 15px;
width: 15px;
display: inline-block;
}

@media (hover: none) and (pointer: coarse), (max-width: 576px) {
.td-heading-self-link {
visibility: hidden;
}
}
File renamed without changes.
6 changes: 4 additions & 2 deletions docs/config/_default/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ author = "Team Yugabyte"
description = "YugabyteDB, the transactional, high-performance database for building internet-scale, globally-distributed apps."
copyright = "Yugabyte, Inc."
privacy_policy = "https://www.yugabyte.com/privacy-policy/"
algolia_docsearch = true
algolia_sequence_expressions = true
kapa_ai = true
drift_snippet = true
search_banner = true
Expand All @@ -13,6 +11,10 @@ version_menu = "Releases"
# versions from the dropdown menu.
version_menu_pagelinks = true

[search]
algolia_docsearch = true
algolia_sequence_expressions = true

[path_base_for_github_subdir]
from = "content/en/(.*?)/"
to = "content/$1/"
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -146,28 +146,28 @@ The corresponding code for this widget is as follows. Note that the actual conte
```html
<ul class="nav nav-tabs-alt nav-tabs-yb">
<li >
<a href="#macos" class="nav-link active" id="macos-tab" data-toggle="tab"
<a href="#macos" class="nav-link active" id="macos-tab" data-bs-toggle="tab"
role="tab" aria-controls="macos" aria-selected="true">
<i class="fa-brands fa-apple" aria-hidden="true"></i>
macOS
</a>
</li>
<li>
<a href="#linux" class="nav-link" id="linux-tab" data-toggle="tab"
<a href="#linux" class="nav-link" id="linux-tab" data-bs-toggle="tab"
role="tab" aria-controls="linux" aria-selected="false">
<i class="fa-brands fa-linux" aria-hidden="true"></i>
Linux
</a>
</li>
<li>
<a href="#docker" class="nav-link" id="docker-tab" data-toggle="tab"
<a href="#docker" class="nav-link" id="docker-tab" data-bs-toggle="tab"
role="tab" aria-controls="docker" aria-selected="false">
<i class="fa-brands fa-docker" aria-hidden="true"></i>
Docker
</a>
</li>
<li >
<a href="#kubernetes" class="nav-link" id="kubernetes-tab" data-toggle="tab"
<a href="#kubernetes" class="nav-link" id="kubernetes-tab" data-bs-toggle="tab"
role="tab" aria-controls="kubernetes" aria-selected="false">
<i class="fa-regular fa-dharmachakra" aria-hidden="true"></i>
Kubernetes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ If there are multiple databases in the same cluster, do PITR on all the database

<ul class="nav nav-tabs-alt nav-tabs-yb custom-tabs">
<li>
<a href="#local" class="nav-link active" id="local-tab" data-toggle="tab"
<a href="#local" class="nav-link active" id="local-tab" data-bs-toggle="tab"
role="tab" aria-controls="local" aria-selected="true">
<img src="/icons/database.svg" alt="Server Icon">
Local
</a>
</li>
<li>
<a href="#anywhere" class="nav-link" id="anywhere-tab" data-toggle="tab"
<a href="#anywhere" class="nav-link" id="anywhere-tab" data-bs-toggle="tab"
role="tab" aria-controls="anywhere" aria-selected="false">
<img src="/icons/server.svg" alt="Server Icon">
YugabyteDB Anywhere
Expand All @@ -104,7 +104,7 @@ To do a PITR on a database:
./bin/yb-admin \
-master_addresses <standby_master_addresses> \
-certs_dir_name <cert_dir> \
list_snapshot_schedules
list_snapshot_schedules
```

Expect output similar to the following:
Expand Down Expand Up @@ -262,14 +262,14 @@ If universe A is brought back, to bring A into sync with B and set up replicatio
<ul class="nav nav-tabs-alt nav-tabs-yb custom-tabs">
<li>
<a href="#localreverse" class="nav-link active" id="local-tab" data-toggle="tab"
<a href="#localreverse" class="nav-link active" id="local-tab" data-bs-toggle="tab"
role="tab" aria-controls="local" aria-selected="true">
<img src="/icons/database.svg" alt="Server Icon">
Local
</a>
</li>
<li>
<a href="#anywherereverse" class="nav-link" id="anywhere-tab" data-toggle="tab"
<a href="#anywherereverse" class="nav-link" id="anywhere-tab" data-bs-toggle="tab"
role="tab" aria-controls="anywhere" aria-selected="false">
<img src="/icons/server.svg" alt="Server Icon">
YugabyteDB Anywhere
Expand Down
Loading

0 comments on commit 9363f0b

Please sign in to comment.