Skip to content

Commit 5cf966f

Browse files
authored
Merge branch '6-dev' into portlets
2 parents c0b621e + 5fcac20 commit 5cf966f

38 files changed

+416
-168
lines changed

.github/workflows/build_deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
pip install -q -r requirements.txt
2323
pip freeze
2424
25-
# - name: Run spellcheck
26-
# run: make spellcheck
25+
# - name: Run Vale
26+
# run: make vale
2727

2828
# - name: Run linkcheck
2929
# run: make linkcheck

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ jobs:
2020
run: |
2121
python -m pip install --upgrade pip
2222
pip install -q -r requirements.txt
23+
sudo snap install --edge vale
2324
2425
- name: Run tests with make test
2526
run: make test
27+
28+
- name: Run vale
29+
run: |
30+
git clone https://github.com/errata-ai/Microsoft.git
31+
cp -r ./Microsoft/Microsoft ./styles
32+
VALEFILES=$(find -L ./docs/ -type d \( -path "./docs/plone.restapi/lib/*" -o -path "./docs/plone.restapi/performance/*" \) -prune -false -o -type f -name "*.md" -print)
33+
vale --no-exit $VALEFILES

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Generated files
88
pyvenv.cfg
99
/_build
10+
/styles/Microsoft
1011

1112
# symlinked from submodule
1213
docs/volto

