Appish / appi.sh

appi.sh website and scripts
27 stars 8 forks source link

Download sitemap as well #7

Open crechberger opened 4 years ago

crechberger commented 4 years ago

Hi,

I would love Appi to download the sitemap of a website as well looking for the following url: /sitemap.xml

If there's a redirect it should follow the redirect.

Thanks :)

leonstafford commented 4 years ago

@crechberger good point. This is where feeding some typical URLs in would be good, ie

We can also look for tell-tale WP signatures and add some extra behaviour around that as needed (ie stripping out WP footprints, extra junk in the markup).

There's a lot of potential features for this project and the static site conversion first "app" example. Making it more like Sitesauce.app, with enough intelligence to convert contact forms would be cool.

I need to get my work on WP2Static/Static HTML Output/Lokl a bit more advanced before I go to town with Appi.sh, but definitely can add in these expected common URLs that aren't always linked from within the site.

Re the redirects, could you please explain a bit more what you expect - what kind of redirect?

ie, you have /old-post/ redirecting to /new-post/ in your WP/source site, what do you expect your converted static site to look like? Redirects in static sites are best handled at the hosting end, just as they usually are in the development end (htaccess/nginx/application level routing). In the case of a WP plugin/theme to do redirects, that's at the application level (sometimes WP'll update htaccess rules when supported), which we don't have an app in the static converted site. You can fudge it with meta redirects (frowned upon) or JavaScript redirects (not any better). Ideally, fix the links in the dev site and add rewrite rules from old to new on the hosting side, whether that's an S3 bucket, Lambda function, CloudFlare Page Rule or Worker function, Netlify _redirects file or such.

crechberger commented 4 years ago

Thanks, that sounds great :)

Regarding the redirect, I was referring to the sitemap, because of the Yoast SEO plugin, when I navigate to "/sitemap.xml", you automatically get redirected to "/sitemap_index.xml" and Appish should be smart enough to follow the redirect :)