From 6ba3708a2eb607a3af3888f60f0b4d3761cedb5e Mon Sep 17 00:00:00 2001 From: Evan You Date: Tue, 12 Jan 2021 03:08:52 -0500 Subject: [PATCH] init --- .gitignore | 2 + .prettierrc | 4 + .vitepress/config.js | 28 + .vitepress/theme/Article.vue | 60 ++ .vitepress/theme/Author.vue | 35 + .vitepress/theme/Date.vue | 26 + .vitepress/theme/Home.vue | 34 + .vitepress/theme/Layout.vue | 29 + .vitepress/theme/index.js | 9 + .vitepress/theme/style.css | 92 ++ .vitepress/theme/tailwind.css | 3 + index.md | 4 + package.json | 18 + postcss.config.js | 6 + posts/hello-2021.md | 41 + public/_headers | 3 + public/logo.svg | 4 + tailwind.config.js | 15 + yarn.lock | 1717 +++++++++++++++++++++++++++++++++ 19 files changed, 2130 insertions(+) create mode 100644 .gitignore create mode 100644 .prettierrc create mode 100644 .vitepress/config.js create mode 100644 .vitepress/theme/Article.vue create mode 100644 .vitepress/theme/Author.vue create mode 100644 .vitepress/theme/Date.vue create mode 100644 .vitepress/theme/Home.vue create mode 100644 .vitepress/theme/Layout.vue create mode 100644 .vitepress/theme/index.js create mode 100644 .vitepress/theme/style.css create mode 100644 .vitepress/theme/tailwind.css create mode 100644 index.md create mode 100644 package.json create mode 100644 postcss.config.js create mode 100644 posts/hello-2021.md create mode 100644 public/_headers create mode 100644 public/logo.svg create mode 100644 tailwind.config.js create mode 100644 yarn.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..76add87 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules +dist \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..38d9aa9 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +semi: false +singleQuote: true +printWidth: 80 +trailingComma: none diff --git a/.vitepress/config.js b/.vitepress/config.js new file mode 100644 index 0000000..e40d57c --- /dev/null +++ b/.vitepress/config.js @@ -0,0 +1,28 @@ +const fs = require('fs') +const path = require('path') +const matter = require('gray-matter') + +/** + * @type {import('vitepress').UserConfig} + */ +module.exports = { + title: 'The Vue Point', + description: 'The offical blog for the Vue.js project', + customData: { + posts: getPosts() + } +} + +function getPosts() { + const postDir = path.resolve(__dirname, '../posts') + return fs.readdirSync(postDir).map((file) => { + const src = fs.readFileSync(path.join(postDir, file), 'utf-8') + const { data, excerpt } = matter(src, { excerpt: true }) + return { + title: data.title, + href: `/posts/${file.replace(/\.md$/, '.html')}`, + date: data.date instanceof Date ? +data.date : null, + excerpt + } + }).sort((a, b) => b.date - a.date) +} diff --git a/.vitepress/theme/Article.vue b/.vitepress/theme/Article.vue new file mode 100644 index 0000000..7567978 --- /dev/null +++ b/.vitepress/theme/Article.vue @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/.vitepress/theme/Author.vue b/.vitepress/theme/Author.vue new file mode 100644 index 0000000..4682c04 --- /dev/null +++ b/.vitepress/theme/Author.vue @@ -0,0 +1,35 @@ + + + \ No newline at end of file diff --git a/.vitepress/theme/Date.vue b/.vitepress/theme/Date.vue new file mode 100644 index 0000000..6de0304 --- /dev/null +++ b/.vitepress/theme/Date.vue @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/.vitepress/theme/Home.vue b/.vitepress/theme/Home.vue new file mode 100644 index 0000000..0e76007 --- /dev/null +++ b/.vitepress/theme/Home.vue @@ -0,0 +1,34 @@ + + + \ No newline at end of file diff --git a/.vitepress/theme/Layout.vue b/.vitepress/theme/Layout.vue new file mode 100644 index 0000000..1a10f92 --- /dev/null +++ b/.vitepress/theme/Layout.vue @@ -0,0 +1,29 @@ + + + \ No newline at end of file diff --git a/.vitepress/theme/index.js b/.vitepress/theme/index.js new file mode 100644 index 0000000..7d885a1 --- /dev/null +++ b/.vitepress/theme/index.js @@ -0,0 +1,9 @@ +import 'vitepress/dist/client/theme-default/styles/vars.css' +import './tailwind.css' +import './style.css' + +import Layout from './Layout.vue' + +export default { + Layout +} diff --git a/.vitepress/theme/style.css b/.vitepress/theme/style.css new file mode 100644 index 0000000..59798f4 --- /dev/null +++ b/.vitepress/theme/style.css @@ -0,0 +1,92 @@ +.link { + color: var(--c-brand); +} + +.link:hover { + color: var(--c-brand-light); +} + +.header-anchor { + display: none; +} + +/** + * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML. + * Based on https://github.com/chriskempson/tomorrow-theme + * + * @author Rose Pritchard + */ +.token.comment, +.token.block-comment, +.token.prolog, +.token.doctype, +.token.cdata { + color: #999; +} + +.token.punctuation { + color: #ccc; +} + +.token.tag, +.token.attr-name, +.token.namespace, +.token.deleted { + color: #e2777a; +} + +.token.function-name { + color: #6196cc; +} + +.token.boolean, +.token.number, +.token.function { + color: #f08d49; +} + +.token.property, +.token.class-name, +.token.constant, +.token.symbol { + color: #f8c555; +} + +.token.selector, +.token.important, +.token.atrule, +.token.keyword, +.token.builtin { + color: #cc99cd; +} + +.token.string, +.token.char, +.token.attr-value, +.token.regex, +.token.variable { + color: #7ec699; +} + +.token.operator, +.token.entity, +.token.url { + color: #67cdcc; +} + +.token.important, +.token.bold { + font-weight: bold; +} + +.token.italic { + font-style: italic; +} + +.token.entity { + cursor: help; +} + +.token.inserted { + color: green; +} diff --git a/.vitepress/theme/tailwind.css b/.vitepress/theme/tailwind.css new file mode 100644 index 0000000..b5c61c9 --- /dev/null +++ b/.vitepress/theme/tailwind.css @@ -0,0 +1,3 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; diff --git a/index.md b/index.md new file mode 100644 index 0000000..8fe8b0c --- /dev/null +++ b/index.md @@ -0,0 +1,4 @@ +--- +title: The Vue Point +subtext: Updates, tips & opinions from the maintainers of Vue.js. +--- \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..662fabc --- /dev/null +++ b/package.json @@ -0,0 +1,18 @@ +{ + "name": "vue-blog", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "vitepress", + "build": "vitepress build", + "serve": "vitepress serve" + }, + "devDependencies": { + "@tailwindcss/typography": "^0.3.1", + "autoprefixer": "^10.2.1", + "gray-matter": "^4.0.2", + "postcss": "^8.2.4", + "tailwindcss": "^2.0.2", + "vitepress": "^0.11.1" + } +} diff --git a/postcss.config.js b/postcss.config.js new file mode 100644 index 0000000..33ad091 --- /dev/null +++ b/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/posts/hello-2021.md b/posts/hello-2021.md new file mode 100644 index 0000000..9ea62b2 --- /dev/null +++ b/posts/hello-2021.md @@ -0,0 +1,41 @@ +--- +title: Reflections for 2020-2021 +date: 2021-01-11 +author: Evan You +gravatar: eca93da2c67aadafe35d477aa8f454b8 +twitter: "@youyuxi" +--- + +With a new year upon us, we also have a new blog! In this first post, we would like to take a look back at some of the highlights from 2020, as well as some ideas we have for 2021. + +--- + +## Looking Back at 2020 + +This year has been a challenging one, to say the least. Nonetheless, the team has made the best of a difficult situation. In addition to iterating on the current ecosystem, there are some incredible things that we accomplished as a team. METRICS? + +- Vue.js 3 +- Vite, a new web dev tool +- Vue Router 4 +- Vuex 4 - RC +- Vue DevTools 6 - Beta +- New docs site for Vue 3 +- New Single File Component RFCs (`