-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
15,397 additions
and
32,336 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,2 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
/.vitepress/cache | ||
/.vitepress/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
import { defineConfig } from 'vitepress'; | ||
|
||
// https://vitepress.dev/reference/site-config | ||
export default defineConfig({ | ||
title: 'Logseq Copilot', | ||
description: 'Connect Browser and Logseq', | ||
themeConfig: { | ||
// https://vitepress.dev/reference/default-theme-config | ||
nav: [ | ||
{ text: 'Home', link: '/' }, | ||
{ text: 'Documents', link: '/doc' }, | ||
{ text: 'Sponsor', link: '/sponsor' }, | ||
], | ||
logo: '/favicon.png', | ||
|
||
sidebar: [ | ||
{ | ||
text: 'Documents', | ||
items: [ | ||
{ text: 'Introduce', link: '/doc' }, | ||
{ text: 'Setup', link: '/doc/setup' }, | ||
{ text: 'Changelogs', link: '/changelogs' }, | ||
], | ||
}, | ||
{ | ||
text: 'Community', | ||
items: [ | ||
{ | ||
text: 'Github Discussions', | ||
link: 'https://github.com/EINDEX/logseq-copilot/discussions', | ||
}, | ||
{ text: 'Twitter(X)', link: 'https://x.com/eindex' }, | ||
], | ||
}, | ||
{ | ||
text: 'More', | ||
items: [ | ||
{ text: 'Sponsor', link: '/sponsor' }, | ||
{ text: 'Author', link: 'https://eindex.me' }, | ||
], | ||
}, | ||
], | ||
|
||
socialLinks: [ | ||
{ icon: 'github', link: 'https://github.com/eindex/logseq-copilot' }, | ||
], | ||
footer: { | ||
copyright: 'Copyright © 2022-present EINDEX', | ||
}, | ||
editLink: { | ||
pattern: 'https://github.com/eindex/logseq-copilot/edit/main/docs/:path', | ||
}, | ||
search: { | ||
provider: 'local', | ||
}, | ||
}, | ||
sitemap: { | ||
hostname: 'https://logseq-copilot.eindex.me', | ||
}, | ||
lastUpdated: true, | ||
head: [ | ||
['link', { rel: 'icon', href: '/favicon.png' }], | ||
[ | ||
'link', | ||
{ | ||
rel: 'preconnect', | ||
href: 'https://fonts.googleapis.com', | ||
}, | ||
], | ||
[ | ||
'link', | ||
{ | ||
rel: 'preconnect', | ||
href: 'https://fonts.gstatic.com', | ||
}, | ||
], | ||
[ | ||
'link', | ||
{ | ||
rel: 'stylesheet', | ||
href: 'https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&display=swap', | ||
}, | ||
], | ||
[ | ||
'script', | ||
{ | ||
'data-website-id': '6728c810-c8a8-43ae-b072-4788d1ec7cc9', | ||
src: 'https://umami.eindex.me/script.js', | ||
defer: 'true', | ||
async: 'true', | ||
}, | ||
], | ||
[ | ||
'script', | ||
{ | ||
async: '', | ||
src: 'https://www.googletagmanager.com/gtag/js?id=G-23WMVW5BP4', | ||
}, | ||
], | ||
[ | ||
'script', | ||
{}, | ||
`window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', 'G-23WMVW5BP4');`, | ||
], | ||
], | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Changelogs | ||
|
||
<!-- @content --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import axios from 'axios'; | ||
|
||
const changelogsModule = { | ||
async paths() { | ||
const formatBody = (body) => { | ||
let ret = body.trim().replaceAll(/<img.*src="(.*?)".*?>/g, '![]($1)'); | ||
ret = ret.replaceAll( | ||
/https:\/\/github.com\/EINDEX\/logseq-copilot\/(issues|pull)\/(\d+)/g, | ||
'[$1 #$2](https://github.com/EINDEX/logseq-copilot/$1/$2)', | ||
); | ||
const re = new RegExp(/^#{1,2} /gm); | ||
while (ret.match(re)) { | ||
ret = ret.replaceAll(/^(#+ )/gm, '#$1'); | ||
} | ||
ret = ret.replaceAll(/@([\w\-_]+)/g, '[@$1](https://github.com/$1)'); | ||
return ret; | ||
}; | ||
|
||
const resp = await axios({ | ||
method: 'GET', | ||
url: 'https://api.github.com/repos/EINDEX/logseq-copilot/releases', | ||
headers: { | ||
Accept: 'application/vnd.github+json', | ||
'X-Github-Api-Version': '2022-11-28', | ||
}, | ||
}); | ||
|
||
if (resp.status !== 200) { | ||
return; | ||
} | ||
|
||
let ret = ''; | ||
for (const item of resp.data) { | ||
ret += `## [${item.name}](${item.url}) | ||
${formatBody(item.body)}\n`; | ||
} | ||
return [ | ||
{ | ||
params: { changelogs: 'changelogs' }, | ||
content: ret, | ||
}, | ||
]; | ||
}, | ||
}; | ||
|
||
export default changelogsModule; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.