Comments (3)
Strange, I tried and when I set published: false
an a translation of the page, the alternate disappears.
from grav-plugin-sitemap.
That's odd. What I get back from $page->translatedLanguages()
in sitemap.php are all the local pages if they exist. There doesn't seem to be a check for published: true
.
So just to be clear. My default language is en
. Then I have nl-nl
, fr-fr
and en-gb
.
This is the structure:
/page-title
blog-post.de-de.md <-- published: false
blog-post.en.md <-- published: true
blog-post.nl-nl.md <-- published: false
What I see in my sitemap.xml for the default language on md.dev/sitemap.xml
:
<url>
<loc>http://www.md.dev/blog/page-title</loc>
<xhtml:link rel="alternate" hreflang="en" href="http://www.md.dev/blog/page-title" />
<xhtml:link rel="alternate" hreflang="nl-nl" href="http://www.md.dev/nl-nl/blog/page-title" />
<xhtml:link rel="alternate" hreflang="de-de" href="http://www.md.dev/de-de/blog/page-title" />
<lastmod>2017-05-16</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
Yes the page is not available in the sitemap for nl-nl
, but it already shouldn't be visible as alternate for the default language either.
Is there something I'm missing here?
from grav-plugin-sitemap.
I tested it again, but I cannot replicate the problem. Maybe send me your user/ folder on Slack so I can replicate on your same page structure and config.
from grav-plugin-sitemap.
Related Issues (20)
- Missing translations in JSON sitemap HOT 2
- Avoid flex objects from indexing
- Children pages under an unpublished blog will show up in sitemap
- Suggestion: location url -> change domain based on language
- attachments HOT 1
- Default Page is HTML not XML HOT 2
- canonical tag for sitemap.xml HOT 4
- ParseError syntax error, unexpected 'int' (T_STRING), expecting function (T_FUNCTION) or const (T_CONST) HOT 3
- sitemap-news.xml Page Redirects to 404 HOT 2
- Disable use of Google Fonts HOT 3
- Wrong file name for SitemapEntry.php > Grav\Plugin\Sitemap\SitemapEntry HOT 2
- Invalid root element, missing trailing slash HOT 2
- Alternative replacement for ignore:true, using visible or published HOT 1
- Invalid namespace according to google console HOT 2
- All languages on the same map: by default or not? HOT 7
- Related items not grouped in sitemap HOT 5
- Problem with a multilanguage sitemap HOT 1
- Error with multilingual one-page website HOT 3
- Sitemap blanked out problem HOT 10
- Way to provide an override for sitemap's lastmod HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grav-plugin-sitemap.