Permlink Replies: 7 - Pages: 1 - Last Post: 25 Feb 23, 12:35 Last Post By: GHammer
GHammer

Posts: 28
Registered: 28-Jul-2006
Sitemap Settings and Creation Need Work
Posted: 13 Feb 23, 17:37
  Click to reply to this thread Reply
I use and like the Story skin.
I chose to create a sitemap with it and Google rejects it as unreadable.
I took a look and sure enough, the sitemap is not valid.
The URLs created are invalid. They do not contain the https://domain.ext unless I enter that in the Server related settings -> Upload path. If I do that though, the upload function does not work as the https://ghammer.net is not where I want the website uploaded to.
If I put the actual upload path there, the URLs in the sitemap use that and are incorrect. Left blank, the sitemap also has no location.

The URLs created also do not handle spaces in the paths.
They look like this:
<url>
		<loc>https://ghammer.net/International Travel/index.html</loc>


If a comment has an ampersand with no space (M&Ms) the ampersand will not be converted to
&amp;


This would be a great feature if it were tweaked a bit to allow the information needed to be input and to handle URLs with spaces in them.
Laza

Posts: 1,794
Registered: 6-Sep-2005
Re: Sitemap Settings and Creation Need Work
Posted: 14 Feb 23, 17:07   in response to: GHammer in response to: GHammer
  Click to reply to this thread Reply
I found that spaces are only replaced in the base path and the filename, but not in the folder path. I will fix this. Please note, the skin has no idea where you will upload the album, so you have to provide the upload path.

Are you sure the text fields need to be encoded too?

The catch here is that you can use HTML in the captions too, like M&amp;M&apos;s. It's almost impossible to tell if an ampersand is intended to be a HTML entity or just a simple ampersand.
GHammer

Posts: 28
Registered: 28-Jul-2006
Re: Sitemap Settings and Creation Need Work
Posted: 22 Feb 23, 03:58   in response to: Laza in response to: Laza
  Click to reply to this thread Reply
Thanks for the fix to spaces.

I understand that the skin doesn't know where it will be uploaded.
The issue is that the skin seems to think the upload path is part the URL that is in the sitemap.

For me, my upload path is very different than the web address.

Story currently has the correct upload path (/home/web/). It produces invalid sitemap.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
	<url>
		<loc>/home/web/Pictures/index.html</loc>
		<lastmod>2023-02-22T01:53:37.753Z</lastmod>
	</url>
	<url>
		<loc>/home/web/Pictures/InternationalTravel/index.html</loc>
		<lastmod>2023-02-22T01:55:41.525Z</lastmod>
	</url>

home/web/Pictures/ should be https://ghammer.net/

If that were configurable, it would be great.
Else, I open the sitemap and search/replace
Laza

Posts: 1,794
Registered: 6-Sep-2005
Re: Sitemap Settings and Creation Need Work
Posted: 22 Feb 23, 09:17   in response to: GHammer in response to: GHammer
  Click to reply to this thread Reply
Why don't you use https://ghammer.net/ as Upload path? That's the purpose of this field. Perhaps the wording is bad. The purpose of this field is to give a path from the root to the current album. From outside. Can be absolute - "https://mysite.com/albums/" - or relative, e.g. "/" or "/albums/".
GHammer

Posts: 28
Registered: 28-Jul-2006
Re: Sitemap Settings and Creation Need Work
Posted: 23 Feb 23, 16:51   in response to: Laza in response to: Laza
  Click to reply to this thread Reply
Doh!

Ok, I'll use the domain instead of the upload path.
Yes, I think the wording is misleading.

Looking forward to the spaces fix.
GHammer

Posts: 28
Registered: 28-Jul-2006
Re: Sitemap Settings and Creation Need Work
Posted: 24 Feb 23, 15:28   in response to: Laza in response to: Laza
  Click to reply to this thread Reply
I have worked around the spaces issue by replacing spaces with dashes.
The ampersand is still an issue with Google indexing.
If there is an & that is not part of &;apos or the like, Google fails to read the sitemap
It does helpfully point out which line it stopped reading on, then I can manually edit and resubmit.
All other characters that need treatment seem to be fine.

Thanks again, I love the sitemap creator.
Laza

Posts: 1,794
Registered: 6-Sep-2005
Re: Sitemap Settings and Creation Need Work
Posted: 24 Feb 23, 18:37   in response to: GHammer in response to: GHammer
  Click to reply to this thread Reply
I have just released a new version of Story skin, which probably can fix these issues. However, using an ampersand in a place where both normal and HTML-formatted text is allowed leads to an unsolvable situation. This new routine encodes the ampersand whatever way it was used:
&amp;amp;
GHammer

Posts: 28
Registered: 28-Jul-2006
Re: Sitemap Settings and Creation Need Work
Posted: 25 Feb 23, 12:35   in response to: Laza in response to: Laza
  Click to reply to this thread Reply
Thanks, this is a great addition to jAlbum and the Story skin.
My sitemap.xml is 1.2 mb

Not going to happen by hand and without one, search is never going to index the entire site.

BTW- https://www.sitemaps.org/protocol.html#escaping

Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums