Skip to content

Commit b410f13

Browse files
Update documentation
1 parent 9feea7f commit b410f13

16 files changed

+88
-67
lines changed

.vscode/extensions.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"recommendations": [
3-
"lextudio.restructuredtext",
43
"trond-snekvik.simple-rst",
54
"streetsidesoftware.code-spell-checker",
6-
"streetsidesoftware.code-spell-checker-italian"
5+
"swyddfa.esbonio"
76
]
87
}

.vscode/settings.json

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"restructuredtext.confPath": "${workspaceFolder}/rtfm/source",
3-
"restructuredtext.builtDocumentationPath": "${workspaceRoot}/rtfm/build/html",
42
"search.exclude": {
53
"**/bower_components": true,
64
"**/node_modules": true,
@@ -12,24 +10,47 @@
1210
"restructuredtext.languageServer.trace.server": "messages",
1311
"restructuredtext.linter.executablePath": "/usr/local/bin/doc8",
1412
"cSpell.words": [
13+
"bloginfo",
14+
"browserlistsrc",
15+
"browserslistrc",
1516
"Cest",
1617
"classmap",
1718
"Codeception",
1819
"corejs",
1920
"endcode",
2021
"gifsicle",
22+
"HAML",
2123
"helperclass",
2224
"helperfunc",
25+
"htmlentities",
2326
"javascripts",
2427
"jpegtran",
28+
"jquery",
29+
"linenos",
30+
"literalinclude",
2531
"MAILHOG",
2632
"mobiledetect",
2733
"mobiledetectlib",
34+
"myview",
35+
"nvmrc",
2836
"optipng",
2937
"phpmailer",
38+
"PHUG",
3039
"Procfile",
3140
"runcommand",
41+
"seealso",
42+
"shortcodes",
3243
"SQLSTATE",
33-
"symfony"
34-
]
44+
"Stylelint",
45+
"stylelintignore",
46+
"stylelintrc",
47+
"stylesheet",
48+
"symfony",
49+
"Wordmove",
50+
"Worldess",
51+
"wpunit"
52+
],
53+
"esbonio.sphinx.buildDir": "${workspaceRoot}/rtfm/build",
54+
"esbonio.sphinx.confDir": "${workspaceFolder}/rtfm/source",
55+
"esbonio.server.pythonPath": "/opt/homebrew/bin/python3"
3556
}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Wordless is a junction between a WordPress plugin and a theme boilerplate that d
2020

2121
### Complete documentation
2222

