How to fetch the sitemap.xml file which is created by strapi-plugin-sitemap on the frontend using NextJs by API? - strapi

I have created the sitemap using strapi-plugin-sitemap in Strapi. Its working fine in the Strapi side but I need to get it on the frontend.
Here is the package - https://www.npmjs.com/package/strapi-plugin-sitemap
Thanks in advance.

It locates the sitemap at /sitemap/index.xml relative to the Strapi root.
Do you really need a sitemap for your backend? There is an official plugin for documentation that adds an OpenAPI specification that you can also parse in your frontend;
https://www.npmjs.com/package/#strapi/plugin-documentation

Related

how to create a xml sitemap for react website

I have created a sitemap for my react website. I check website on SEO site checkup it is not showing any error in sitemap but in google search console it showing sitemap "could not fetch".
How do I create a sitemap for my react website.
Make sure your sitemap is saved in the Public folder of your react project.
You can use this react library called react-router-sitemap.
It uses your routes list to generate a sitemap within your public folder.

How to insert image into strapi article?

I'm beginner of strapi, nodejs headless cms framework.
I've followed quick start guide of official document. I've created gatsby-blog and it works.
After setup, I've created new article with uploaded image, in the middle of article. (Not the image field in the Slug section) In the strapi admin page, I can find my new image in the media library list.
But when I open my strapi client in browser, the image is not shown. The source of image seems to the file path of backend server. I can find the image file on the backend/public/uploads folder. But it returns 404 error.
So, What am I missing of strapi setting? I've searched a lot but I can't find similar issue.
Make sure that the field is public in your Strapi admin dashboard.
Beyond that, it seems like the src tag in your screenshot has a relative url - if you are not hosting the backend on the same path as the frontend, I would suspect you have to prepend the backend base path :-)

How to override auth/local/register endpoint validations in Strapi Framework?

I am new to Strapi framework (started learning today itself) and My front-end has login with Instagram only. So no need to remove email and password validation for the http://localhost:1337/auth/local/register endpoint.
I have removed validation from .chache/admin/containers/AuthPage/forms.js, but it doesn't get affected.
Where do I making mistake? I have searched for the answer but didn't get it.
I found the solution.
I copied config and controllers folder from node_modules/strapi-plugin-users-permissions into extensions/users-permissions and made changes in controllers/Auth.js and it worked .

How do i set up laravel as an backend api for nuxtjs

I've starterd working on a project based of a template i found on github. This template includes laravel, nuxtjs and vuetify. In this template laravel serves as a backend api for my nuxtjs project; Which is what i need.
The github repo: https://github.com/BakayYank/laravel-nuxt-vuetify
But what i dont like about this template is that the package.json file is filled with dependencies of which i dont know what they do or even if i need them.
I want to make my own project with laravel and nuxt but i don't know how to make laravel an api or how to send data to this api.
If anyone could help me understand or provide me a source that would really be appreciated.
This course teaches that beautifully if you are willing to pay for a month (It's totally worth it!). Laravel Api/NUXT Frontend Course
Otherwise, you would build the laravel app as normal but don't use blade views. Then in NUXT send data using ajax requests. If you have any other questions let me know! I hope that helps!

SEO for Laravel Vue.js App

My Laravel 5.6 app has a Vue.js frontend. The Vue.js app is in the resources directory. I have gone through several articles that use Prerender SPA plugins. These articles are for the stand alone vue.js app and have an index.html file. In Laravel's case we have index.php. How do I make my Laravel Vue.js App SEO freindly. At a minimum I would like to make the front/home page of the app SEO friendly.
I think, as an alternative solution, you can use https://prerender.io/ service (up to 250 pages Free for caching) to do the pre-rendering for your SPA application.
If you are going to implement https://prerender.io/ service, you would require to generate all the sitemap URL paths and upload them to this service via their npm plugin (prerender-spa-plugin) and configure your .htaccess file for search engine crawlers. So search engine crawlers will redirect to this pre-render service and picked your website, cached static web page for service engine indexing, and show that cached page as the search result.
For more info, you can refer below;
https://prerender.io/documentation
https://snipcart.com/blog/vue-js-seo-prerender-example
Cheers!
Definitely recommend checking out Nuxt.js! It is a production-ready framework built on top of VueJS. With Nuxt.js You can create 100% SEO-friendly app with SPA-like routing.
Check this awesome Toptal article about "Creating Server-side Rendered Vue.js Apps Using Nuxt.js"

Resources