-
Notifications
You must be signed in to change notification settings - Fork 9
Collection Examples
Joomlatools Pages has a built-in template for RSS feeds. The build-in feed template offer support for the RSS specification: https://validator.w3.org/feed/docs/rss2.html
The item image is embedded using media RSS specification: http://www.rssboard.org/media-rss and is not injecting into the description and the channel or item description is based on the page or item summary and does not contain html entities.
To create your own feed, create a page for the feed and import the built-in template and define the collection for the pages you want to have included in the feed.
For example, to create a feed of all blog posts in the /pages/blog
directory add following page /pages/blog/index.rss.php
---
title: My Site Blog
summary: There's lots happening on my site, our blog will keep you up-to-date.
collection:
state:
path: blog
recurse: false
limit: 20
sort: date
order: desc
collection: false
visible: false
---
<?= import('com:pages.pages.newsfeed.rss'); ?>
Joomlatools Pages has a built-in template for sitemaps. The build in template offers support for the Sitemaps specification and includes the <loc>
and <lastmod>
xml elements for each url.
To create your own sitemap, all you need to do is create a page for the sitemap, import the built-in template and define the collection for the pages you want to have included in the sitemap.
For example, to create a sitemap of all pages in your site, add following page /pages/sitemap.xml.php
---
title: Sitemap
collection:
state:
path: .
limit: 0
sort: date
order: desc
recurse: false
visible: false
---
<?= import('com:pages.pages.sitemap.xml'); ?>
By default, all pages will be added to the sitemap. To exclude a certain page from the sitemap, simply add robots: [noindex]
to the page's frontmatter.
---
title: My Page
metadata:
robots: [noindex]
---
Got a question or need help? We have a forum on Github Discussions where you can get in touch with us.