• Stars
    star
    4,064
  • Rank 10,230 (Top 0.3 %)
  • Language
    JavaScript
  • License
    Other
  • Created over 7 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Manage HTML metadata in Vue.js components with SSR support

This project is not actively maintained anymore.

More information can be found in #808


✌️πŸ₯‰ Check the next branch for Vue3 support


vue-meta

Manage HTML metadata in Vue.js components with SSR support

npm downloads npm version Coverage Status Build Status dependencies Status Discord

<template>
  ...
</template>

<script>
  export default {
    metaInfo: {
      title: 'My Example App',
      titleTemplate: '%s - Yay!',
      htmlAttrs: {
        lang: 'en',
        amp: true
      }
    }
  }
</script>
<html lang="en" amp>
<head>
  <title>My Example App - Yay!</title>
  ...
</head>

Introduction

Vue Meta is a Vue.js plugin that allows you to manage your app's metadata. It is inspired by and works similar as react-helmet for react. However, instead of setting your data as props passed to a proprietary component, you simply export it as part of your component's data using the metaInfo property.

These properties, when set on a deeply nested component, will cleverly overwrite their parent components' metaInfo, thereby enabling custom info for each top-level view as well as coupling metadata directly to deeply nested subcomponents for more maintainable code.

Documentation

Please find the documention on https://vue-meta.nuxtjs.org

🌐 Please help us translate the documentation into your language, see here for more information

Examples

Looking for more examples what vue-meta can do for you? Have a look at the examples

Installation

Yarn
$ yarn add vue-meta
npm
$ npm install vue-meta --save
Download / CDN

Use the download links below - if you want a previous version, check the instructions at https://unpkg.com.

Latest version: https://unpkg.com/vue-meta/dist/vue-meta.min.js

Latest v1.x version: https://unpkg.com/vue-meta@1/dist/vue-meta.min.js

Uncompressed:

<script src="https://unpkg.com/vue-meta/dist/vue-meta.js"></script>

Minified:

<script src="https://unpkg.com/vue-meta/dist/vue-meta.min.js"></script>

Quick Usage

See the documentation for more information

import Vue from 'vue'
import VueMeta from 'vue-meta'

Vue.use(VueMeta, {
  // optional pluginOptions
  refreshOnceOnNavigation: true
})

Frameworks using vue-meta

If you wish to create your app even more quickly, take a look at the following frameworks which use vue-meta

  • Nuxt.js - The Vue.js Progressive Framework
  • Gridsome - The Vue.js JAMstack Framework
  • Ream - Framework for building universal web app and static website in Vue.js
  • Vue-Storefront - PWA for eCommerce
  • Factor JS - Extension-first VueJS platform for front-end developers.

How to translate documentation

Thanks for your interest in translating the documentation. As our docs are based on VuePress, we recommend to have a look at their docs about internationalization as well

Here are the steps you will need to take:

  • Clone this repository
  • Create a new branch
  • Browse to /docs/
  • Create a folder with the language code you will add a translation for (eg /zh/)
  • Copy all *.md files and the folders api, faq, and guide to that folder
  • Translate the copied files in your language folder
  • Edit .vuepress/config.yml and add a config section for your locale in both locales as themeConfig.locales
  • Test your translation by running the docs dev server with yarn docs
  • Create a pull request with your changes
  • Receive eternal gratefulness from your fellow language speakers ❀️

Old versions

Click here if you are looking for the old v1 readme

License

MIT

More Repositories

1

nuxt

The Intuitive Vue Framework.
TypeScript
51,559
star
2

framework

Old repo of Nuxt 3 framework, now on nuxt/nuxt
10,721
star
3

awesome

A curated list of awesome things related to Nuxt.js
5,014
star
4

create-nuxt-app

Create Nuxt.js App in seconds.
JavaScript
3,451
star
5

ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.
Vue
3,316
star
6

content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
TypeScript
2,976
star
7

devtools

Unleash Nuxt Developer Experience
Vue
2,681
star
8

website-v2

Nuxt 2 Documentation Website
Vue
2,241
star
9

movies

