|
6 | 6 | xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd" |
7 | 7 | title="Sitemap" id="receipt-sitemap" help-id="sitemap"> |
8 | 8 |
|
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> |
| 9 | + <link-summary>How to create a product sitemap feed</link-summary> |
| 10 | + <card-summary>Step-by-step guide for creating a product sitemap</card-summary> |
| 11 | + <web-summary>Step-by-step guide to creating a product sitemap feed</web-summary> |
12 | 12 |
|
13 | 13 | <show-structure depth="3" /> |
14 | 14 |
|
15 | 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. |
| 16 | + This recipe walks you through creating a product sitemap feed using Laravel Feeds. You will: |
| 17 | + - Generate the necessary classes |
| 18 | + - Implement the feed logic |
| 19 | + - Expose the files via the filesystem |
| 20 | + - Optionally reference the generated sitemap from a root sitemap.xml |
19 | 21 | </p> |
20 | 22 |
|
21 | 23 | <chapter title="Create files" id="create_files"> |
22 | 24 | <p> |
23 | | - Generate the feed and its item class using the console command: |
| 25 | + Generate the feed and its item class using the following console command: |
24 | 26 | </p> |
25 | 27 | <code-block lang="bash"> |
26 | 28 | %command-make-simple% Sitemaps/Product -%command-shortcut-item% |
|
29 | 31 |
|
30 | 32 | <chapter title="Fill the feed" id="filling_the_feed"> |
31 | 33 | <p> |
32 | | - Implement the feed root element, attributes, query builder, filename, and item mapping as shown below: |
| 34 | + Implement the feed root element, attributes, query builder, output filename, and item mapping as shown below: |
33 | 35 | </p> |
34 | 36 | <code-block lang="php" src="receipt-sitemap-feed.php" /> |
35 | 37 | </chapter> |
36 | 38 |
|
37 | 39 | <chapter title="Fill the feed item" id="filling_the_feed_item"> |
38 | 40 | <p> |
39 | | - Define the XML element name and map model properties to sitemap tags: |
| 41 | + Define the XML element name and map your model properties to the corresponding sitemap tags: |
40 | 42 | </p> |
41 | 43 | <code-block lang="php" src="receipt-sitemap-feed-item.php" /> |
42 | 44 | </chapter> |
|
47 | 49 |
|
48 | 50 | <chapter title="Links" id="links"> |
49 | 51 | <p> |
50 | | - Add a filesystem link to the directory containing your sitemaps in the |
51 | | - <a href="https://github.com/laravel/laravel/blob/12.x/config/filesystems.php#L76-L78">config/filesystems.php</a> configuration file: |
| 52 | + Add a filesystem disk that points to the directory containing your sitemaps in |
| 53 | + the <a href="https://github.com/laravel/laravel/blob/12.x/config/filesystems.php#L76-L78">config/filesystems.php</a> configuration file: |
52 | 54 | </p> |
53 | 55 |
|
54 | 56 | <code-block lang="php" src="receipt-sitemap-links.php" include-lines="5-" /> |
55 | 57 |
|
56 | 58 | <p> |
57 | | - Then create the public symlink so the files are accessible via the browser: |
| 59 | + Then create the public symlink so the files are accessible in the browser: |
58 | 60 | </p> |
59 | 61 |
|
60 | 62 | <code-block lang="bash"> |
|
0 commit comments