Giter Club home page Giter Club logo

apostrophe-site-map's Issues

The alternative configuration method for setting the baseUrl is not setting on the link/url structure in sitemap.xml

To Reproduce

Step by step instructions to reproduce the behavior:

  1. Setting the baseUrl using the alternative configuration method as explain per guide: https://github.com/apostrophecms/apostrophe-site-map/#alternative-configuration
  2. Loading http://localhost:3000/sitemap.xml - The baseUrl is not showing on the links
  3. Have also run node app apostrophe-site-map:clear as well and reimplemented steps 1 and 2

Expected behavior

When applying the baseUrl in the 'apostrophe-site-map' as option, it should be include in the sitemap.xml generated as part of the links/url structure. For eg 0.9 daily http://localhost:3000/about-us

Describe the bug

When applying the baseUrl in the 'apostrophe-site-map' as option (as per https://github.com/apostrophecms/apostrophe-site-map/#alternative-configuration), it should be included in the sitemap.xml as part of the links/url structure.
for eg 0.9 daily /about-us

Details

Version of Node.js:
v8.11.4

Server Operating System:
MacOS Mojave

Additional context:

When using the main baseUrl configuration, it does prepend the baseUrl to the links/url in the sitemap.xml - for eg 0.9 daily http://localhost:3000/about-us

Remove the Priority and Changefreq tags

I received this yesterday from an SEO consultancy working on a client's SEO project in reference to the Apos site-map.

Remove the Priority and Changefreq tags included before each URL. Google pays no mind to these and removing will help decrease the page load burden.

I've requested more information and am starting this to get it in the discussion. "Load burden" does seem a bit much for most site-maps, but if it's big enough maybe it matters.

arrangeFields options ignored, always appears in its own `Info` group

Steps to reproduce:

  1. Install
  2. Create an apostrophe-pieces module
  3. Specify arrangeFields option and place the siteMapPriority field into some group
  4. Run project, open that pieces content type

Expected behavior

siteMapPriority field appears in group specified

Actual behavior

The siteMapPriority field always added to info group

Sample apostrophe-pieces module configuration

// in this example, the field is added to the 'info' group
module.exports = {
  name: 'something',
  extend: 'apostrophe-pieces',
  arrangeFields: [{
    name: 'sitemap',
    label: 'Site Map XML',
    fields: ['siteMapPriority']
  }]
};

// in this example, the field is added to a duplicate 'info' group
module.exports = {
  name: 'something',
  extend: 'apostrophe-pieces',
  arrangeFields: [{
    name: 'info',
    label: 'Info',
    fields: ['published', 'slug', 'tags', 'siteMapPriority']
  }]
};

Other Notes

I've tried a fix for this by modifying the way the fields are registered by this module, but no effect.

Any thoughts?

Set sitemap url in robots.txt dynamically

Hello Apostrophe-team,

I have used this package in a project to produce the sitemap.xml for SEO. I have also added the xml path in robots.txt.

So currently I got a requirement that need to replace the sitemap.xml path dynamically in robots.txt file.

I have tried many ways to achieve the functionality but didn't succeed.

Please let me know how can achieve this kind of functionality.

Sitemap generation error on browser

To Reproduce

  1. Visit the site: https://mysite.com/sitemap.xml

  2. This error will be shown on the browser:

XML Parsing Error: no root element found
Location: https://mysite.com/sitemap.xml
Line Number 1, Column 1:
  1. Visit the same site: again after waiting for few minutes

  2. This error will be shown in the browser:

error

This page isn’t working www.mysite.com took too long to respond. HTTP ERROR 504

  1. Visit the same site: again (third time) but only after waiting longer (few more minutes)

  2. Now the sitemap will be output correctly on the browser window

Expected behavior

The sitemap file is not always output correctly on the browser window and many times the browser show different errors

Describe the bug

Not sure why this keeps happening but this error is not consistently replicated while probably it has to do with the way the module generates the sitemap keeping in mind that all default configuration settings were used. Also not sure if there is cache setting added by the default settings. No manual command line tasks or cron jobs were used to generate the XML file

Details

Server Operating System:
Ubuntu/nginx

Version of Node.js:
8.9.3

Version of Apostrophe
2.94.1

Version of Apostrophe site map
2.5.0

Additional context:

These errors even though are different each time I visit the browser, were always caused when the browser keeps waiting for the XML sitemap to be generated and after few seconds the browser starts to show all these errors.

This is not consistent and can not always be replicated because the XML sitemap is output correctly on some occasions and on many others is not

Screenshots

504-error-chrome

Works with apostrophe 2.1.2?

Sorry for polluting the lists ;)

