Skip to content

Commit 83a2f72

Browse files
committed
feat: init
0 parents  commit 83a2f72

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+15855
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
dist
3+
*.log
4+
public

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true
4+
}

README.md

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
![create-portfolio-preview](https://user-images.githubusercontent.com/8784712/58467049-7f611d00-816d-11e9-954d-2048784bbe11.png)
2+
3+
Create Portfolio helps you kickstart a personal website that showcases your work as a software developer.
4+
5+
## Quick Start
6+
7+
Create a new project with `npm init`:
8+
9+
```bash
10+
npm init portfolio my-site
11+
# OR Yarn
12+
yarn create portfolio my-site
13+
```
14+
15+
Change into your new directory:
16+
17+
```bash
18+
cd my-site
19+
```
20+
21+
Install dependencies:
22+
23+
```bash
24+
npm install
25+
```
26+
27+
Run the website locally:
28+
29+
```bash
30+
npm run dev
31+
```
32+
33+
Now browse to http://localhost:3000 you should see your page.
34+
35+
## Build for Production
36+
37+
Run `npm run build` to create a production build of your app, generated files can be found at `./public` folder, then it can be [deployed as a static website](https://saber.land/docs/deployment.html).
38+
39+
## Creating a Post
40+
41+
Check out [the example post](./packages/create-portfolio/template/pages/_posts/my-first-post.md).
42+
43+
## Site Configuration
44+
45+
Use `siteConfig` option in `saber-config.js` for site configuration.
46+
47+
### Site Title
48+
49+
It defaults to your GitHub name, you can customize it in `saber-config.js`:
50+
51+
```js
52+
module.exports = {
53+
siteConfig: {
54+
title: 'A Custom Title'
55+
}
56+
}
57+
```
58+
59+
### Site Description
60+
61+
It defaults to your GitHub bio, you can customize it in `saber-config.js`:
62+
63+
```js
64+
module.exports = {
65+
siteConfig: {
66+
description: 'Introduce yourself...'
67+
}
68+
}
69+
```
70+
71+
## Theme Configuration
72+
73+
Use `themeConfig` option in `saber-config.js` for theme configuration.
74+
75+
### Style
76+
77+
By default it uses `dark` style:
78+
79+
```js
80+
module.exports = {
81+
themeConfig: {
82+
style: 'dark'
83+
}
84+
}
85+
```
86+
87+
Available styles:
88+
89+
- `dark`
90+
- `light`
91+
92+
### GitHub
93+
94+
This is required, we fetch data for this user.
95+
96+
```js
97+
module.exports = {
98+
themeConfig: {
99+
// Your GitHub Username
100+
github: 'egoist'
101+
}
102+
}
103+
```
104+
105+
### Twitter
106+
107+
Show the link to your Twitter profile.
108+
109+
```js
110+
module.exports = {
111+
themeConfig: {
112+
// Twitter handle
113+
twitter: '_egoistlily'
114+
}
115+
}
116+
```
117+
118+
### Sponsor
119+
120+
Add a _Sponsor_ button:
121+
122+
```js
123+
module.exports = {
124+
themeConfig: {
125+
// Link to the donation page
126+
sponsorLink: 'https://patreon.com/egoist',
127+
// The tip to show when you hover the sponsor button
128+
sponsorTip: 'Support me'
129+
}
130+
}
131+
```
132+
133+
## License
134+
135+
MIT © [EGOIST](https://github.com/egoist)

circle.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
version: 2
3+
jobs:
4+
build:
5+
docker:
6+
- image: circleci/node:latest
7+
branches:
8+
ignore:
9+
- gh-pages # list of branches to ignore
10+
- /release\/.*/ # or ignore regexes
11+
steps:
12+
- checkout
13+
- restore_cache:
14+
key: dependency-cache-{{ checksum "yarn.lock" }}
15+
- run:
16+
name: install dependences
17+
command: yarn
18+
- save_cache:
19+
key: dependency-cache-{{ checksum "yarn.lock" }}
20+
paths:
21+
- ./node_modules
22+
- run:
23+
name: test
24+
command: yarn test

demo/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
*.log
3+
.DS_Store
4+
5+
# Saber output
6+
public
7+
.saber

demo/package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"private": true,
3+
"name": "demo",
4+
"license": "MIT",
5+
"scripts": {
6+
"dev": "saber",
7+
"build": "saber build"
8+
},
9+
"devDependencies": {
10+
"saber": "^0.6.4",
11+
"saber-plugin-query-posts": "^0.3.1"
12+
}
13+
}

demo/pages/_posts/my-first-post.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: My First Post
3+
layout: post
4+
date: 2019-05-26 20:23:00
5+
tags:
6+
- life
7+
---
8+
9+
Consectetur nostrud elit do do do nisi quis. Cillum commodo Lorem sunt non sit velit nostrud fugiat. Et ad anim sint veniam occaecat nulla eu id irure occaecat nulla excepteur elit sint. Tempor dolor dolore aute excepteur nisi Lorem incididunt excepteur magna sint proident in voluptate dolore. Anim eiusmod ea sint velit enim irure est enim duis eiusmod. Culpa ea ea duis anim esse culpa anim laborum proident deserunt quis nisi. Laborum in irure aute consectetur enim cillum incididunt mollit.
10+
11+
Ullamco non incididunt adipisicing duis. Laborum consectetur occaecat veniam nisi amet consectetur laborum cupidatat culpa aute dolor id. Velit consectetur officia commodo elit. Qui officia adipisicing irure laboris non ullamco est cupidatat eu non Lorem excepteur. Ex cupidatat aliqua eu amet consequat Lorem excepteur reprehenderit consectetur.
12+
13+
Adipisicing nulla sunt ipsum ipsum ea Lorem aliquip et incididunt cillum eiusmod aliquip Lorem culpa. Voluptate laborum id eu exercitation esse aliqua id reprehenderit enim consequat dolor eu excepteur. Qui ut est ex aute ullamco exercitation id. Commodo reprehenderit exercitation et incididunt officia aute eu nostrud nisi eiusmod ipsum.
14+
15+
Do occaecat consectetur nisi proident excepteur pariatur esse nisi. Aute magna proident consectetur mollit Lorem non est ad ea non proident. Anim reprehenderit ut adipisicing commodo veniam sit. Nostrud eu sint labore culpa proident laborum do adipisicing nostrud esse. Nostrud anim adipisicing irure aliquip incididunt ea ea.
16+
17+
Cupidatat id occaecat proident officia. Laboris in incididunt ut dolor in qui amet nostrud ad exercitation minim nulla consectetur. Occaecat dolor labore eu nostrud nulla nulla ex dolore.

demo/pages/about.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
title: About
3+
layout: page
4+
---
5+
6+
Nostrud et dolor aliquip qui magna adipisicing cillum cillum nisi culpa aliquip exercitation. Dolor reprehenderit sint laborum in nisi deserunt culpa ea irure do sit veniam fugiat. Sit ipsum esse excepteur ad sunt reprehenderit in duis. Et non voluptate esse eu elit duis nulla esse veniam.
7+
8+
Culpa sit sit cupidatat nulla sit minim fugiat. Cupidatat tempor ut ut Lorem aliqua id pariatur ex velit enim occaecat cupidatat elit tempor. Voluptate officia exercitation ullamco ullamco incididunt irure reprehenderit deserunt occaecat. Minim excepteur aliquip ullamco elit sint exercitation laboris. Ad deserunt ipsum enim exercitation sint culpa ad cillum culpa nostrud nulla ullamco amet deserunt. Consequat voluptate cillum culpa sunt.
9+
10+
Lorem fugiat consectetur nostrud elit aute do ad duis adipisicing ullamco labore officia dolore. Reprehenderit incididunt incididunt eu sint pariatur minim magna. Ipsum Lorem tempor non est commodo id officia. Exercitation mollit incididunt proident veniam veniam aute. Reprehenderit deserunt magna tempor adipisicing sit dolor non exercitation ut. Exercitation sint dolor ullamco veniam non do deserunt excepteur non nisi. Labore irure culpa esse dolor dolor quis dolore exercitation ad.
11+
12+
Mollit mollit incididunt aute do fugiat mollit. Proident exercitation mollit culpa sint sit enim laborum. Ut do magna ad Lorem. Exercitation cillum dolor Lorem nisi cillum proident aliquip pariatur mollit. Proident est qui duis ullamco duis eu tempor tempor nostrud velit exercitation reprehenderit aliqua Lorem.
13+
14+
Nulla ad fugiat quis in veniam minim adipisicing. Magna fugiat tempor ut esse quis cupidatat quis exercitation officia. Sit laboris enim aliquip in exercitation elit et eu incididunt nostrud exercitation culpa culpa est. Occaecat ea fugiat proident non esse in aliqua occaecat ea labore quis velit deserunt. Irure nostrud nostrud dolor incididunt velit.
15+
16+
Sint velit Lorem occaecat consectetur eu irure anim incididunt et mollit eu. Adipisicing fugiat tempor excepteur cupidatat cupidatat adipisicing aliqua officia. Tempor veniam commodo laborum et sunt. Ea pariatur ullamco et labore dolor do ad eiusmod magna. Veniam voluptate amet ea sunt aute elit incididunt. Magna deserunt laborum cupidatat commodo mollit in id id ut adipisicing amet.

demo/pages/index.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
layout: home
3+
4+
# Inject blog posts as `page.posts`
5+
injectAllPosts:
6+
perPage: 6
7+
---

demo/pages/posts.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Posts
3+
layout: posts
4+
5+
# Inject posts as `page.posts`
6+
injectAllPosts:
7+
perPage: 30
8+
9+
# Ensure the permalink
10+
# So even if you change `permalinks` in saber-config.js
11+
# It won't break saber-theme-portfolio
12+
permalink: /posts
13+
---

demo/saber-config.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Saber config file
2+
// https://saber.land/docs/saber-config.html
3+
4+
module.exports = {
5+
siteConfig: {
6+
description: 'An unsung artist.'
7+
},
8+
9+
// Use the package `saber-theme-portfolio`
10+
// More: https://saber.land/docs/themes.html
11+
theme: '../packages/saber-theme-portfolio/src',
12+
13+
// Configure the theme
14+
themeConfig: {
15+
style: 'dark',
16+
github: 'egoist',
17+
twitter: '_egoistlily',
18+
sponsorLink: 'https://patreon.com/egoist',
19+
sponsorTip: 'Support my work',
20+
nav: [
21+
{
22+
text: 'Home',
23+
link: '/'
24+
},
25+
{
26+
text: 'About',
27+
link: '/about'
28+
}
29+
]
30+
},
31+
32+
permalinks: {
33+
page: '/:slug',
34+
post: '/posts/:slug'
35+
},
36+
37+
plugins: [
38+
{
39+
resolve: 'saber-plugin-query-posts'
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)