|
| 1 | + |
| 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) |
0 commit comments