Skip to content

Commit

Permalink
feat: init blog & blog theme
Browse files Browse the repository at this point in the history
  • Loading branch information
ulivz committed Oct 23, 2018
1 parent fb05066 commit 7276664
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 3 deletions.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"workspaces": [
"packages/@vuepress/*",
"packages/vuepress",
"packages/docs"
"packages/docs",
"packages/blog"
],
"description": "Minimalistic doc generator with Vue component based layout system",
"scripts": {
"boot": "node scripts/bootstrap.js",
"dev": "yarn workspace docs dev",
"build": "yarn workspace docs build",
"dev:blog-example": "yarn workspace blog-example dev",
"build:blog-example": "yarn workspace blog-example build",
"dev:blog": "yarn workspace blog dev",
"build:blog": "yarn workspace blog build",
"lint": "eslint --fix packages/**/*.js packages/**/*.vue packages/**/bin/*",
"release": "yarn --pure-lockfile && node scripts/release.js",
"changelog": "node scripts/genChangelog.js run",
Expand Down
2 changes: 2 additions & 0 deletions packages/@vuepress/theme-blog/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__tests__
__mocks__
3 changes: 3 additions & 0 deletions packages/@vuepress/theme-blog/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @vuepress/theme-blog

> theme-blog for vuepress
10 changes: 10 additions & 0 deletions packages/@vuepress/theme-blog/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
plugins: [
'@vuepress/blog',
'@vuepress/pagination',
'@vuepress/medium-zoom',
['@vuepress/search', {
searchMaxSuggestions: 10
}]
]
}
13 changes: 13 additions & 0 deletions packages/@vuepress/theme-blog/layouts/Layout.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<template>
<div class="container">
<header>
<Content slot="header"/>
</header>
<main>
<Content/>
</main>
<footer>
<Content slot="footer"/>
</footer>
</div>
</template>
32 changes: 32 additions & 0 deletions packages/@vuepress/theme-blog/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"private": true,
"name": "@vuepress/theme-blog",
"version": "1.0.0-alpha.13",
"description": "theme-blog for vuepress",
"main": "index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/vuejs/vuepress.git"
},
"keywords": [
"documentation",
"vue",
"vuepress",
"generator"
],
"dependencies": {
"@vuepress/plugin-blog": "^1.0.0-alpha.13",
"@vuepress/plugin-pagination": "^1.0.0-alpha.13",
"@vuepress/plugin-search": "^1.0.0-alpha.13",
"@vuepress/plugin-medium-zoom": "^1.0.0-alpha.13"
},
"author": "ULIVZ <chl814@foxmail.com>",
"license": "MIT",
"bugs": {
"url": "https://github.com/vuejs/vuepress/issues"
},
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/theme-blog#readme"
}
14 changes: 14 additions & 0 deletions packages/blog/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"private": true,
"name": "blog",
"description": "blog of VuePress",
"version": "1.0.0-alpha.13",
"scripts": {
"dev": "vuepress dev source --temp .temp",
"build": "vuepress build source --temp .temp"
},
"dependencies": {
"vuepress": "^1.0.0-alpha.13",
"@vuepress/theme-blog": "^1.0.0-alpha.13"
}
}
4 changes: 4 additions & 0 deletions packages/blog/source/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
title: 'VuePress\'s Blog',
theme: '@vuepress/blog'
}
Binary file added packages/blog/source/.vuepress/public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions packages/blog/source/_posts/1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div class="content"><h1 id="vuepress-blog"><a class="header-anchor" href="#vuepress-blog" aria-hidden="true">#</a>
VuePress' BLOG</h1>
<ul>
<li>Evan You</li>
</ul>
<template slot="projects">
<ul>
<li>Vue.js</li>
<li>VueX</li>
</ul>
</template>
5 changes: 5 additions & 0 deletions packages/blog/source/_posts/1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
date: 2018-10-12
---

# 1
13 changes: 13 additions & 0 deletions packages/blog/source/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
::: slot header
# Here might be a page title
:::

- A Paragraph
- Another Paragraph

::: slot footer
Here's some contact info
:::

- A Paragraph
- Another Paragraph

0 comments on commit 7276664

Please sign in to comment.