Skip to content

Commit 6f3dde3

Browse files
committed
docs: fix RST format ::
1 parent 4b5fd2f commit 6f3dde3

File tree

4 files changed

+16
-37
lines changed

4 files changed

+16
-37
lines changed

user_guide_src/source/tutorial/create_news_items.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ To input data into the database, you need to create a form where you can
2929
input the information to be stored. This means you'll be needing a form
3030
with two fields, one for the title and one for the text. You'll derive
3131
the slug from our title in the model. Create a new view at
32-
**app/Views/news/create.php**.
33-
34-
::
32+
**app/Views/news/create.php**::
3533

3634
<h2><?= esc($title) ?></h2>
3735

@@ -89,9 +87,7 @@ slug, perfect for creating URIs.
8987
After this, a view is loaded to display a success message. Create a view at
9088
**app/Views/news/success.php** and write a success message.
9189

92-
This could be as simple as:
93-
94-
::
90+
This could be as simple as::
9591

9692
News item created successfully.
9793

user_guide_src/source/tutorial/index.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ Getting Up and Running
5555

5656
You can download a release manually from the site, but for this tutorial we will
5757
use the recommended way and install the AppStarter package through Composer.
58-
From your command line type the following:
59-
60-
::
58+
From your command line type the following::
6159

6260
> composer create-project codeigniter4/appstarter ci-news
6361

@@ -88,9 +86,7 @@ The Welcome Page
8886
****************
8987

9088
Now point your browser to the correct URL you will be greeted by a welcome screen.
91-
Try it now by heading to the following URL:
92-
93-
::
89+
Try it now by heading to the following URL::
9490

9591
http://localhost:8080
9692

user_guide_src/source/tutorial/news_section.rst

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,7 @@ commands (mysql, MySQL Workbench, or phpMyAdmin).
1818
You need to create a database that can be used for this tutorial,
1919
and then configure CodeIgniter to use it.
2020

21-
Using your database client, connect to your database and run the SQL command below (MySQL).
22-
Also, add some seed records. For now, we'll just show you the SQL statements needed
23-
to create the table, but you should be aware that this can be done programmatically
24-
once you are more familiar with CodeIgniter; you can read about :doc:`Migrations <../dbmgmt/migration>`
25-
and :doc:`Seeds <../dbmgmt/seeds>` to create more useful database setups later.
26-
27-
::
21+
Using your database client, connect to your database and run the SQL command below (MySQL)::
2822

2923
CREATE TABLE news (
3024
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -35,12 +29,15 @@ and :doc:`Seeds <../dbmgmt/seeds>` to create more useful database setups later.
3529
KEY slug (slug)
3630
);
3731

32+
Also, add some seed records. For now, we'll just show you the SQL statements needed
33+
to create the table, but you should be aware that this can be done programmatically
34+
once you are more familiar with CodeIgniter; you can read about :doc:`Migrations <../dbmgmt/migration>`
35+
and :doc:`Seeds <../dbmgmt/seeds>` to create more useful database setups later.
36+
3837
A note of interest: a "slug", in the context of web publishing, is a
3938
user- and SEO-friendly short text used in a URL to identify and describe a resource.
4039

41-
The seed records might be something like:
42-
43-
::
40+
The seed records might be something like::
4441

4542
INSERT INTO news VALUES
4643
(1,'Elvis sighted','elvis-sighted','Elvis was sighted at the Podunk internet cafe. It looked like he was writing a CodeIgniter app.'),
@@ -53,9 +50,7 @@ Connect to Your Database
5350
The local configuration file, ``.env``, that you created when you installed
5451
CodeIgniter, should have the database property settings uncommented and
5552
set appropriately for the database you want to use. Make sure you've configured
56-
your database properly as described :doc:`here <../database/configuration>`.
57-
58-
::
53+
your database properly as described :doc:`here <../database/configuration>`::
5954

6055
database.default.hostname = localhost
6156
database.default.database = ci4tutorial

user_guide_src/source/tutorial/static_pages.rst

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@ The first thing you're going to do is set up a **controller** to handle
99
static pages. A controller is simply a class that helps delegate work.
1010
It is the glue of your web application.
1111

12-
For example, when a call is made to:
13-
14-
::
12+
For example, when a call is made to::
1513

1614
http://example.com/news/latest/10
1715

1816
We might imagine that there is a controller named "news". The method
1917
being called on news would be "latest". The news method's job could be to
2018
grab 10 news items, and render them on the page. Very often in MVC,
21-
you'll see URL patterns that match:
22-
23-
::
19+
you'll see URL patterns that match::
2420

2521
http://example.com/[controller-class]/[controller-method]/[arguments]
2622

@@ -138,9 +134,7 @@ since it will not properly process the ``.htaccess`` rules that are provided in
138134
``public``, and which eliminate the need to specify "index.php/"
139135
as part of a URL. CodeIgniter has its own command that you can use though.
140136

141-
From the command line, at the root of your project:
142-
143-
::
137+
From the command line, at the root of your project::
144138

145139
> php spark serve
146140

@@ -182,9 +176,7 @@ Routing
182176
The controller is now functioning!
183177

184178
Using custom routing rules, you have the power to map any URI to any
185-
controller and method, and break free from the normal convention:
186-
187-
::
179+
controller and method, and break free from the normal convention::
188180

189181
http://example.com/[controller-class]/[controller-method]/[arguments]
190182

0 commit comments

Comments
 (0)