.vale.ini

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
StylesPath = styles
2+
3+
MinAlertLevel = suggestion
4+
5+
Vocab = Base,Plone
6+
7+
Packages = Microsoft
8+
9+
[*]
10+
BasedOnStyles = Vale, Microsoft

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ PAPEROPT_letter = -D latex_paper_size=letter
1616
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1717
# the i18n builder cannot share the environment and doctrees with the others
1818
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19-
19+
VALEFILES := $(shell find -L $(DOCS_DIR) -type d \( -path $(DOCS_DIR)/plone.restapi/lib/* -o -path $(DOCS_DIR)"/plone.restapi/performance/*" \) -prune -false -o -type f -name "*.md" -print)
2020

2121
# Add the following 'help' target to your Makefile
2222
# And add help text after each target name starting with '\#\#'
@@ -189,17 +189,17 @@ linkcheck: deps ## Run linkcheck
189189

190190
.PHONY: linkcheckbroken
191191
linkcheckbroken: deps ## Run linkcheck and show only broken links
192-
cd $(DOCS_DIR) && $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | GREP_COLORS='0;31' grep -wi "broken\|redirect" --color=auto || test $$? = 1
192+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | grep -wi "broken\|redirect" | GREP_COLORS='0;31' grep -vi "https://github.com/plone/volto/issues/" --color=auto || test $$? = 1
193193
@echo
194194
@echo "Link check complete; look for any errors in the above output " \
195195
"or in $(BUILDDIR)/linkcheck/ ."
196196

197-
.PHONY: spellcheck
198-
spellcheck: deps ## Run spellcheck
199-
cd $(DOCS_DIR) && LANGUAGE=$* $(SPHINXBUILD) -b spelling -j 4 $(ALLSPHINXOPTS) $(BUILDDIR)/spellcheck/$*
197+
.PHONY: vale
198+
vale: deps ## Run Vale style, grammar, and spell checks
199+
vale sync
200+
vale --no-wrap $(VALEFILES)
200201
@echo
201-
@echo "Spellcheck is finished; look for any errors in the above output " \
202-
" or in $(BUILDDIR)/spellcheck/ ."
202+
@echo "Vale is finished; look for any errors in the above output."
203203

204204
.PHONY: html_meta
205205
html_meta: deps ## Add meta data headers to all Markdown pages
@@ -212,7 +212,7 @@ doctest: deps
212212
"results in $(BUILDDIR)/doctest/output.txt."
213213

214214
.PHONY: test
215-
test: clean linkcheckbroken spellcheck ## Clean docs build, then run linkcheckbroken, spellcheck
215+
test: clean linkcheckbroken ## Clean docs build, then run linkcheckbroken
216216

217217
.PHONY: deploy
218218
deploy: clean html
@@ -241,4 +241,4 @@ storybook:
241241
cd submodules/volto && yarn && yarn build-storybook -o ../../_build/html/storybook
242242

243243
.PHONY: all
244-
all: clean spellcheck linkcheck html ## Clean docs build, then run linkcheck and spellcheck, and build html
244+
all: clean vale linkcheck html ## Clean docs build, then run vale and linkcheck, and build html

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ This is the repository for Plone Documentation.
77

88
## Plone 6
99

10-
Browse the Plone 6 Documentation at https://6.dev-docs.plone.org/.
10+
Browse the Plone 6 Documentation at https://6.docs.plone.org/.
1111

1212
Active development on the Plone 6 Documentation takes place on the branch [`6-dev`](https://github.com/plone/documentation/tree/6-dev).
1313

1414

1515
## Plone 5.2
1616

17-
Browse the Plone 5.2 Documentation at https://docs.plone.org/.
17+
Browse the Plone 5.2 Documentation at https://5.docs.plone.org/.
1818

1919
Development on the Plone 5.2 Documentation takes place on the branch [`5.2`](https://github.com/plone/documentation/tree/5.2).
2020

2121

2222
## Contribute
2323

24-
- [Contributing to Plone 6 Documentation](https://6.dev-docs.plone.org/contributing/index.html)
24+
- [Contributing to Plone 6 Documentation](https://6.docs.plone.org/contributing/index.html)
2525
- [Release Plone 6 docs Project Board](https://github.com/orgs/plone/projects/12)
2626
- [Issue Tracker](https://github.com/plone/documentation/issues)
2727
- [Source Code](https://github.com/plone/documentation/tree/6-dev)
@@ -37,7 +37,7 @@ Those packages include:
3737
- [`plone.restapi`](https://github.com/plone/plone.restapi)
3838

3939
To contribute documentation, please open a pull request in the appropriate repository.
40-
For details, see [Editing external package documentation](https://6.dev-docs.plone.org/contributing/index.html#contributing-editing-external-package-documentation-label).
40+
For details, see [Editing external package documentation](https://6.docs.plone.org/contributing/index.html#contributing-editing-external-package-documentation-label).
4141

4242

4343
## Support
93 KB
Loading

docs/_static/switcher.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[
2+
{
3+
"name": "6 (stable)",
4+
"version": "6.0",
5+
"url": "https://6.docs.plone.org/"
6+
},
7+
{
8+
"version": "5",
9+
"url": "https://5.docs.plone.org/"
10+
},
11+
{
12+
"version": "4",
13+
"url": "https://4.docs.plone.org/"
14+
},
15+
{
16+
"version": "3",
17+
"url": "https://3.docs.plone.org/"
18+
}
19+
]

docs/_templates/404.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{% extends "!page.html" %}
2+
3+
{%- block htmltitle %}
4+
<title>{{ title|striptags|e }}{%- for parent in parents %} – {{ parent.title }}{%- endfor %}{{ titlesuffix }}</title>
5+
{%- endblock %}
6+
7+
{% block body %}
8+
<div>
9+
<h1>Page not found</h1>
10+
<p>Unfortunately we couldn't find the content you were looking for.</p>
11+
</div>
12+
13+
<style>
14+
/* Hide empty sub menu. */
15+
.sticky-top .bd-toc {
16+
visibility: hidden;
17+
}
18+
</style>
19+
{% endblock %}

docs/_templates/page.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
<title>{{ title|striptags|e }}{%- for parent in parents %} – {{ parent.title }}{%- endfor %}{{ titlesuffix }}</title>
55
{%- endblock %}
66

7+
78
{% block footer %}
89
<script type="text/javascript">
910
$(document).ready(function() {
1011
// Hide empty sub menu.
11-
if ($.trim($(".topbar-contents .bd-toc").html()) === "") {
12-
$(".topbar-contents .bd-toc").css("visibility", "hidden");
12+
if ($.trim($(".sticky-top .bd-toc").html()) === "") {
13+
$(".sticky-top .bd-toc").css("visibility", "hidden");
1314
}
1415
});
1516
</script>

0 commit comments

Comments
 (0)