23-
Read the complete Wordless documentation at [wordless.readthedocs.io](https://wordless.readthedocs.io/en/latest/?badge=latest) where you'll find - hopefully - all the informations about installation, usage guide, in depth explanation about the stack.
23+
Read the complete Wordless documentation at [wordless.readthedocs.io](https://wordless.readthedocs.io/en/latest/?badge=latest) where you'll find - hopefully - all the information about installation, usage guide, in depth explanation about the stack.
2424

2525
If you want to contribute to the documentation.
2626

rtfm/source/_pages/appendix/acf_gutenberg_blocks.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ interface. If absent, then the second will be used.
4848
You will be obviously free to render the block anywhere in your
4949
front-end template, since it's a simple partial:
5050

51-
.. code-block:: jade
51+
.. code-block:: pug
5252
5353
render_partial('blocks/slider')
5454

rtfm/source/_pages/appendix/plainphp.rst

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ directly including the PHP file.
5656
we need to use plain PHP functions.
5757

5858
.. _RenderingPhp:
59+
5960
PHP render helpers
6061
##################
6162

rtfm/source/_pages/appendix/render_static.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This is the definition of ``render_static()`` function:
2323

2424
.. warning::
2525
Using static rendering could lead to undesired effects by design (not specifically with Wordless).
26-
Be sure to know what you're doing. It's not alwas just a matter to be faster.
26+
Be sure to know what you're doing. It's not always just a matter to be faster.
2727

2828
Static template example
2929
#######################
@@ -97,7 +97,7 @@ You have 3 way to handle this:
9797
* blank ``tmp/`` folder with ``wp wordless theme clear_tmp``
9898
* from the "Cache management" menu within the admin panel
9999

100-
The "Cache management" menu needs to be activated decommenting this line
100+
The "Cache management" menu needs to be activated uncommenting this line
101101

102102
.. literalinclude:: /../../wordless/theme_builder/vanilla_theme/config/initializers/backend.php
103103
:language: php

rtfm/source/_pages/stack/compile.rst

+27-27
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ We love it because it is concise, clear, tidy and clean.
6666
6767
Certainly, becoming fluent in PUG usage could have a not-so-flat
6868
learning curve,
69-
but starting from the basics shuold be affordable and the reward is high.
69+
but starting from the basics should be affordable and the reward is high.
7070

7171
Who compiles PUG?
7272
"""""""""""""""""
@@ -77,7 +77,7 @@ compile (and cache) it. As far as you have the plugin activated you are ok.
7777
.. important::
7878

7979
By default, you have nothing to do to deploy in production, but if performance is
80-
crucial in your project, then you can optimize. See :ref:`PHUGoptimizer` for more informations.
80+
crucial in your project, then you can optimize. See :ref:`PHUGoptimizer` for more information.
8181

8282

8383
.. _Pug: https://github.com/pugjs/pug
@@ -110,18 +110,18 @@ and are used by the ``entry`` and ``output`` configurations:
110110
.. literalinclude:: /../../wordless/theme_builder/vanilla_theme/webpack.config.js
111111
:language: js
112112
:caption: webpack.config.js
113-
:lineno-start: 18
114-
:lines: 18-26
113+
:lineno-start: 23
114+
:lines: 23-38
115115

116116
CSS will be extracted from the bundle by the standard mini-css-extract-plugin_
117117

118118
.. _mini-css-extract-plugin: https://webpack.js.org/plugins/extract-text-webpack-plugin/
119119

120120
.. literalinclude:: /../../wordless/theme_builder/vanilla_theme/webpack.config.js
121-
:language: js$
121+
:language: js
122122
:caption: webpack.config.js
123-
:lineno-start: 129
124-
:lines: 129-131
123+
:lineno-start: 99
124+
:lines: 99-101
125125

126126
Inclusion of compiled files
127127
"""""""""""""""""""""""""""
@@ -193,36 +193,36 @@ Add another *entry* and producing new bundles is as easy as
193193

194194
.. code-block:: php
195195
196-
function enqueue_stylesheets() {
197-
wp_register_style("main", stylesheet_url("main"), [], false, 'all');
198-
wp_register_style("backend", stylesheet_url("backend"), [], false, 'all');
199-
wp_enqueue_style("main");
200-
wp_enqueue_style("backend");
201-
}
202-
203-
function enqueue_javascripts() {
204-
wp_enqueue_script("jquery");
205-
wp_register_script("main", javascript_url("main"), [], false, true);
206-
wp_register_script("backend", javascript_url("backend"), [], false, true);
207-
wp_enqueue_script("main");
208-
wp_enqueue_script("backend");
209-
}
196+
function enqueue_stylesheets() {
197+
wp_register_style("main", stylesheet_url("main"), [], false, 'all');
198+
wp_register_style("backend", stylesheet_url("backend"), [], false, 'all');
199+
wp_enqueue_style("main");
200+
wp_enqueue_style("backend");
201+
}
202+
203+
function enqueue_javascripts() {
204+
wp_enqueue_script("jquery");
205+
wp_register_script("main", javascript_url("main"), [], false, true);
206+
wp_register_script("backend", javascript_url("backend"), [], false, true);
207+
wp_enqueue_script("main");
208+
wp_enqueue_script("backend");
209+
}
210210
211211
or add it anywhere in your templates:
212212

213-
.. code-block:: jade
213+
.. code-block:: pug
214214
215-
header
216-
= stylesheet_link_tag('backend')
217-
footer
218-
= javascript_include_tag('backend')
215+
header
216+
= stylesheet_link_tag('backend')
217+
footer
218+
= javascript_include_tag('backend')
219219
220220
Browserslist
221221
""""""""""""
222222

223223
At theme's root you'll find the `.browserlistsrc`_ file.
224224

225-
By default it's used by Babel and Core-js3 to understand how to polifill
225+
By default it's used by Babel and Core-js3 to understand how to polyfill
226226
your ES2015 code. You can understand more about our default configuration
227227
reading Babel docs at https://babeljs.io/docs/en/babel-preset-env#browserslist-integration
228228

rtfm/source/_pages/stack/server.rst

+8-8
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ YARN
2121
section inside your ``package.json`` file and will execute the matched script.
2222

2323
.. literalinclude:: /../../wordless/theme_builder/vanilla_theme/package.json
24-
:lines: 13-20
24+
:lines: 13-32
2525
:language: javascript
2626
:caption: package.json
2727

@@ -44,7 +44,7 @@ As you can see, each line has a simple named command. Each command will be
4444
launched and *foreman* will:
4545

4646
* run all the listed processes
47-
* collect all STDOUTs from processes and print theme as one - with fancyness
47+
* collect all STDOUTs from processes and print theme as one - with fanciness
4848
* when stopped (CTRL-C) it will stop all of the processes
4949

5050
wp server
@@ -69,7 +69,7 @@ start a web server at address ``127.0.0.1`` on port 3000.
6969
This is where your browser will automatically go once launched.
7070

7171
.. literalinclude:: /../../wordless/theme_builder/vanilla_theme/webpack.config.js
72-
:lines: 94-108
72+
:lines: 83-97
7373
:language: js
7474
:caption: webpack.config.js
7575

@@ -78,10 +78,10 @@ underlying ``wp server``.
7878

7979
Since *BrowserSync* is invoked through a Webpack plugin
8080
(`browser-sync-webpack-plugin`_) we will benefit from automatic
81-
**browser autoreloading** when assets are recompiled by Webpack itself.
81+
**browser auto-reloading** when assets are recompiled by Webpack itself.
8282

8383
The ``files`` option is there because ``.pug`` files are not compiled by
84-
webpack, so we force watching those files too, thus calling autoreload on
84+
webpack, so we force watching those files too, thus calling auto-reload on
8585
template changes too.
8686

8787
.. seealso::
@@ -111,7 +111,7 @@ MailHog
111111
* View messages in the web UI, or retrieve them with the JSON API
112112
* Optionally release messages to real SMTP servers for delivery
113113

114-
Wordless is configured to use it by default, so you can test mailouts from
114+
Wordless is configured to use it by default, so you can test outgoing emails from
115115
your site, from WordPress and from your forms.
116116

117117
The UI will be at
@@ -134,7 +134,7 @@ This will trigger the ``smtp.php`` initializer:
134134
Debug in VSCode
135135
###############
136136

137-
We ship a ``.vscode/launch.json`` in theme's root which is preconfigured to
137+
We ship a ``.vscode/launch.json`` in theme's root which is pre-configured to
138138
launch debugger for XDebug and for JS (both Chrome and FireFox). In order to
139139
use these configuration you'll need to install some plugins in the editor:
140140

@@ -148,6 +148,6 @@ use these configuration you'll need to install some plugins in the editor:
148148

149149
.. note::
150150
You may need to move ``.vscode/launch.json`` in another location if you
151-
are not opening the theme's folder as workspace in VSCode (maybe you prefere to
151+
are not opening the theme's folder as workspace in VSCode (maybe you prefer to
152152
open all the WordPress installation? Don't know...). It's up to you to use it
153153
as you need it.

rtfm/source/_pages/usage/css_js.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ and go on as usual.
7878
Linters
7979
"""""""
8080

81-
Wordless ships with preconfigured linting of SCSS
81+
Wordless ships with pre-configured linting of SCSS
8282
using `Stylelint`_.
8383

8484
It is configured in ``.stylelintrc.json``, you can add exclusion in
8585
``.stylelintignore``; all is really standard.
8686

87-
The script ``yarn lint`` is preconfigured to run lint tasks.
87+
The script ``yarn lint`` is pre-configured to run lint tasks.
8888

8989
.. tip::
9090

rtfm/source/_pages/usage/filters.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ wordless_tmp_dir_exists
9696
Sometimes tmp folder in theme directory, may not have write permission in dedicated server, Hence failure to load pug template from tmp.
9797
In tmp directory, if there is compiled files listed following hook can be used to check file counts and override ensure_tmp_dir function to return true.
9898
In some cases files can be compiled via command line to generate files in tmp dir.
99-
here the filter code is added in ``themes/exmaple-theme/config/initializers/hooks.php``
99+
here the filter code is added in ``themes/example-theme/config/initializers/hooks.php``
100100

101101
wordless_environment
102102
##########################
@@ -120,7 +120,7 @@ wordless_environment
120120
return 'production';
121121
} );
122122
123-
Here the filter code is added in ``themes/exmaple-theme/config/initializers/hooks.php``
123+
Here the filter code is added in ``themes/example-theme/config/initializers/hooks.php``
124124