🍿 A TMDB client built with Nuxt 3
Vue
1,818
star
10

vite

⚑ Vite Experience with Nuxt 2
TypeScript
1,385
star
11

image

Plug-and-play image optimization for Nuxt applications.
TypeScript
1,247
star
12

hackernews

HackerNews clone built with Nuxt.
Vue
1,197
star
13

components

Scan and auto import components for Nuxt.js 2.13+
TypeScript
879
star
14

modules

Discover the Nuxt modules to add any CMS, Database, UI, Auth and integrations into your Vue application.
TypeScript
871
star
15

example-auth0

A simple example that shows how to use Nuxt.js with Auth0.
Vue
713
star
16

vercel-builder

Vercel Builder for Nuxt
TypeScript
641
star
17

typescript

TypeScript Support for Nuxt 2
TypeScript
567
star
18

docs

Old Documentation of Nuxt.js πŸ’š - not in use anymore
539
star
19

learn.nuxt.com

[Work in Progress] An interactive tutorial and playground for Nuxt
Vue
492
star
20

starter

Create a new Nuxt project, module, layer or start from a theme with our collection of starters.
382
star
21

eslint-config

ESlint config used for Nuxt
JavaScript
346
star
22

fonts

Plug-and-play web font optimization and configuration for Nuxt apps.
TypeScript
345
star
23

test-utils

πŸ§ͺ Test utilities for Nuxt
TypeScript
273
star
24

assets

🎨 Unified Assets and Templates for Nuxt
HTML
267
star
25

bridge

πŸŒ‰ Experience Nuxt 3 features on existing Nuxt 2 projects
TypeScript
263
star
26

nuxt.com

The Nuxt website, made with Nuxt.
Vue
225
star
27

nuxt.new

Create a new Nuxt project from your address bar.
Vue
225
star
28

http

Universal HTTP Module for Nuxt.js
JavaScript
221
star
29

cli

⚑️ Nuxt Generation CLI Experience.
TypeScript
207
star
30

module-builder

Complete solution to build Nuxt Modules.
TypeScript
202
star
31

nitro-demo

nuxt nitro preview
Vue
187
star
32

telemetry

Nuxt Telemetry
TypeScript
185
star
33

press

[Deprecated] Minimalist Markdown Publishing for Nuxt.js
JavaScript
184
star
34

todomvc

Nuxt.js TodoMVC Example
Vue
146
star
35

examples

Deployed Nuxt examples
TypeScript
134
star
36

eslint-plugin-nuxt

ESLint plugin for Nuxt.js [WIP]
JavaScript
129
star
37

nuxters

Vue
124
star
38

rfcs

RFCs for changes to Nuxt.js
97
star
39

loading-screen

Loading Screen Module for Nuxt.js
JavaScript
90
star
40

scripts

Plug-and-play script optimization for Nuxt applications. (Public Preview)
TypeScript
65
star
41

cli-draft

WIP: CLI for Nuxt.js projects
62
star
42

postcss8

Opt-in to postcss 8 in Nuxt 2 apps.
TypeScript
58
star
43

actions-yarn

Github Actions for yarn
Shell
47
star
44

codesandbox-nuxt

Starter template for CodeSandBox.io
Vue
43
star
45

blueprints

Module for Nuxt.js to create distributable micro-apps
JavaScript
41
star
46

benchmarks

πŸ’¨ Nuxt.js SSR performance Benchmarks
JavaScript
24
star
47

renovate-config-nuxt

Nuxt.js presets for Renovate tool.
18
star
48

nuxt-services-experimental

[WIP] Around realtime services for Nuxt 3
JavaScript
17
star
49

nuxt3-stubs

JavaScript
13
star
50

static

Fast Static Builder
TypeScript
12
star
51

governance

Nuxt Project Governance
12
star
52

babel-preset-app

PSA: this repo has been moved into nuxt.js/nuxt --> https://github.com/nuxt/nuxt.js/tree/dev/packages/babel-preset-app
JavaScript
10
star
53

nuxt-redirects

Nuxt.js redirects app for Netlify
9
star
54

.github

Default community health files for nuxt repositories
4
star