mirror of
https://github.com/fmhy/edit.git
synced 2025-07-31 00:02:17 +10:00
chore: license code under apache 2.0
This commit is contained in:
parent
b942881fbb
commit
09e3a2051c
29 changed files with 414 additions and 288 deletions
|
@ -1,19 +1,25 @@
|
||||||
{
|
{
|
||||||
"docs/.vitepress/**/*.ts": [
|
"**/*.ts": [
|
||||||
"/**",
|
"/**",
|
||||||
" Copyright (c) taskylizard. All rights reserved.",
|
"* Copyright (c) taskylizard. All rights reserved.",
|
||||||
"",
|
"*",
|
||||||
" Licensed under the Apache License, Version 2.0 (the \"License\");",
|
"* Licensed under the Apache License, Version 2.0 (the \"License\");",
|
||||||
" you may not use this file except in compliance with the License.",
|
"* you may not use this file except in compliance with the License.",
|
||||||
" You may obtain a copy of the License at",
|
"* You may obtain a copy of the License at",
|
||||||
"",
|
"*",
|
||||||
" http://www.apache.org/licenses/LICENSE-2.0",
|
"* http://www.apache.org/licenses/LICENSE-2.0",
|
||||||
"",
|
"*",
|
||||||
" Unless required by applicable law or agreed to in writing, software",
|
"* Unless required by applicable law or agreed to in writing, software",
|
||||||
" distributed under the License is distributed on an \"AS IS\" BASIS,",
|
"* distributed under the License is distributed on an \"AS IS\" BASIS,",
|
||||||
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
"* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
||||||
" See the License for the specific language governing permissions and",
|
"* See the License for the specific language governing permissions and",
|
||||||
" limitations under the License.",
|
"* limitations under the License.",
|
||||||
"*/"
|
"*/"
|
||||||
|
],
|
||||||
|
"ignore": [
|
||||||
|
"node_modules",
|
||||||
|
"dist",
|
||||||
|
"docs/.vitepress/dist",
|
||||||
|
"docs/.vitepress/cache"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import { corsEventHandler } from 'nitro-cors'
|
import { corsEventHandler } from 'nitro-cors'
|
||||||
|
|
||||||
export default corsEventHandler(
|
export default corsEventHandler(
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import { fetcher } from 'itty-fetcher'
|
import { fetcher } from 'itty-fetcher'
|
||||||
import {
|
import {
|
||||||
FeedbackSchema,
|
FeedbackSchema,
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
export default eventHandler(() => {
|
export default eventHandler(() => {
|
||||||
return { nitro: 'works' }
|
return { nitro: 'works' }
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import { fetcher } from 'itty-fetcher'
|
import { fetcher } from 'itty-fetcher'
|
||||||
|
|
||||||
// Look inside tbe docs directory
|
// Look inside tbe docs directory
|
||||||
|
|
14
docs/.vitepress/LICENSE
Normal file
14
docs/.vitepress/LICENSE
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
Copyright (c) taskylizard. Apache License 2.0
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
3
docs/.vitepress/README.md
Normal file
3
docs/.vitepress/README.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
This is the website source code to be used with [VitePress](https://vitepress.dev/).
|
||||||
|
|
||||||
|
Licensed under the Apache License v2.0, see [LICENSE](./LICENSE) for more information.
|
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import type { DefaultTheme } from 'vitepress'
|
import type { DefaultTheme } from 'vitepress'
|
||||||
import { transform, transformGuide } from './transformer'
|
import { transform, transformGuide } from './transformer'
|
||||||
|
@ -26,9 +26,8 @@ export const meta = {
|
||||||
|
|
||||||
export const commitRef =
|
export const commitRef =
|
||||||
process.env.CF_PAGES && process.env.CF_PAGES_COMMIT_SHA
|
process.env.CF_PAGES && process.env.CF_PAGES_COMMIT_SHA
|
||||||
? `<a href="https://github.com/fmhy/FMHYEdit/commit/${
|
? `<a href="https://github.com/fmhy/FMHYEdit/commit/${process.env.CF_PAGES_COMMIT_SHA
|
||||||
process.env.CF_PAGES_COMMIT_SHA
|
}">${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}</a>`
|
||||||
}">${process.env.CF_PAGES_COMMIT_SHA.slice(0, 8)}</a>`
|
|
||||||
: 'dev'
|
: 'dev'
|
||||||
|
|
||||||
export const feedback = `<a href="/feedback" class="feedback-footer">Made with ❤</a>`
|
export const feedback = `<a href="/feedback" class="feedback-footer">Made with ❤</a>`
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* Barrel generated using @taskylizard/tasker.
|
* Barrel generated using @taskylizard/tasker.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import type { HeadConfig, TransformContext } from 'vitepress'
|
import type { HeadConfig, TransformContext } from 'vitepress'
|
||||||
|
|
||||||
export function generateMeta(context: TransformContext, hostname: string) {
|
export function generateMeta(context: TransformContext, hostname: string) {
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
import { mkdir, readFile, writeFile } from 'node:fs/promises'
|
||||||
import { dirname, resolve } from 'node:path'
|
import { dirname, resolve } from 'node:path'
|
||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
|
@ -26,7 +26,7 @@ import { headers } from '../transformer/constants'
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url))
|
const __dirname = dirname(fileURLToPath(import.meta.url))
|
||||||
const __fonts = resolve(__dirname, '../fonts')
|
const __fonts = resolve(__dirname, '../fonts')
|
||||||
|
|
||||||
export async function generateImages(config: SiteConfig): Promise<void> {
|
export async function generateImages(config: SiteConfig): Promise {
|
||||||
const pages = await createContentLoader('**/*.md', { excerpt: true }).load()
|
const pages = await createContentLoader('**/*.md', { excerpt: true }).load()
|
||||||
const template = await readFile(resolve(__dirname, './Template.vue'), 'utf-8')
|
const template = await readFile(resolve(__dirname, './Template.vue'), 'utf-8')
|
||||||
|
|
||||||
|
@ -80,20 +80,20 @@ async function generateImage({
|
||||||
template,
|
template,
|
||||||
outDir,
|
outDir,
|
||||||
fonts
|
fonts
|
||||||
}: GenerateImagesOptions): Promise<void> {
|
}: GenerateImagesOptions): Promise {
|
||||||
const { frontmatter, url } = page
|
const { frontmatter, url } = page
|
||||||
|
|
||||||
const _page = getPage(url)
|
const _page = getPage(url)
|
||||||
const title =
|
const title =
|
||||||
frontmatter.layout === 'home'
|
frontmatter.layout === 'home'
|
||||||
? (frontmatter.hero.name ?? frontmatter.title)
|
? frontmatter.hero.name ?? frontmatter.title
|
||||||
: frontmatter.title
|
: frontmatter.title
|
||||||
? frontmatter.title
|
? frontmatter.title
|
||||||
: _page?.title
|
: _page?.title
|
||||||
|
|
||||||
const description =
|
const description =
|
||||||
frontmatter.layout === 'home'
|
frontmatter.layout === 'home'
|
||||||
? (frontmatter.hero.tagline ?? frontmatter.description)
|
? frontmatter.hero.tagline ?? frontmatter.description
|
||||||
: frontmatter.description
|
: frontmatter.description
|
||||||
? frontmatter.description
|
? frontmatter.description
|
||||||
: _page?.description
|
: _page?.description
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import path from 'node:path'
|
import path from 'node:path'
|
||||||
import { writeFileSync } from 'node:fs'
|
import { writeFileSync } from 'node:fs'
|
||||||
import { Feed } from 'feed'
|
import { Feed } from 'feed'
|
||||||
|
@ -24,7 +24,7 @@ import {
|
||||||
import consola from 'consola'
|
import consola from 'consola'
|
||||||
import { meta } from '../constants'
|
import { meta } from '../constants'
|
||||||
|
|
||||||
export async function generateFeed(config: SiteConfig): Promise<void> {
|
export async function generateFeed(config: SiteConfig): Promise {
|
||||||
const feed: Feed = new Feed({
|
const feed: Feed = new Feed({
|
||||||
id: meta.hostname,
|
id: meta.hostname,
|
||||||
link: meta.hostname,
|
link: meta.hostname,
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { readFile } from 'node:fs/promises'
|
import { readFile } from 'node:fs/promises'
|
||||||
import { dirname, resolve } from 'node:path'
|
import { dirname, resolve } from 'node:path'
|
||||||
import { fileURLToPath } from 'node:url'
|
import { fileURLToPath } from 'node:url'
|
||||||
|
|
15
docs/.vitepress/imports.d.ts
vendored
15
docs/.vitepress/imports.d.ts
vendored
|
@ -1,3 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import type { MarkdownRenderer } from 'vitepress'
|
import type { MarkdownRenderer } from 'vitepress'
|
||||||
|
|
||||||
// FIXME: tasky: possibly write less horror jank?
|
// FIXME: tasky: possibly write less horror jank?
|
||||||
|
@ -27,7 +27,6 @@ export function base64DecodePlugin(md: MarkdownRenderer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
md.renderer.rules.code_inline = function (tokens, idx, options, env, self) {
|
md.renderer.rules.code_inline = function (tokens, idx, options, env, self) {
|
||||||
// @ts-expect-error shut the fuck up already I HATE THIS
|
|
||||||
if (
|
if (
|
||||||
!env.frontmatter.title ||
|
!env.frontmatter.title ||
|
||||||
(env.frontmatter.title && !env.frontmatter.title === 'base64')
|
(env.frontmatter.title && !env.frontmatter.title === 'base64')
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { icons as twemoji } from '@iconify-json/twemoji'
|
import { icons as twemoji } from '@iconify-json/twemoji'
|
||||||
import type { MarkdownRenderer } from 'vitepress'
|
import type { MarkdownRenderer } from 'vitepress'
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import type { MarkdownRenderer } from 'vitepress'
|
import type { MarkdownRenderer } from 'vitepress'
|
||||||
import { headers } from '../transformer/constants'
|
import { headers } from '../transformer/constants'
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import type { MarkdownRenderer } from 'vitepress'
|
import type { MarkdownRenderer } from 'vitepress'
|
||||||
|
|
||||||
const excluded = ['Beginners Guide']
|
const excluded = ['Beginners Guide']
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import nprogress, { type NProgress } from 'nprogress'
|
import nprogress, { type NProgress } from 'nprogress'
|
||||||
import type { EnhanceAppContext } from 'vitepress'
|
import type { EnhanceAppContext } from 'vitepress'
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import type { Theme } from 'vitepress'
|
import type { Theme } from 'vitepress'
|
||||||
import DefaultTheme from 'vitepress/theme'
|
import DefaultTheme from 'vitepress/theme'
|
||||||
import Layout from './Layout.vue'
|
import Layout from './Layout.vue'
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { createContentLoader, type ContentData } from 'vitepress'
|
import { createContentLoader, type ContentData } from 'vitepress'
|
||||||
import { groupBy } from '../utils'
|
import { groupBy } from '../utils'
|
||||||
|
|
||||||
|
@ -22,12 +22,12 @@ interface Post {
|
||||||
date: string
|
date: string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Dictionary = ReturnType<typeof transformRawPosts>
|
type Dictionary = ReturnType
|
||||||
|
|
||||||
declare const data: Dictionary
|
declare const data: Dictionary
|
||||||
export { data }
|
export { data }
|
||||||
|
|
||||||
function transformRawPosts(rawPosts: ContentData[]): Record<string, Post[]> {
|
function transformRawPosts(rawPosts: ContentData[]): Record {
|
||||||
const posts: Post[] = rawPosts
|
const posts: Post[] = rawPosts
|
||||||
.map(({ url, frontmatter }) => ({
|
.map(({ url, frontmatter }) => ({
|
||||||
title: frontmatter.title,
|
title: frontmatter.title,
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import { basename } from 'pathe'
|
import { basename } from 'pathe'
|
||||||
import type { Plugin } from 'vitepress'
|
import type { Plugin } from 'vitepress'
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
interface Header {
|
interface Header {
|
||||||
[file: string]: { title: string; description: string }
|
[file: string]: { title: string; description: string }
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import consola from 'consola'
|
import consola from 'consola'
|
||||||
|
|
||||||
type Transform = {
|
type Transform = {
|
||||||
|
@ -29,7 +29,7 @@ interface Replacer {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const transformer = (text: string) => {
|
export const transformer = (text: string) => {
|
||||||
const handler: ProxyHandler<{ text: string }> = {
|
const handler: ProxyHandler = {
|
||||||
get(target, prop) {
|
get(target, prop) {
|
||||||
if (prop === 'transform') {
|
if (prop === 'transform') {
|
||||||
return (name: string, transforms: Transform[]): Replacer => {
|
return (name: string, transforms: Transform[]): Replacer => {
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
import z from 'zod'
|
import z from 'zod'
|
||||||
|
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
export function groupBy<T, K extends keyof any>(
|
export function groupBy<T, K extends keyof any>(
|
||||||
arr: T[],
|
arr: T[],
|
||||||
|
@ -20,7 +20,7 @@ export function groupBy<T, K extends keyof any>(
|
||||||
return arr.reduce(
|
return arr.reduce(
|
||||||
(groups, item) => {
|
(groups, item) => {
|
||||||
// biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
|
// biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
|
||||||
;(groups[key(item)] ||= []).push(item)
|
; (groups[key(item)] ||= []).push(item)
|
||||||
return groups
|
return groups
|
||||||
},
|
},
|
||||||
{} as Record<K, T[]>
|
{} as Record<K, T[]>
|
||||||
|
|
26
docs/.vitepress/vue-shim.d.ts
vendored
26
docs/.vitepress/vue-shim.d.ts
vendored
|
@ -1,17 +1,17 @@
|
||||||
/**
|
/**
|
||||||
Copyright (c) taskylizard. All rights reserved.
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
You may obtain a copy of the License at
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
http://www.apache.org/licenses/LICENSE-2.0
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
Unless required by applicable law or agreed to in writing, software
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
distributed under the License is distributed on an "AS IS" BASIS,
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/* eslint-disable ts/consistent-type-imports */
|
/* eslint-disable ts/consistent-type-imports */
|
||||||
declare module '*.vue' {
|
declare module '*.vue' {
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
//https://nitro.unjs.io/config
|
//https://nitro.unjs.io/config
|
||||||
export default defineNitroConfig({
|
export default defineNitroConfig({
|
||||||
runtimeConfig: {
|
runtimeConfig: {
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) taskylizard. All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
import {
|
import {
|
||||||
defineConfig,
|
defineConfig,
|
||||||
presetUno,
|
presetUno,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue