How to add pre-rendering to VueJS using Laravel Mix? - javascript

I'm having a Laravel application with a VueJS frontend as a landing page (web tool). I've noticed it shows up on Google as a blank page as the content isn't pre-rendered. I've googled and found the solutions to pre-render the HTML more complex and work intense than I expected. Is there a simple way using Laravel Mix?

Related

How to run wordpress along with node js

I am trying to run Wordpress blog along with the node + express project. I've tried all possible solutions from the google to run the wordpress blog in node js. (Trying since last 2 days).
Note : Our website is hosted on heroku server.
Reason why I met with this situation:
Our site is completely built on html, javascript and css with Wordpress blog (https://oursite.com/blog).
We are calling api using Ajax to fetch the data, which includes meta content too, and adding it on the html page using jQuery.
The API is crated on Strapi Framework which is hosted on another domain on heroku.
Our SEO expert told us that this will not work, because the website will not get crawled if the meta data will not shown in the page source.
So I googled and came-up with the node + express + ejs solution.
But now I'm not able to include wordress blog in my node project.

I am trying to create widget in next.js app

My website is almost complete on next.js. I am trying to create widget to one of my component that can be embedded on any website without iframe. Please help me out
Use a Web Component Framework
First understand what web components are.
https://developer.mozilla.org/en-US/docs/Web/Web_Components
recommended frameworks
https://stenciljs.com/docs/introduction (made by Ionic)
https://github.com/github/catalyst (made by Github)
https://lit.dev/ (made by Google)
Your website being in next.js would not be a factor here. You should build your web component then serve it via CDN or via static folder in next.js. You could reuse your REST routes or styles etc. but you would want a proper modern web component.

Want to make dynamic pages indexable using react cra

So i have this social media app with multiple pages, it's all created with create react app with context api and react-router for routing and laravel for backend. Now, google won't be able to index these dynamic pages, i have tried pre rendring the pages using react-snapshot, currently looking into next js.
i know react has this react dom server, will it be good idea to hook up another server just for pre-rendring the page before sending it to the client.
Is there any other way to do ssr with cra.
First things first, Google is able to index client-side rendered pages.
I think next.js is a good choice for SSR, but you can also look at razzle - maybe you can retrofit that to your CRA setup.
Google should index your website. please check your robots.txt file and also try to provide sitemap.xml for better crawling for google.
Also, there are some issues with using react-snap and that is you render the page at build time and your site render won't change if you read your content from the database and update your database while you didn't rebuild your app.
you can use after.js but next.js have a bigger community and more tutorials out there so I recommend you use next.js.
Also, there is a tool named prerender.io(open source) and you can serve rendered page to search engine bots this is the easiest way in my opinion and do not have the downside of using react-snap

Why can't I view the rest of my components?

I am working on this project, now everything on the server is running fine but I am having issues viewing the rest of the components for the web app of the page beside the header.
Here is the link to my codebase https://github.com/henry88lay/MyReads-Project
no errors or messages can't seem to find the bug

Handle routes to static pages while converting to SPA

I am tasked with updating a Microsoft Frontpage website and I am going to use Polymer with the Polymer Starter Kit. In that it uses a javascript router to handle pages. Now it will be hosted on an apache server and I know how to setup apache to route everything to my index.html file to get the router to do my routing, but I am looking for a way to also route to existing static pages as I work on the conversion of this website so I can release pages as I go and users can still access the old pages that I haven't converted yet.
Is there an easy way to handle this scenario?

Categories

Resources