Skip to content

Commit f0e28f3

Browse files
Improved docs
1 parent f13a94c commit f0e28f3

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed

docs/topics/receipt-sitemap.topic

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,38 @@
66
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
77
title="Sitemap" id="receipt-sitemap" help-id="sitemap">
88

9-
<link-summary>Recipe for creating a sitemap</link-summary>
10-
<card-summary>Recipe for creating a sitemap</card-summary>
11-
<web-summary>Recipe for creating a sitemap</web-summary>
9+
<link-summary>How to create a sitemap feed</link-summary>
10+
<card-summary>Step-by-step recipe for creating a sitemap</card-summary>
11+
<web-summary>Step-by-step guide to creating a sitemap feed</web-summary>
1212

1313
<show-structure depth="3" />
1414

15+
<p>
16+
This recipe walks you through creating a product sitemap feed using Laravel Feeds. You will generate the
17+
necessary classes, implement the feed logic, expose the files via the filesystem, and reference the sitemap
18+
from a root sitemap.xml if needed.
19+
</p>
20+
1521
<chapter title="Create files" id="create_files">
22+
<p>
23+
Generate the feed and its item class using the console command:
24+
</p>
1625
<code-block lang="bash">
1726
%command-make-simple% Sitemaps/Product -%command-shortcut-item%
1827
</code-block>
1928
</chapter>
2029

21-
<chapter title="Filling the feed" id="filling_the_feed">
30+
<chapter title="Fill the feed" id="filling_the_feed">
31+
<p>
32+
Implement the feed root element, attributes, query builder, filename, and item mapping as shown below:
33+
</p>
2234
<code-block lang="php" src="receipt-sitemap-feed.php" />
2335
</chapter>
2436

25-
<chapter title="Filling the feed item" id="filling_the_feed_item">
37+
<chapter title="Fill the feed item" id="filling_the_feed_item">
38+
<p>
39+
Define the XML element name and map model properties to sitemap tags:
40+
</p>
2641
<code-block lang="php" src="receipt-sitemap-feed-item.php" />
2742
</chapter>
2843

@@ -32,14 +47,14 @@
3247

3348
<chapter title="Links" id="links">
3449
<p>
35-
Don't forget to add a link to the folder with site maps in the
50+
Add a filesystem link to the directory containing your sitemaps in the
3651
<a href="https://github.com/laravel/laravel/blob/12.x/config/filesystems.php#L76-L78">config/filesystems.php</a> configuration file:
3752
</p>
3853

3954
<code-block lang="php" src="receipt-sitemap-links.php" include-lines="5-" />
4055

4156
<p>
42-
After that, run the console command:
57+
Then create the public symlink so the files are accessible via the browser:
4358
</p>
4459

4560
<code-block lang="bash">
@@ -51,11 +66,17 @@
5166
<include from="snippet-generate.topic" element-id="feed_generate" />
5267
</chapter>
5368

54-
<chapter title="Adding a link to the general sitemap.xml file" id="adding_a_link_to_the_general_sitemap_xml_file">
69+
<chapter title="Add a link to the root sitemap.xml" id="adding_a_link_to_the_general_sitemap_xml_file">
70+
<p>
71+
If you maintain a root sitemap.xml file that references other sitemaps, add an entry like this:
72+
</p>
5573
<code-block lang="xml" src="receipt-sitemap-root.xml" />
5674
</chapter>
5775

5876
<chapter title="Result" id="result">
77+
<p>
78+
A generated sitemap.xml for your products will look like this:
79+
</p>
5980
<code-block lang="xml" src="receipt-sitemap-feed.xml" />
6081
</chapter>
6182

docs/topics/snippet-generate.topic

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<snippet id="feed_generate">
1111
<p>
12-
Now you can generate a feed using a console command:
12+
Generate the feed by running the following console command:
1313
</p>
1414

1515
<code-block lang="bash">
@@ -19,8 +19,7 @@
1919

2020
<snippet id="check_operation">
2121
<p>
22-
Check the <a href="create-feeds.topic">operation/migration</a>
23-
file that was created for you and run the console command:
22+
Review the generated <a href="create-feeds.topic">operation/migration</a> file and then run the appropriate console command:
2423
</p>
2524

2625
<code-block lang="bash">

0 commit comments

Comments
 (0)