Skip to content

Commit 127b6ce

Browse files
authored
Merge pull request #1141 from stevepiercy/port-training-config
Bring over all the Trainings configuration and tools
2 parents 129a6e9 + c322350 commit 127b6ce

Some content is hidden

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

75 files changed

+3850
-337
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
See our [contributing guidelines](https://training.plone.org/5/contributing/index.html).

.github/workflows/build_deploy.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
2+
name: Build and deploy Plone 6 documentation to 6-dev-docs.plone.org
3+
4+
on:
5+
push:
6+
branches:
7+
- "6-dev"
8+
9+
jobs:
10+
build_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: "3.10"
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -q -r requirements.txt
24+
25+
- name: Run spellcheck
26+
run: make spellcheck
27+
28+
- name: Run linkcheck
29+
run: make linkcheck
30+
31+
# - name: Prepare deploy
32+
# run: make deploy
33+
#
34+
# - name: Deploy to server
35+
# id: deploy
36+
# uses: Pendect/action-rsyncer@v1.1.0
37+
# env:
38+
# DEPLOY_KEY: ${{secrets.DEPLOY_KEY_TRAINING}}
39+
# with:
40+
# flags: '-avzr --delete'
41+
# options: ''
42+
# ssh_options: '-p ${{secrets.DEPLOY_PORT}}'
43+
# src: '_build/html/'
44+
# dest: '${{secrets.DEPLOY_USER_TRAINING}}@${{secrets.DEPLOY_SERVER_TRAINING}}:${{secrets.DEPLOY_PATH_TRAINING}}/5'
45+
#
46+
# - name: Display status from deploy
47+
# run: echo "${{ steps.deploy.outputs.status }}"

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
name: Test Plone 6 documentation
3+
4+
on:
5+
push:
6+
branches-ignore:
7+
- "master"
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: "3.10"
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -q -r requirements.txt
24+
25+
- name: Run tests with make test
26+
run: make test

.gitignore

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
11
# Dependencies
2+
/bin
3+
/include
4+
/lib
25
/node_modules
36

4-
# Production
5-
/build
6-
77
# Generated files
8-
.docusaurus
9-
.cache-loader
10-
11-
# Misc
12-
.DS_Store
13-
.env.local
14-
.env.development.local
15-
.env.test.local
16-
.env.production.local
17-
18-
npm-debug.log*
19-
yarn-debug.log*
20-
yarn-error.log*
8+
package-lock.json
9+
pyvenv.cfg
10+
/_build

.nojekyll

Whitespace-only changes.

Makefile

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
# Makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
PAPER =
8+
DOCS_DIR = ./docs/
9+
BUILDDIR = ../_build/
10+
11+
# Internal variables.
12+
PAPEROPT_a4 = -D latex_paper_size=a4
13+
PAPEROPT_letter = -D latex_paper_size=letter
14+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
15+
# the i18n builder cannot share the environment and doctrees with the others
16+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
17+
18+
19+
# Add the following 'help' target to your Makefile
20+
# And add help text after each target name starting with '\#\#'
21+
.PHONY: help
22+
help: ## This help message
23+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
24+
25+
.PHONY: clean
26+
clean: ## Clean build directory
27+
cd $(DOCS_DIR) && rm -rf $(BUILDDIR)/*
28+
29+
.PHONY: build
30+
build: ## Set up training: Install requirements
31+
python3 -m venv . || virtualenv --clear --python=python3 .
32+
bin/python -m pip install --upgrade pip
33+
bin/pip install -r requirements.txt
34+
@echo
35+
@echo "Please activate your Python virtual environment with"
36+
@echo "source bin/activate"
37+
38+
.PHONY: html
39+
html: ## Build html
40+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
41+
@echo
42+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
43+
44+
.PHONY: manual
45+
manual:
46+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b html -t manual . manual
47+
48+
.PHONY: dirhtml
49+
dirhtml:
50+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
51+
@echo
52+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
53+
54+
.PHONY: singlehtml
55+
singlehtml:
56+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
57+
@echo
58+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
59+
60+
.PHONY: pickle
61+
pickle:
62+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
63+
@echo
64+
@echo "Build finished; now you can process the pickle files."
65+
66+
.PHONY: json
67+
json:
68+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
69+
@echo
70+
@echo "Build finished; now you can process the JSON files."
71+
72+
.PHONY: htmlhelp
73+
htmlhelp:
74+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
75+
@echo
76+
@echo "Build finished; now you can run HTML Help Workshop with the" \
77+
".hhp project file in $(BUILDDIR)/htmlhelp."
78+
79+
.PHONY: qthelp
80+
qthelp:
81+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
82+
@echo
83+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
84+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
85+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/MasteringPlone.qhcp"
86+
@echo "To view the help file:"
87+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/MasteringPlone.qhc"
88+
89+
.PHONY: devhelp
90+
devhelp:
91+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
92+
@echo
93+
@echo "Build finished."
94+
@echo "To view the help file:"
95+
@echo "# mkdir -p $$HOME/.local/share/devhelp/MasteringPlone"
96+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/MasteringPlone"
97+
@echo "# devhelp"
98+
99+
.PHONY: epub
100+
epub:
101+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
102+
@echo
103+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
104+
105+
.PHONY: latex
106+
latex:
107+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
108+
@echo
109+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
110+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
111+
"(use \`make latexpdf' here to do that automatically)."
112+
113+
.PHONY: latexpdf
114+
latexpdf:
115+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
116+
@echo "Running LaTeX files through pdflatex..."
117+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
118+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
119+
120+
.PHONY: text
121+
text:
122+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
123+
@echo
124+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
125+
126+
.PHONY: man
127+
man:
128+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
129+
@echo
130+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
131+
132+
.PHONY: texinfo
133+
texinfo:
134+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
135+
@echo
136+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
137+
@echo "Run \`make' in that directory to run these through makeinfo" \
138+
"(use \`make info' here to do that automatically)."
139+
140+
.PHONY: info
141+
info:
142+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
143+
@echo "Running Texinfo files through makeinfo..."
144+
make -C $(BUILDDIR)/texinfo info
145+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
146+
147+
.PHONY: changes
148+
changes:
149+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
150+
@echo
151+
@echo "The overview file is in $(BUILDDIR)/changes."
152+
153+
.PHONY: linkcheck
154+
linkcheck: ## Run linkcheck
155+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
156+
@echo
157+
@echo "Link check complete; look for any errors in the above output " \
158+
"or in $(BUILDDIR)/linkcheck/ ."
159+
160+
.PHONY: linkcheckbroken
161+
linkcheckbroken: ## Run linkcheck and show only broken links
162+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck | GREP_COLORS='0;31' egrep -wi broken --color=auto
163+
@echo
164+
@echo "Link check complete; look for any errors in the above output " \
165+
"or in $(BUILDDIR)/linkcheck/ ."
166+
167+
.PHONY: spellcheck
168+
spellcheck: ## Run spellcheck
169+
cd $(DOCS_DIR) && LANGUAGE=$* $(SPHINXBUILD) -b spelling -j 4 $(ALLSPHINXOPTS) $(BUILDDIR)/spellcheck/$*
170+
@echo
171+
@echo "Spellcheck is finished; look for any errors in the above output " \
172+
" or in $(BUILDDIR)/spellcheck/ ."
173+
174+
.PHONY: html_meta
175+
html_meta:
176+
python ./docs/addMetaData.py
177+
178+
.PHONY: doctest
179+
doctest:
180+
cd $(DOCS_DIR) && $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
181+
@echo "Testing of doctests in the sources finished, look at the " \
182+
"results in $(BUILDDIR)/doctest/output.txt."
183+
184+
.PHONY: test
185+
test: clean linkcheck spellcheck ## Run linkcheck, spellcheck
186+
187+
.PHONY: deploy
188+
deploy: clean html
189+
190+
.PHONY: livehtml
191+
livehtml: ## Rebuild Sphinx documentation on changes, with live-reload in the browser
192+
cd "$(DOCS_DIR)" && sphinx-autobuild \
193+
--ignore "*.swp" \
194+
-b html . "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
195+
196+
.PHONY: all
197+
all: clean spellcheck linkcheck html ## Run checks and build html

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
11
# Plone 6 Documentation
22

3-
The community is writing best practice guides, installation instructions, and everything you need to know to enjoy working with Plone 6.
3+
This is the repository for Plone 6 Documentation.
4+
5+
Browse the documentation at https://docs.plone.org/.
6+
7+
8+
## Overview
9+
10+
The community is writing best practice guides, reference guides, installation instructions, and everything you need to know to enjoy working with Plone 6.
11+
12+
13+
## Contribute
14+
15+
- [Issue Tracker](https://github.com/plone/documentation/issues)
16+
- [Source Code](https://github.com/plone/documentation)
17+
18+
19+
## Support
20+
21+
If you are having issues, please let us know by opening an issue in our [Issue Tracker](https://github.com/plone/training/issues) or asking a question on our
22+
[Community Space](https://community.plone.org).
23+
24+
25+
## Training
26+
27+
[Training](https://github.com/plone/training) is a collection of different trainings, developed and created by the Plone Community.
28+
29+
For an HTML version, please browse to our [Training Website](https://training.plone.org/5/).
30+
31+
32+
## License
33+
34+
The project is licensed under the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/) by the [Plone Foundation](https://plone.org).

docs/_static/Plone_logo_square.png

30.2 KB
Loading

0 commit comments

Comments
 (0)