Skip to content

Instantly share code, notes, and snippets.

View andreliem's full-sized avatar
🏠
Working from home

Andre Liem andreliem

🏠
Working from home
View GitHub Profile
@andreliem
andreliem / vue
Created July 31, 2017 21:18
meta tag nuxt example
export default {
head () {
let post = this.post
return {
title: post.meta.name,
meta: [
{
hid: `description`,
name: 'description',
content: post.meta.content
.
├── LICENSE
├── README.md
├── docs
│ ├── README.md
│ ├── test.md
│ └── welcome.md
├── netlify.toml
├── package.json
└── yarn.lock
{
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
},
"devDependencies": {
"vuepress": "^0.9.0"
}
}
├── docs
│ ├── README.md
│ ├── test.md
│ └── welcome.md
.
├── components
│ └── PostLayout.vue
├── config.js
├── dist
└── public
├── admin
│ ├── config.yml
│ └── index.html
└── images
module.exports = {
title: 'Netlify CMS + VuePress',
description: 'Netlify + VuePress',
themeConfig: {
docsDir: 'docs',
repo: 'andreliem/vuepress-netlify-cms',
sidebar: [
'/',
'/welcome',
'/test'
backend:
name: github
repo: andreliem/vuepress-netlify-cms
branch: master # Branch to update (optional; defaults to master)
media_folder: "docs/.vuepress/public/images"
public_folder: "docs/.vuepress/dist/"
collections:
- name: "doc" # Used in routes, e.g., /admin/collections/blog
label: "Doc" # Used in the UI
folder: "docs" # The path to the folder where the documents are stored
.
├── LICENSE
├── README.md
├── launch.js
├── package.json
├── prepare.js
├── src
│ ├── assets
│ │ └── images
│ │ └── NativeScript-Vue.png
<script>
import Sample from '../components/Sample';
const router = new VueRouter({
...
{
path: '/sample',
component: Sample,
meta: {
title: 'Sample',
<template>
<Page class="page">
<ActionBar class="action-bar" title="Sample Page">
<NavigationButton text="Go Back" android.systemIcon="ic_menu_back" @tap="$router.push('/home')"/>
</ActionBar>
<StackLayout class="hello-world">
<Label class="body" textWrap=true text="text"/>
</StackLayout>
</Page>