This commit is contained in:
parent
358d884bd4
commit
696fe48d53
38
.dockerignore
Normal file
38
.dockerignore
Normal file
@ -0,0 +1,38 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
public/sitemap.xml
|
||||
.vercel
|
||||
|
||||
# production
|
||||
/build
|
||||
*.xml
|
||||
# rss feed
|
||||
/public/feed.xml
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
|
||||
# debug
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
secrets.txt
|
141
.drone.yml
Normal file
141
.drone.yml
Normal file
@ -0,0 +1,141 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: base
|
||||
type: docker
|
||||
|
||||
steps:
|
||||
- name: install
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: docker-registry.ivanli.cc
|
||||
username:
|
||||
from_secret: ivan-docker-username
|
||||
password:
|
||||
from_secret: ivan-docker-password
|
||||
repo: docker-registry.ivanli.cc/ivan/gatsby-blog
|
||||
cache_from:
|
||||
- docker-registry.ivanli.cc/ivan/gatsby-blog:${DRONE_BRANCH}${DRONE_TAG}-amd64
|
||||
dockerfile: Dockerfile
|
||||
build_args:
|
||||
- BUILDKIT_INLINE_CACHE=1
|
||||
target: base
|
||||
tags:
|
||||
- '${DRONE_COMMIT_SHA:0:8}-amd64'
|
||||
- '${DRONE_BRANCH}${DRONE_TAG}-amd64'
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
name: linux-amd64
|
||||
type: docker
|
||||
depends_on:
|
||||
- base
|
||||
|
||||
steps:
|
||||
- name: build&publish
|
||||
image: plugins/docker
|
||||
settings:
|
||||
registry: docker-registry.ivanli.cc
|
||||
username:
|
||||
from_secret: ivan-docker-username
|
||||
password:
|
||||
from_secret: ivan-docker-password
|
||||
repo: docker-registry.ivanli.cc/ivan/gatsby-blog
|
||||
dockerfile: Dockerfile
|
||||
target: release
|
||||
cache_from:
|
||||
- docker-registry.ivanli.cc/ivan/gatsby-blog:${DRONE_COMMIT_SHA:0:8}-amd64
|
||||
tags:
|
||||
- '${DRONE_COMMIT_SHA:0:8}'
|
||||
- '${DRONE_BRANCH}${DRONE_TAG}'
|
||||
- name: notify
|
||||
image: appleboy/drone-telegram
|
||||
failure: ignore
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
environment:
|
||||
PLUGIN_TOKEN:
|
||||
from_secret: drone-telegram-bot-token
|
||||
PLUGIN_TO:
|
||||
from_secret: telegram-notify-to
|
||||
settings:
|
||||
format: markdown
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
✅ Build #{{build.number}} of `{{repo.name}}` succeeded.
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
🌐 {{ build.link }}
|
||||
{{else}}
|
||||
❌ Build #{{build.number}} of `{{repo.name}}` failed.
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
🌐 {{ build.link }}
|
||||
{{/success}}
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
- main
|
||||
- develop
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: deploy
|
||||
clone:
|
||||
disable: true
|
||||
depends_on:
|
||||
- linux-amd64
|
||||
|
||||
steps:
|
||||
- name: deploy
|
||||
image: plugins/webhook
|
||||
settings:
|
||||
token_value:
|
||||
from_secret: watchtower-webhook-token
|
||||
token_type: Bearer
|
||||
urls: https://watchtower.ivanli.cc/v1/update
|
||||
content_type: application/json
|
||||
template: |
|
||||
{
|
||||
"owner": "{{ repo.owner }}",
|
||||
"repo": "{{ repo.name }}",
|
||||
"status": "{{ build.status }}",
|
||||
}
|
||||
|
||||
- name: notify
|
||||
image: appleboy/drone-telegram
|
||||
when:
|
||||
status:
|
||||
- success
|
||||
- failure
|
||||
failure: ignore
|
||||
environment:
|
||||
PLUGIN_TOKEN:
|
||||
from_secret: drone-telegram-bot-token
|
||||
PLUGIN_TO:
|
||||
from_secret: telegram-notify-to
|
||||
settings:
|
||||
format: markdown
|
||||
message: >
|
||||
{{#success build.status}}
|
||||
✅ Deploy #{{build.number}} of `{{repo.name}}` succeeded.
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
🌐 {{ build.link }}
|
||||
{{else}}
|
||||
❌ Deploy #{{build.number}} of `{{repo.name}}` failed.
|
||||
📝 Commit by {{commit.author}} on `{{commit.branch}}`:
|
||||
```
|
||||
{{commit.message}}
|
||||
```
|
||||
🌐 {{ build.link }}
|
||||
{{/success}}
|
6
.gitignore
vendored
6
.gitignore
vendored
@ -18,7 +18,7 @@ public/sitemap.xml
|
||||
/build
|
||||
*.xml
|
||||
# rss feed
|
||||
/public/feed.xml
|
||||
/public/feed.xml
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
@ -33,4 +33,6 @@ yarn-error.log*
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
.env.production.local
|
||||
|
||||
secrets.txt
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
FROM node:16-alpine as base
|
||||
WORKDIR /app
|
||||
COPY package-lock.json package.json ./
|
||||
RUN npm ci --no-audit
|
||||
COPY . .
|
||||
|
||||
FROM node:16-alpine as release
|
||||
WORKDIR /app
|
||||
COPY --from=base /app ./
|
||||
RUN npm run build &&\
|
||||
npm prune --omit dev
|
||||
EXPOSE 80
|
||||
CMD npm run serve -- --port 80
|
@ -1,16 +1,16 @@
|
||||
---
|
||||
name: Tails Azimuth
|
||||
avatar: /static/images/avatar.png
|
||||
occupation: Professor of Atmospheric Science
|
||||
company: Stanford University
|
||||
email: address@yoursite.com
|
||||
twitter: https://twitter.com/Twitter
|
||||
linkedin: https://www.linkedin.com
|
||||
github: https://github.com
|
||||
name: Ivan Li
|
||||
avatar: https://pan.ivanli.cc/api/v3/file/source/1234/%E5%A4%B4%E5%83%8F.png?sign=xIgy54DyFRYupxjZJbK02HmpKX8C53YR-O0I18Rxm70%3D%3A0
|
||||
occupation: Web Full Stack Developer
|
||||
email: master@ivanli.cc
|
||||
github: https://github.com/IvanLi-CN
|
||||
---
|
||||
|
||||
Tails Azimuth is a professor of atmospheric sciences at the Stanford AI Lab. His research interests includes complexity modelling of tailwinds, headwinds and crosswinds.
|
||||
你好呀!
|
||||
|
||||
He leads the clean energy group which develops 3D air pollution-climate models, writes differential equation solvers, and manufactures titanium plated air ballons. In his free time he bakes raspberry pi.
|
||||
我是 Ivan Li,从事 Web 全栈开发工作,最近在研究电子电路与嵌入式开发。这是我的博客,用来与到访的你分享我的繁星点点。
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed neque elit, tristique placerat feugiat ac, facilisis vitae arcu. Proin eget egestas augue. Praesent ut sem nec arcu pellentesque aliquet. Duis dapibus diam vel metus tempus vulputate.
|
||||
我平常做 Web 开发一般会使用 **React**、**Angular**、**Vue**、**NestJS** 相关生态,我偏好 PostgreSQL 存储数据。我喜欢 MacOS 和 ArchLinux。
|
||||
我正在学习 Rust 语言,它非常棒,我在用 **Rust** 和 **ESP32-C3** 实现一些嵌入式的工程。我还在慢慢摸索电子电路知识,希望我能平安地学到足够用的知识。
|
||||
|
||||
哦,对了!因为平常使用 [Logseq](https://notes.ivanli.cc/) 做记录,它相当于我的扩展记忆体,我的很多公开内容都在那儿。不过最后我会找个时间,将内容梳理过来,请放心。
|
||||
|
@ -1,20 +1,20 @@
|
||||
const projectsData = [
|
||||
{
|
||||
title: 'A Search Engine',
|
||||
description: `What if you could look up any information in the world? Webpages, images, videos
|
||||
and more. Google has many features to help you find exactly what you're looking
|
||||
for.`,
|
||||
imgSrc: '/static/images/google.png',
|
||||
href: 'https://www.google.com',
|
||||
},
|
||||
{
|
||||
title: 'The Time Machine',
|
||||
description: `Imagine being able to travel back in time or to the future. Simple turn the knob
|
||||
to the desired date and press "Go". No more worrying about lost keys or
|
||||
forgotten headphones with this simple yet affordable solution.`,
|
||||
imgSrc: '/static/images/time-machine.jpg',
|
||||
href: '/blog/the-time-machine',
|
||||
},
|
||||
// {
|
||||
// title: 'A Search Engine',
|
||||
// description: `What if you could look up any information in the world? Webpages, images, videos
|
||||
// and more. Google has many features to help you find exactly what you're looking
|
||||
// for.`,
|
||||
// imgSrc: '/static/images/google.png',
|
||||
// href: 'https://www.google.com',
|
||||
// },
|
||||
// {
|
||||
// title: 'The Time Machine',
|
||||
// description: `Imagine being able to travel back in time or to the future. Simple turn the knob
|
||||
// to the desired date and press "Go". No more worrying about lost keys or
|
||||
// forgotten headphones with this simple yet affordable solution.`,
|
||||
// imgSrc: '/static/images/time-machine.jpg',
|
||||
// href: '/blog/the-time-machine',
|
||||
// },
|
||||
]
|
||||
|
||||
export default projectsData
|
||||
|
@ -1,22 +1,25 @@
|
||||
const siteMetadata = {
|
||||
title: 'Next.js Starter Blog',
|
||||
author: 'Tails Azimuth',
|
||||
headerTitle: 'TailwindBlog',
|
||||
description: 'A blog created with Next.js and Tailwind.css',
|
||||
language: 'en-us',
|
||||
title: 'Ivan‘s Blog',
|
||||
author: 'Ivan Li',
|
||||
headerTitle: 'Ivan‘s Blog',
|
||||
description:
|
||||
'一个 Web 全栈开发者、嵌入式开发爱好者,与你分享我的工作和生活。专注 React、Node.js、Rust,热爱 Self-Hosted、IoT、硬件。',
|
||||
language: 'zh-CN',
|
||||
theme: 'system', // system, dark or light
|
||||
siteUrl: 'https://tailwind-nextjs-starter-blog.vercel.app',
|
||||
siteRepo: 'https://github.com/timlrx/tailwind-nextjs-starter-blog',
|
||||
siteLogo: '/static/images/logo.png',
|
||||
image: '/static/images/avatar.png',
|
||||
siteUrl: 'https://ivanli.cc/',
|
||||
siteRepo: 'https://git.ivanli.cc/ivan/taliwind-nextjs-blog',
|
||||
siteLogo:
|
||||
'https://pan.ivanli.cc/api/v3/file/source/1234/%E5%A4%B4%E5%83%8F.png?sign=xIgy54DyFRYupxjZJbK02HmpKX8C53YR-O0I18Rxm70%3D%3A0',
|
||||
image:
|
||||
'https://pan.ivanli.cc/api/v3/file/source/1234/%E5%A4%B4%E5%83%8F.png?sign=xIgy54DyFRYupxjZJbK02HmpKX8C53YR-O0I18Rxm70%3D%3A0',
|
||||
socialBanner: '/static/images/twitter-card.png',
|
||||
email: 'address@yoursite.com',
|
||||
github: 'https://github.com',
|
||||
twitter: 'https://twitter.com/Twitter',
|
||||
facebook: 'https://facebook.com',
|
||||
youtube: 'https://youtube.com',
|
||||
linkedin: 'https://www.linkedin.com',
|
||||
locale: 'en-US',
|
||||
email: 'master@ivanli.cc',
|
||||
github: 'https://github.com/IvanLi-CN',
|
||||
// twitter: 'https://twitter.com/Twitter',
|
||||
// facebook: 'https://facebook.com',
|
||||
// youtube: 'https://youtube.com',
|
||||
// linkedin: 'https://www.linkedin.com',
|
||||
locale: 'zh-CN',
|
||||
analytics: {
|
||||
// If you want to use an analytics provider you have to add it to the
|
||||
// content security policy in the `next.config.js` file.
|
||||
|
@ -58,6 +58,9 @@ module.exports = withBundleAnalyzer({
|
||||
eslint: {
|
||||
dirs: ['pages', 'components', 'lib', 'layouts', 'scripts'],
|
||||
},
|
||||
images: {
|
||||
domains: ['pan.ivanli.cc'],
|
||||
},
|
||||
async headers() {
|
||||
return [
|
||||
{
|
||||
|
BIN
package-lock.json
generated
BIN
package-lock.json
generated
Binary file not shown.
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "tailwind-nextjs-starter-blog",
|
||||
"name": "tailwind-nextjs-blog",
|
||||
"version": "1.5.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
@ -17,7 +17,7 @@ export default function FourZeroFour() {
|
||||
Sorry we couldn't find this page.
|
||||
</p>
|
||||
<p className="mb-8">
|
||||
But dont worry, you can find plenty of other things on our homepage.
|
||||
But don't worry, you can find plenty of other things on our homepage.
|
||||
</p>
|
||||
<Link href="/">
|
||||
<button className="focus:shadow-outline-blue inline rounded-lg border border-transparent bg-blue-600 px-4 py-2 text-sm font-medium leading-5 text-white shadow transition-colors duration-150 hover:bg-blue-700 focus:outline-none dark:hover:bg-blue-500">
|
||||
|
@ -22,7 +22,7 @@ export default function Home({ posts }) {
|
||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||
<div className="space-y-2 pt-6 pb-8 md:space-y-5">
|
||||
<h1 className="text-3xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||
Latest
|
||||
Hi.
|
||||
</h1>
|
||||
<p className="text-lg leading-7 text-gray-500 dark:text-gray-400">
|
||||
{siteMetadata.description}
|
||||
|
Loading…
Reference in New Issue
Block a user