Answer the question
In order to leave comments, you need to log in
How to add meta tags and micro-markup in vue(+vue routes) + laravel?
How to correctly add meta tags (depending on the page) if the front is on vue + vue routes, and the back is on the lara? Moreover, you need to make sure that both search engines and various social networks see the data. Is it possible?
Project data:
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="csrf-token" content="{{ csrf_token() }}">
<link rel="shortcut icon" href="/favicon.ico" type="image/vnd.microsoft.icon">
<title>Laravel</title>
<style>
[v-cloak] {
display: none;
}
</style>
<link rel="stylesheet" href="/css/app.css">
</head>
<body>
<div id="app" v-cloak>
<app-header></app-header>
<router-view></router-view>
<app-footer></app-footer>
</div>
<script src="/js/app.js"></script>
</body>
</html>
Answer the question
In order to leave comments, you need to log in
Use ssr or perender. In the second case, do something like document.title = title in the mounted
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question