mitydigital / statamic-sitemapamic Goto Github PK
View Code? Open in Web Editor NEWA simple XML sitemap generator for Statamic 3, 4 and 5
A simple XML sitemap generator for Statamic 3, 4 and 5
When opening the sitemap.xml path I get the following error:
Call to a member function queryEntries() on null
In my config file, I added the following:
'blog' => [
'include' => true,
'frequency' => 'weekly',
'priority' => '0.7',
'includeTaxonomies' => false,
],
That is essentially the default. As soon as this is active, I'm getting the error, when I remove it, the error is gone.
Environment
Laravel Version: 10.16.1
PHP Version: 8.2.8
Composer Version: 2.5.5
Environment: local
Debug Mode: ENABLED
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single, bugsnag
Mail: postmark
Queue: sync
Session: file
Statamic
Addons: 1
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.13.2 Solo
Statamic Addons
mitydigital/sitemapamic: 2.3.8
This is my posts collection yaml:
title: Posts
template: blog/show
layout: layouts/statamic/layout
revisions: false
route: '/blog/{slug}'
date: true
sort_dir: asc
date_behavior:
past: public
future: private
preview_targets:
-
label: Entry
url: '{permalink}'
refresh: true
Currently, each site has a sitemap, e.g /sitemap.xml
, /fr/sitemap.xml
etc.
It would be great if it could generate a global file, such as /sitemap-index.xml
at the main root, which links to each sites main sitemap. A sitemap of sitemaps if you like.
See above
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Statamic
Addons: 2
Antlers: runtime
Sites: 25 (UK / English, Belgium / English, Belgium / French, and 22 more)
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.49.0 PRO
Statamic Addons
mitydigital/sitemapamic: 2.3.9
statamic/ssg: 2.2.0
### Additional details
_No response_
Hello. I am not sure whether this is intented or a bug, but when using the addon in single mode, all submap URLs like sitemap_index.xml
, sitemap_abc.xml
, sitemap_foobar.xml
all display global sitemap. I believe the submap links should return 404 instead?
Thank you for the great addon!
mode
configuration to single
.Environment
Laravel Version: 10.35.0
PHP Version: 8.1.11
Composer Version: 2.5.3
Environment: local
Debug Mode: ENABLED
URL: 127.0.0.1:8000
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Statamic
Addons: 6
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 4.38.0 PRO
Statamic Addons
mitydigital/sitemapamic: 2.3.8
statamic/eloquent-driver: 2.10.0
No response
I have a statamic 4.0 project. I have a page collection that has tr and en locales. tr is my default one and its route is site-url.com/ and sitemapamic can automatically generate sitemap for tr locale. But for en locale that has site-url.com/en route, sitemapamic can't generate automatically becaue of that I needed to add en routes to SitemapamicServiceProvider manually but this approach is not viable. Is there any way to make this process automatically?
Location:
https://docs.mity.com.au/sitemapamic/configuration/options
Under Defaults:
Missing a comma after 'priority' => '0.7'
Please fix it.
Thanks.
In my "news" collection, as well as standard entries, I use entries that redirects to other content.
These should be excluded from the sitemap, because they're on an external site, but currently they are listed with everything else, which causes Google Searchconsole to complain about them.
Environment
Application Name: redacted
Laravel Version: 9.52.4
PHP Version: 8.1.10
Composer Version: 2.5.5
Environment: local
Debug Mode: ENABLED
URL: localhost
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: redis
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Statamic
Addons: 4
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 3.4.8 Solo
Statamic Addons
jacksleight/statamic-bard-texstyle: 2.1.1
mitydigital/feedamic: 2.2.4
mitydigital/iconamic: 1.1.4
mitydigital/sitemapamic: 2.3.6
No response
Currently collection specific taxonomy routes are supported, eg. /blog/topics/design
, but global taxonomy routes aren't, eg. /topics/design
. Be great if these could be added.
If you'd consider a PR I'd be happy to give it a go? I guess the defaults
config would need to be expanded somehow to cover taxonomies as well as collections.
statamic-sitemapamic/composer.json
Line 3 in 8747f31
Sorry for the really tiny issue. Just noticed it and thought that this would be helpful. :)
This time, maybe just Statamic (without the version number) should be enough.
I tried to install this the other day in a project using Statamic 3.3 and PHP 7.4 (because we've not got round to updating yet).
After 'composer requiring', I was greeted by some errors because I'm using an older version of PHP than what this addon supports (fair enough - it's my bad for using an older PHP version).
Just a suggestion but it might be worth adding a PHP version constraint to the composer.json
file so even if you try to install on an older PHP version, it won't actually let you install.
Install this addon on a Statamic site running PHP 7.4
n/a
No response
I am not sure what the problem is. I can not getting working to list blog posts in the XML.
I edited config/sitemapamic.php
and tried blog
and blogs
as handle, both don't work. Where can I see the actual handle?
$ ls resources/blueprints/collections/blogs/
blog blog.yaml
I tried clearing statamic cache and also sitemapamic cache. Both without result. I have the feeling I am loading a different sitemap.xml somehow?
- Statamic 3.4.9
- PHP 8.1
No response
Is there anyway to use this with Statamic SSG to deploy to Netlify?
I have a collection with the following configuration:
date_behavior:
past: public
future: unlisted
The future entries get listed in the sitemap but that is not what I expected. I get what I want by using private
instead of unlisted
but then the urls are no longer accessible for people who know them.
Maybe this behavior is intended but feels a little counter intuitive to me. Alternatively a config option would be nice.
Create a collection with the following config:
date_behavior:
past: public
future: unlisted
Create an entry in the future and open the generated sitemap.
Environment
Application Name: Battery Quick Check
Laravel Version: 9.46.0
PHP Version: 8.1.13
Composer Version: 2.4.4
Environment: local
Debug Mode: ENABLED
URL: statamic-bqc.test
Maintenance Mode: OFF
Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED
Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / single
Mail: smtp
Queue: sync
Session: file
Statamic
Addons: 4
Antlers: runtime
Stache Watcher: Enabled
Static Caching: Disabled
Version: 3.3.63 PRO
Statamic Addons
jacksleight/statamic-miniset: 0.3.1
jonassiewertsen/statamic-livewire: 2.9.0
marcorieser/statamic-vitals: 0.0.5
mitydigital/sitemapamic: 2.3.4
No response
composer require mitydigital/sitemapamic
, after that step there was no sitemap.xml in the public folder.php artisan vendor:publish --tag=sitemapamic-config
-> No sitemap.xml gets created:
'defaults' => [
/*'blog' => [
'include' => true,
'frequency' => 'weekly',
'priority' => '0.7'
],*/
'seiten' => [
'include' => true,
'frequency' => 'yearly',
'priority' => '0.5',
'includeTaxonomies' => false,
],
'blog' => [
'include' => true,
'frequency' => 'yearly',
'priority' => '0.5',
'includeTaxonomies' => false,
],
'case_studies' => [
'include' => true,
'frequency' => 'yearly',
'priority' => '0.5',
'includeTaxonomies' => false,
],
'tools' => [
'include' => true,
'frequency' => 'yearly',
'priority' => '0.5',
'includeTaxonomies' => false,
]
],
php please sitemapamic:clear
-> No sitemap.xml gets createdAdditionally I'm wondering why the addon doesn't get listed correctly:
Am I missing something? Thankful for any hint! ๐
Getting this error when visiting sitemap.xml...
syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE)
Locally the sitemap gets displayed as expected.
But after deployment I get a 500 error on example.com/sitemap.xml and the laravel.log contains:
[2022-05-31 13:13:11] local.ERROR: syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE) {"userId":"f711e3e3-c370-426d-8aa1-a11717e0eb41","exception":"[object] (ParseError(code: 0): syntax error, unexpected 'public' (T_PUBLIC), expecting variable (T_VARIABLE) at /var/www/virtual/michels/coachingspace/vendor/mitydigital/sitemapamic/src/Models/SitemapamicUrl.php:10)
[stacktrace]
I'm not aware if this concerns the plugin itself or any of my or the servers configurations.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.