首先 fork项目https://github.com/graffie/mill,我fork后的项目地址为:
https://github.com/briteming/mill
git clone https://github.com/briteming/mill
cd mill
npm install -g yarn
yarn
nano config.js (这是克隆下来后,才编辑。或者直接在线编辑https://github.com/briteming/mill/blob/master/config.js也行。这样,把项目克隆下来后,就不用编辑config.js了)
cat config.js
显示:
window.MillConfig = {
title: 'Mill blog of brite',
github: {
owner: 'briteming',
repo: 'mill',
},
theme: 'basic'
};
yarn build
~/mill (master)$ ls
LICENSE mill.min.js src/ webpack.config.production.js
README.md node_modules/ style.css yarn.lock
config.js package.json vendor.bundle.js
index.html server.js webpack.config.js
~/mill (master)$
可见~/mill就是静态网站的根目录,在浏览器里访问https://app.netlify.com/drop ,上传~/mill/的内容,得到网址https://kaleidoscopic-vacherin-7db146.netlify.app/
这个mill程序跟之前那个portable-cli 程序类似。我创建新issue(https://github.com/briteming/mill/issues/new)并提交后,我的博客网站https://kaleidoscopic-vacherin-7db146.netlify.app/ 也自动更新了。
或者上传到vercel.com空间:
~/mill (master)$ vc --cwd .
显示:
Vercel CLI 39.1.3
? Set up and deploy “~\mill”? yes
? Which scope should contain your project? luckypoem's projects
? Link to existing project? no
? What’s your project’s name? mill
? In which directory is your code located? ./
Local settings detected in vercel.json:
No framework detected. Default Project Settings:
- Build Command: `npm run vercel-build` or `npm run build`
- Development Command: None
- Install Command: `yarn install`, `pnpm install`, `npm install`, or `bun install`
- Output Directory: `public` if it exists, or `.`
? Want to modify these settings? no
🔗 Linked to luckypoems-projects/mill (created .vercel and added it to .gitignore)
🔍 Inspect: https://vercel.com/luckypoems-projects/mill/4nfAZsdY4ZGinSX8j9w643hsoXwy [5s]
✅ Production: https://mill-n8sv38gpf-luckypoems-projects.vercel.app [5s]
Error: No Output Directory named "public" found after the Build completed. You can configure the Output Directory in your Project Settings.
12799@DESKTOP-B6LK9IO MINGW64 ~/mill (master)
解决"Error: No Output Directory named "public" found after the Build completed.",
访问https://vercel.com/luckypoems-projects/mill/settings,修改output directory的值为 . ,
见图:
然后,访问https://vercel.com/luckypoems-projects/mill/deployments ,找到n8sv38gpf这个deployment那行,点击那行最右端的"...", 然后在弹出的菜单中,选择redeploy,然后会弹出对话框:
在Select an environment处,选择production,然后点击Redeploy按钮,我得到的网址是https://mill-nine.vercel.app,还有预览网址:
https://mill-82uqn9y29-luckypoems-projects.vercel.app/
https://mill-ict0i3ojs-luckypoems-projects.vercel.app/
https://mill-fe1ggdjoj-luckypoems-projects.vercel.app/
https://mill-fgvpe4jks-luckypoems-projects.vercel.app/
我共部署了4次,每部署一次,就会得到一个预览网址。
这个mill程序跟之前那个portable-cli 程序类似。我创建新issue(https://github.com/briteming/mill/issues/new)并提交后,我的博客网站https://mill-nine.vercel.app也自动更新了。
项目地址:
https://github.com/graffie/mill
https://github.com/briteming/mill
演示网址:
https://kaleidoscopic-vacherin-7db146.netlify.app/
https://mill-nine.vercel.app
------------------------------------
Make Your Github Issues As Blog Posts
Recently me and My friend Rock Dai build a funny project called Mill. Let people simply make a personal blog on github, the only thing you need to do is fork the project and write your github issues.
Each of your github repository issue as one of blog post. Github issue is good for work, provider good Markdown support, tags, milestones and some others good features. But have you ever think github issue is also a good place to write blog post ? Every issue has tags, people can comment under your issue, and the important thing is github is good place to share something.
So Mill comes out, we make a good theme let people read your blog posts with some nice themes. We even got a different way to support the themes engine for the static website. You import the theme then refresh the page , you got your new blog. Very different way than Jekyll. Currently we got two themes one basic and one beautiful theme. You can write your own them just follow the instruction.
Wanna have light, beautiful and free personal blog, check out https://github.com/graffie/mill
Themes:
https://github.com/graffie/mill-basic-theme
(mill-basic-theme - The basic theme for https://graffie.github.io/mill)
https://github.com/graffie/mill-modern-theme
(mill-modern-theme - A beautiful modern theme for mill blog)
No comments:
Post a Comment