Skip to content

Commit

Permalink
chore: add notes
Browse files Browse the repository at this point in the history
  • Loading branch information
chihuo2104 committed Mar 18, 2023
1 parent 9c3f1f5 commit ce9aeb1
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 41 deletions.
2 changes: 1 addition & 1 deletion app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import setting from '@/mocks/settings'
import page from '@/mocks/pages'
// import { useStore } from '@/store'
import { onMounted, computed, ref, onUpdated } from 'vue'
import version from '~~/version'
import version from '@/version'
import confdata from '@/config'
const settings = ref({})
Expand Down
Empty file added components/ArticleCard.vue
Empty file.
5 changes: 3 additions & 2 deletions components/Icon.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import { defineProps } from 'vue'
import { mdiAccount, mdiClockOutline, mdiAccountArrowUp, mdiComment, mdiBook, mdiTag } from '@mdi/js'
import { mdiAccount, mdiClockOutline, mdiAccountArrowUp, mdiComment, mdiBook, mdiTag, mdiFountainPenTip } from '@mdi/js'
const props = defineProps({
name: String,
width: Number,
Expand All @@ -12,7 +12,8 @@ const mdiArray = {
accountarrowup: mdiAccountArrowUp,
comment: mdiComment,
book: mdiBook,
tag: mdiTag
tag: mdiTag,
textCount: mdiFountainPenTip
}
const read = mdiArray[props.name] || ''
const width = props.width || 24
Expand Down
2 changes: 1 addition & 1 deletion config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default {
model: 'production', // mocks is the mockdata in mocks folder; production uses the mock2get json file.
model: 'mocks', // mocks is the mockdata in mocks folder; production uses the mock2get json file.
settings: 'http://127.0.0.1:3000/chiblog.json'
}
15 changes: 9 additions & 6 deletions mocks/pages.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
export default [
{
id: 1,
type: 'link',
url: 'https://chihuo2104.dev',
title: '测试',
name: 'about',
target: '_blank'
id: 1, // the id of page
type: 'link', // the type of page. if this is a link, it will jump to another url.
url: 'https://chihuo2104.dev', // the url you want to jump
title: '测试', // the title of this page
// type is link has them
name: 'about', // the name(path) of this page, url will be shown as /[name]
target: '_blank' // <a target="[target]"/>
// if it is a article
// content: '123' // the content of this page, markdown supported.
},
{
id: 2,
Expand Down
23 changes: 13 additions & 10 deletions mocks/posts.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
export default [
{
id: 1,
title: '你处于test模式!',
path: 'default',
name: 'default',
time: 1657027436,
updtime: 1657027880,
author: 'admin',
content: '# 可能是网络问题!',
china: true,
comment: false
id: 1, // the post id
title: '你处于test模式!', // the title of this post
path: 'default测试', // the path of this post, will be shown at /posts/[path]
name: 'default', // the name of this post, English alphabets, numbers and - only.
time: 1657027436, // the release time of this post, unix time
updtime: 1657027880, // the update time of this post, unix time
author: 'admin', // the author of this post
content: '# 可能是网络问题!', // the content of this post, markdown supported. transfer your markdown file into one-row: https://chicdn.cn/mdw/
china: true, // china support, if you are in china mainland, you are not allowed to see this article if the china marked false
comment: false, // comment support.
desc: '摘要测试qwqwqwqwqwq', // the describe of this article, will be shown in the article list and SEO describtion
category: 'test', // the category of this article, will be shown in the article list
tags: ['test', 'html', 'css'] // the tags of this article, will be shown in the post.
},
{
id: 2,
Expand Down
44 changes: 23 additions & 21 deletions mocks/settings.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,46 @@
export default {
site: {
title: '您已离线',
baseurl: 'https://offline',
title: '您已离线', // The title of your blog
baseurl: 'https://offline', // The site baseurl
comment: {
enabled: true,
commiturl: 'http://127.0.0.1:8787/',
commiturl: 'http://127.0.0.1:8787/', // The comment commit url [with data in @/components/Comments.vue ]
avatar: {
type: 'gravatar',
cacheurl: '//g.chicdn.cn/avatar/',
ghcacheurl: '//ghavatar.chicdn.cn/u/',
d: 'monsterid'
type: 'gravatar', // no longer supported.
cacheurl: '//g.chicdn.cn/avatar/', // The gravatar cache cdn url (Default https://secure.gravatar.com/avatar/)
ghcacheurl: '//ghavatar.chicdn.cn/u/', // The github avatar cdn url (Default https://avatars.githubusercontent.com/ )
d: 'monsterid' // The d you want to show like GRAVATAR_URL/[ID]?d=[this is D]
},
ghauth: {
enabled: true,
client_id: '204a53c84ec3ff5e5a82',
client_secret: 'f29752d306876dc5d7959f8da8a37386ea3e3adf',
proxy_url: 'https://ghproxy.moekonnyaku.workers.dev/' // You can deploy this in the cloudflare workers. Code: https://p.atri.tk/j3i
// Due to the sucerty problem, the client secret is not supported on chiblog v1.1.3 and above.
// proxy_url: 'https://ghproxy.moekonnyaku.workers.dev/' // You can deploy this in the cloudflare workers. Code: https://p.atri.tk/j3i
// The ghauth authenation url is no longer supported, please use the server get way instead.
},
backend: {
enabled: true,
type: 'workers', // The next will be like disqus, valine and so on.(Serverless options) You can deploy the code in the cloudflare workers. Code: https://p.atri.tk/Mm4 Guide: https://chiblog.apps.chihuo2104.dev/comment-service/workers (WIP)
enabled: true, // enable your comment backend system
type: 'workers', // The next will be like disqus, valine and so on.(Serverless options) You can deploy the code in the cloudflare workers. Code: https://p.atri.tk/Mm4 Guide: https://chiblog.apps.chihuo2104.dev/comment-service/workers (WIP)
// When your type is workers (departed in chiblog v1.1.3). Please use 'simplecomment' instead. chicomment-simple is a go-based comment management system. URL: https://github.com/chi-net/chicomment-simple/
url: 'http://127.0.0.1:8787/'
}
},
footer: '',
announcement: '',
footer: '', // the footer will show below the copyright statement. support html tag
announcement: '', // the announcement will show in the index page. support html tag
author: {
name: 'chihuo2104',
url: 'https://im.chihuo2104.dev/'
name: 'chihuo2104', // the site's owner's name
url: 'https://im.chihuo2104.dev/' // the site's owner's personal site
},
copyright: {
startyear: 2018
startyear: 2018 // when the year your copyright starts
},
customjs: {
customjs: { // custom javascript file can be ran in this appliaction
enabled: false,
type: 'script', // script or url
script: 'alert(\'Hi!\')'
script: 'alert(\'Hi!\')' // if type is script, the script is the script you want to run. else like url, you must fill in this with your url.
},
showstats: true,
showcopyright: false,
debug: false
showstats: true, // whether show stats (Rendered at and Render cost)
showcopyright: false, // show your copyright information
debug: false // When the debug mode is on, it will display console.log.
}
}

0 comments on commit ce9aeb1

Please sign in to comment.