Skip to content

Commit 28c8b97

Browse files
committed
Merge branch '7.0' into PSMDB-1284-Doc-FCBIS-7.0
2 parents 60dc621 + f13a645 commit 28c8b97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1703
-642
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
steps:
1313
#Pull the latest changes
1414
- name: Chekout code
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616
with:
17-
fetch-depth: 0
17+
fetch-depth: 0 # fetch all commits/branches
1818
#Prepare the env
1919
- name: Set up Python
20-
uses: actions/setup-python@v3
20+
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
2121
with:
2222
python-version: '3.x'
2323

@@ -44,6 +44,5 @@ jobs:
4444
- name: Deploy docs
4545
run: |
4646
mike deploy 7.0 -b publish -p
47-
mike set-default 7.0 -b publish -p
48-
mike retitle 7.0 "7.0 (LATEST)" -b publish -p
47+
mike retitle 7.0 "7.0" -b publish -p
4948

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ __pycache__
77
# Local Netlify folder
88
.netlify
99
site/
10+
.cache/

CONTRIBUTING.md

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You can contribute to documentation in the following ways:
1717

1818
## Contribute to documentation yourself
1919

20-
Percona Distribution for PostgreSQL documentation is written in [Markdown](https://www.markdownguide.org/basic-syntax/) language, so you can
20+
Percona Distribution for MongoDB documentation is written in [Markdown](https://www.markdownguide.org/basic-syntax/) language, so you can
2121
[edit it online via GitHub](#edit-documentation-online-vi-github). If you wish to have more control over the doc process, jump to how to [edit documentation locally](#edit-documentation-locally).
2222

2323
To contribute to the documentation, you should be familiar with the following technologies:
@@ -28,18 +28,15 @@ To contribute to the documentation, you should be familiar with the following te
2828

2929
There are several active versions of the documentation. Each version has a branch in the repository named accordingly:
3030

31-
- 3.6 (EOL)
32-
- 4.0 (EOL)
33-
- 4.2
34-
- 4.4
35-
- 5.0
3631
- 6.0
32+
- 7.0
33+
- 8.0
3734

3835
The .md files are in the ``docs`` directory.
3936

4037
### Edit documentation online via GitHub
4138

42-
1. Click the **Edit this page** link on the sidebar. The source ``.md`` file of the page opens in GitHub editor in your browser. If you havent worked with the repository before, GitHub creates a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of it for you.
39+
1. Click the **Edit this page** link on the sidebar. The source ``.md`` file of the page opens in GitHub editor in your browser. If you haven't worked with the repository before, GitHub creates a [fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) of it for you.
4340

4441
2. Edit the page. You can check your changes on the **Preview** tab.
4542

@@ -49,7 +46,7 @@ The .md files are in the ``docs`` directory.
4946
- Select the **Create a new branch for this commit and start a pull request** option
5047
- Click **Propose changes**.
5148

52-
4. GitHub creates a branch and a commit for your changes. It loads a new page on which you can open a pull request to Percona. The page shows the base branch - the one you offer your changes for, your commit message and a diff - a visual representation of your changes against the original page. This allows you to make a last-minute review. When you are ready, click the **Create pull request** button.
49+
4. GitHub creates a branch and a commit for your changes. It loads a new page on which you can open a pull request to Percona. The page shows the base branch - the one you offer your changes for, your commit message and a diff - a visual representation of your changes against the original page. This allows you to make a last-minute review. When you are ready, click the **Create pull request** button.
5350
5. Someone from our team reviews the pull request and if everything is correct, merges it into the documentation. Then it gets published on the site.
5451

5552
### Edit documentation locally
@@ -119,13 +116,11 @@ docker run --rm -v $(pwd):/docs perconalab/pmm-doc-md mkdocs build
119116
docker run --rm -p 8000:8000 -v $(pwd):/docs perconalab/pmm-doc-md mkdocs serve -a 0.0.0.0:8000
120117
```
121118

122-
5. To create a PDF version of the documentation, run the following command:
119+
Paste the 0.0.0.0:8000 in your browser and you will see the documentation. The page reloads automatically as you make changes.
123120

124-
```sh
125-
docker run --rm -v $(pwd):/docs perconalab/pmm-doc-md mkdocs build -f mkdocs-pdf.yml
126-
```
121+
The doc project also includes a single-page HTML output for a PDF document. It is accessible at the `0.0.0.0:8000/percona-server-for-mongodb/print_page.html`.
127122

128-
The PDF document is in the ``site/pdf`` folder.
123+
Save this page as a PDF. Depending on the browser, you may need to select the Export to PDF, Print - Save as PDF or just Save and select PDF as the output format.
129124

130125
#### Install MkDocs and build locally
131126

@@ -143,34 +138,24 @@ mkdocs build
143138
mkdocs serve
144139
```
145140

146-
6. To build the PDF documentation, do the following:
147-
- Install [mkdocs-with-pdf plugin](https://pypi.org/project/mkdocs-with-pdf/)
148-
- Run the following command
149-
150-
```sh
151-
mkdocs build -f mkdocs-pdf.yml
152-
```
141+
6. To build the PDF documentation, open the `site/print_page.html` in your browser. Save it as PDF. Depending on the browser, you may need to select the Export to PDF, Print - Save as PDF or just Save and select PDF as the output format.
153142

154-
The PDF document is in the ``site/pdf`` folder.
155143

156144
## Repository structure
157145

158146
The repository includes the following directories and files:
159147

160148
- `mkdocs-base.yml` - the base configuration file. It includes general settings and documentation structure.
161149
- `mkdocs.yml` - configuration file. Contains the settings for building the docs with Material theme.
162-
- `mkdocs-pdf.yml` - configuration file. Contains the settings for building the PDF docs.
163150
- `docs`:
164151
- `*.md` - Source markdown files.
165152
- `_images` - Images, logos and favicons
153+
- `_templates` - The template for the PDF cover page
166154
- `css` - Styles
167155
- `js` - Javascript files
168156
- `_resource`:
169-
- `templates`:
170-
- ``styles.scss`` - Styling for PDF documents
171-
- `theme`:
172-
- `main.html` - The layout template for hosting the documentation on Percona website
173-
- overrides - The folder with the Material theme template customization for builds
157+
- overrides - The folder with the Material theme template customization for HTML builds
158+
- `_resourcepdf` - The folder with customized templates for PDF output
174159
- `.github`:
175160
- `workflows`:
176161
- `main.yml` - The workflow configuration for building documentation with a GitHub action. (The documentation is built with `mike` tool to a dedicated `publish` branch)

_resource/overrides/main.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,15 @@
5757
<div class="md-sidebar__inner">
5858
{% include "partials/toc.html" %}
5959
</div>
60+
<div class="md-sidebar__inner">
61+
{% include "partials/banner.html" %}
62+
</div>
6063
</div>
6164
</div>
6265
{% endif %}
6366
{% endblock %}
6467

68+
6569
{% block content%}
6670

6771
{{ super() }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<div data-banner="data-banner">
2+
<p><svg style="display:block;margin:-1em 0 0.75em" width="78" height="69" viewBox="0 0 78 69" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M56.7281 30.7666C62.6528 26.8938 64.5914 18.9942 61.0059 12.7854C59.2094 9.67113 56.3053 7.44082 52.8311 6.50951C49.6122 5.64535 46.2502 5.99872 43.2912 7.49366L39.251 0.5L30.8648 15.0245L11.4811 48.5937H67.021L56.7281 30.7666ZM51.881 10.0674C54.4064 10.7401 56.5079 12.3616 57.8168 14.6194C60.3895 19.0701 59.053 24.7153 54.8808 27.5665L45.1362 10.6905C47.2355 9.68104 49.6034 9.46087 51.881 10.0674ZM39.251 7.87125L60.6339 44.907H48.1228L32.9927 18.7102L39.2499 7.87235L39.251 7.87125ZM17.8682 44.907L30.8637 22.4035L43.8592 44.907H17.8682Z" fill="url(#paint0_linear_2899_1968)"></path><path style="fill:var(--md-typeset-color)" d="M4.981 64.943H3.157V68.207H.756V57.323H5.217C7.822 57.323 9.397 58.861 9.397 61.086V61.116C9.397 63.635 7.433 64.94 4.984 64.94L4.981 64.943V64.943ZM6.961 61.134C6.961 60.061 6.213 59.485 5.011 59.485H3.154V62.812H5.056C6.258 62.812 6.958 62.096 6.958 61.163V61.134H6.961ZM10.738 68.208V57.323H18.973V59.455H13.124V61.664H18.27V63.796H13.124V66.082H19.051V68.214H10.738V68.208 68.208ZM27.557 68.208 25.218 64.726H23.332V68.208H20.931V57.323H25.921C28.496 57.323 30.039 58.677 30.039 60.915V60.945C30.039 62.702 29.088 63.807 27.7 64.32L30.367 68.207H27.556L27.557 68.208ZM27.605 61.041C27.605 60.016 26.887 59.485 25.719 59.485H23.333V62.61H25.767C26.936 62.61 27.605 61.987 27.605 61.071V61.042 61.041ZM36.922 68.499C33.668 68.499 31.249 65.994 31.249 62.825V62.795C31.249 59.659 33.619 57.091 37.019 57.091 39.105 57.091 40.356 57.783 41.383 58.792L39.834 60.571C38.98 59.798 38.113 59.327 37.004 59.327 35.141 59.327 33.795 60.871 33.795 62.762V62.793C33.795 64.684 35.107 66.257 37.004 66.257 38.268 66.257 39.043 65.753 39.913 64.964L41.462 66.524C40.322 67.738 39.059 68.493 36.925 68.493L36.922 68.499ZM47.885 68.499C44.47 68.499 42.021 65.962 42.021 62.825V62.795C42.021 59.659 44.503 57.091 47.915 57.091 51.327 57.091 53.779 59.628 53.779 62.765V62.795C53.779 65.931 51.297 68.499 47.885 68.499ZM51.237 62.795C51.237 60.904 49.846 59.331 47.885 59.331 45.925 59.331 44.567 60.874 44.567 62.766V62.796C44.567 64.688 45.959 66.261 47.919 66.261 49.879 66.261 51.237 64.717 51.237 62.826V62.795 62.795ZM67.001 68.217 72.374 57.091 77.746 68.218H75.052L72.374 62.681 69.705 68.218H67.001V68.217ZM66.007 57.327V68.5L57.813 61.884V68.199H55.264V57.091L63.458 63.681V57.327H66.007Z"></path><defs><linearGradient id="paint0_linear_2899_1968" x1="18.1513" y1="44.7152" x2="61.4356" y2="20.9786" gradientUnits="userSpaceOnUse"><stop stop-color="#FC3519"></stop><stop offset="1" stop-color="#F0D136"></stop></linearGradient></defs></svg></p>
3+
<p>For help, click the link below to get free database assistance or contact our experts for personalized support.</p>
4+
5+
<div class="actions">
6+
7+
<a href="https://docs.percona.com/percona-server-for-mongodb/7.0/get-help.html" style="color: var(--md-typeset-a-color);">Get help from Percona</a>
8+
</div>
9+
</div>

_resource/overrides/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<path d="m7.825 13 5.6 5.6L12 20l-8-8 8-8 1.425 1.4-5.6 5.6H20v2H7.825Z"/>
4444
</g>
4545
</svg>
46-
<span>Percona Documentation</span>
46+
<span>Percona Software for MongoDB Documentation</span>
4747
</a>
4848
</div>
4949
</div>
Lines changed: 40 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading

_resourcepdf/overrides/404.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{#-
2+
This file was automatically generated - do not edit
3+
-#}
4+
{% extends "main.html" %}
5+
{% block content %}
6+
<h1>404 - Not found</h1>
7+
<p>
8+
We can't find the page you are looking for. Try using the Search or <a href= "{{ config.extra.homepage | d(nav.homepage.url, true) | url }}"> return to homepage </a>. </p>
9+
{% endblock %}

_resourcepdf/overrides/main.html

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
{#
2+
MkDocs template for builds with Material Theme to customize docs layout
3+
by adding marketing-requested elements
4+
#}
5+
6+
{% extends "base.html" %}
7+
8+
{% block scripts %}
9+
<script src="https://cmp.osano.com/Azqe5vTyLOSbN3OuT/49ad85b5-0418-4794-ab81-7599dddd534c/osano.js"></script>
10+
{{ super() }}
11+
{% endblock %}
12+
13+
{% block extrahead %}
14+
{{ super() }}
15+
{% set title = config.site_name %}
16+
{% if page and page.meta and page.meta.title %}
17+
{% set title = title ~ " - " ~ page.meta.title %}
18+
{% elif page and page.title and not page.is_homepage %}
19+
{% set title = title ~ " - " ~ page.title %}
20+
{% endif %}
21+
22+
<meta property="og:type" content="website" />
23+
<meta property="og:title" content="{{ title }}" />
24+
<meta property="og:image" content="https://docs.percona.com/percona-server-for-mongodb/7.0/_images/mongodb.png">
25+
<meta property="og:url" content="https://docs.percona.com/percona-server-for-mongodb/">
26+
</head>
27+
<body>
28+
</body>
29+
30+
{% endblock %}
31+
32+
{% block site_nav %}
33+
{% if nav %}
34+
{% if page.meta and page.meta.hide %}
35+
{% set hidden = "hidden" if "navigation" in page.meta.hide %}
36+
{% endif %}
37+
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" {{ hidden }}>
38+
<div class="md-sidebar__scrollwrap">
39+
<div class="md-sidebar__inner">
40+
{% include "partials/nav.html" %}
41+
<br>
42+
<label class="md-nav__title" for="__drawer">
43+
<a href="https://learn.percona.com/download-percona-server-mongodb-7-0-manual" onclick="_gaq.push(['b._trackEvent', 'Percona Server for MongoDB 6.0', 'Download', 'Download Manual Server for MongoDB 6.0']);" class="md-nav__link md-nav__link--active" style="font-size: .7rem;">
44+
Download PDF
45+
</a>
46+
</label>
47+
</div>
48+
</div>
49+
</div>
50+
{% endif %}
51+
{% if "toc.integrate" not in features %}
52+
{% if page.meta and page.meta.hide %}
53+
{% set hidden = "hidden" if "toc" in page.meta.hide %}
54+
{% endif %}
55+
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" {{ hidden }}>
56+
<div class="md-sidebar__scrollwrap">
57+
<div class="md-sidebar__inner">
58+
{% include "partials/toc.html" %}
59+
</div>
60+
<div class="md-sidebar__inner">
61+
{% include "partials/banner.html" %}
62+
</div>
63+
</div>
64+
</div>
65+
{% endif %}
66+
{% endblock %}
67+
68+
69+
{% block content%}
70+
71+
{{ super() }}
72+
73+
<script>
74+
window.addEventListener('beforeprint', (event) => {
75+
for (const detailEl of document.querySelectorAll('details')) {
76+
if (detailEl.getAttribute('open') == null) {
77+
detailEl.setAttribute('data-was-closed', 'true')
78+
}
79+
detailEl.setAttribute('open', '')
80+
}
81+
})
82+
window.addEventListener('afterprint', (event) => {
83+
for (const detailEl of document.querySelectorAll('details')) {
84+
if (detailEl.getAttribute('data-was-closed') != null) {
85+
detailEl.removeAttribute('data-was-closed')
86+
detailEl.removeAttribute('open')
87+
}
88+
}
89+
})
90+
</script>
91+
92+
<script>
93+
!function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset isFeatureEnabled onFeatureFlags getFeatureFlag getFeatureFlagPayload reloadFeatureFlags group updateEarlyAccessFeatureEnrollment getEarlyAccessFeatures getActiveMatchingSurveys getSurveys onSessionId".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
94+
posthog.init('phc_7unoI9J6Fm0SMrfDp35xNOpCRTkOAibbffQwdGWbHnL',{api_host:'https://eu.posthog.com'})
95+
</script>
96+
97+
{% endblock %}
98+

0 commit comments

Comments
 (0)