Pengin-Open-Source / pengin-pi

PENGIN PI! A CRM with the back bone of a feature light ERP system. Utilitarian in design, easy to extend, customize, and deploy. Made by a community, supported by Tobu Pengin.
GNU General Public License v3.0
9 stars 1 forks source link

[FEATURE] sitemap generator #317

Open stuart909 opened 1 year ago

stuart909 commented 1 year ago

Explanation I have been seeing a lot of sitemap.xml issues with the various deployments of Pengin-pi. This is the second time Google has delisted us because of sitemap issues. I have now corrected it in an emergency B1.06 deployment, but it will be a couple of days before the business profile gets relisted again. That said, the sitemap.xml is VERY important to keep the site active with google. Once a business profile is registered with Google, they can and WILL delist your site for the slightest mistakes, like having a day in the date be a singular digit, 6, instead of 06. Thus, I propose we write a simple script that will generate the sitemap.xml when we build pengin-pi for our site.

Brief A simple script in manage.py that will generate a sitemap.xml and robots.txt based on your .env configurations. Additionally, I want to re-work the products so that they are listed by short title instead of UUID. For example, my ERP software offering should be listed under https://www.tobupengin.com/products/erp, not ../bf443aa9-b5d1-4419-8afa-d3faa8fcc8f3

The reason for this change is simple, the indexer utility should grap the short titles from blogs and products, and put them in the sitemap. We should also invoke the sitemap script everytime we update the database for products or blog after the site is deployed. This way, the sitemap.xml is a live document.

Outline

Child tasks

stuart909 commented 1 year ago

318-xml has a big xml parser API. The only thing left to do is finalize the last few config bits and create a deployment script in the app init that will generate the sitemap and robots.txt at start up. We are mostly there. We just need to update the models to have tags, and then the all important make the blogs and products use unique names for URL instead of ID. My SEO research makes me believe that it will be in our best interest to link page URL with the sitemap.xml, meta tags, and of course, page content. This will maximize our customer's SEO capability.