shout site-map works with apostrophe 2.1.2? I get an error:

/node_modules/moog/index.js:313
          if (key.substr(0, 2) === '__') {
                  ^

TypeError: key.substr is not a function
    at /node_modules/moog/index.js:313:19
    at Function.forEach (/node_modules/moog/node_modules/lodash/dist/lodash.js:3298:15)
    at applyOptions (/node_modules/moog/index.js:309:11)
    at /build/node_modules/moog/index.js:226:15
    at iterate (/node_modules/moog/node_modules/async/lib/async.js:146:13)
    at Immediate._onImmediate (/node_modules/moog/node_modules/async/lib/async.js:157:25)
    at tryOnImmediate (timers.js:534:15)
    at processImmediate [as _immediateCallback] (timers.js:514:5)

I am using:
node --version
v5.11.1

Ignore posts with publication date in future

Hello,

we just added this package to our apostrophe installation. Almost everything worked out of the box, it skipped unpublished blogPosts, but published blogPosts with publicationDate and publicationTime in the future are shown in the sitemap.

Do we use this wrong or is there a bug?

Thanks again :)

Pages without a top-level parent are excluded from the site-map

A client mentioned that some pages are missing from the site-map. It turns out these are pages that were children of a top-level page that's unpublished. It's unpublished since it's only needed for site organization and the nav uses an unlinked drop-down.

Due to this, those second level pages are missing:

    self.findPages = function(req) {
      return self.apos.pages.find(req, { level: 0 }).children({ depth: 20 });
    };

I poked a bit to just change this to all published pages, but it's clearly going to be more complicated than that.

sitemap: false not working for excluding piece from sitemap

To Reproduce

Step by step instructions to reproduce the behavior:

  1. Add sitemap: false to a piece's options.

Expected behavior

Piece should be removed from sitemap.xml.

Describe the bug

Piece is not removed from sitemap.xml.

Details

Version of Node.js:
12.19.0

Server Operating System:
macOS 10.15.7 - Catalina

Additional context:
Using excludeTypes option in the site's app.js did work for me but the above method did not.

Screenshots
None

Sitemap generated as plaintext instead of xml when using it with apostrophe-workflow

PLEASE NOTE: make sure the bug exists in the latest patch level of the project. For instance, if you are running a 2.x version of Apostrophe, you should use the latest in that major version to confirm the bug.

To Reproduce

Step by step instructions to reproduce the behavior:

  1. Go to http://localhost:3000/sitemap.xml
  2. See the sitemap as a plaintext

Expected behavior

Generate the sitemap as a xml

Describe the bug

When using this module with apostrophe-workflow the sitemap is generated as a plaintext instead of a xml file

Screenshots

Here you have a sample project
apostrophe-boilerplate.zip

image

Include a self-referencing <link rel="hreflang"> tag for each <url> on localized sites

First of all, this module is a real gem – it works much as you'd expect right out of the box!

I noticed something that relates to the apostrophe-workflow integration however. It's the fact that Google's guidelines state the following:

Each <url> element must have a child element <xhtml:link rel="alternate" hreflang="supported_language-code"> that lists every alternate version of the page, including itself.

This module doesn't include a self-referencing <xhtml:link rel="alternate"> tag for each <url> tag however, but only links to other locales' variant of the same document.

I am happy to submit a PR for this, I just wanted to raise the issue before doing so.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.