125125
If there is different or custom environment name defined this hook can override it, rather than defaulting to development always. For example if environment is called UAT or SIT.
126126

@@ -139,10 +139,10 @@ wordless_component_validation_exception
139139

140140
When an object of class ``Wordless\Component`` fails its validation, it will throw an exception
141141
only if ``ENVIRONMENT`` **is not** ``production``. When in ``production`` nothing will happen, in
142-
order to be unobstrusive and not breaking the site to your users. The developer will still see
143-
specific excpetion happening.
142+
order to be unobtrusive and not breaking the site to your users. The developer will still see
143+
specific exception happening.
144144

145-
You can customize the behaviour by adding your action as documented in the code.
145+
You can customize the behavior by adding your action as documented in the code.
146146

147147
What we like to do is to add here a notification to our Sentry account (thanks to
148148
https://github.com/stayallive/wp-sentry/ plugin)

rtfm/source/_pages/usage/helpers.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ all the 40+ tested and documented helpers Wordless gives you for free:
2121
- ``distance_of_time_in_words()`` - Reports the approximate distance in time
2222
between two dates
2323

24-
Our favourite convention for writing custom helpers is to write 1 file per
24+
Our favorite convention for writing custom helpers is to write 1 file per
2525
function and naming both the same way. It will be easier to find with ```cmd+p``
2626
😉
2727

2828
**Where is my** ``functions.php`` **?**
2929

3030
In a Wordless theme the isn't a ``functions.php`` file. It was too ugly to us to support it.
3131
You have simply to consider ``helpers/*.php`` files as the explosion of your old messy
32-
``functions.php`` into smaller chunks. And since all the helpers you'll write will be autorequired,
32+
``functions.php`` into smaller chunks. And since all the helpers you'll write will be auto-required,
3333
defined functions will work exactly the same way you are used to.

rtfm/source/_pages/usage/initializers.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ one with a specific target:
2626
├──── thumbnail_sizes.php
2727

2828
- **backend**: remove backend components such as widgets, update messages, etc
29-
- **custom_gutenbers_acf_blocks**: Wordless has built-in support to ACF/Gutenberg blocks. Read more
29+
- **custom_gutenberg_acf_blocks**: Wordless has built-in support to ACF/Gutenberg blocks. Read more
3030
at :ref:`Blocks`
3131
- **custom_post_types**: well... if you need to manage taxonomies, this is the
3232
place to be

0 commit comments

Comments
 (0)