Add docs :)

This commit is contained in:
yuanhau 2025-05-20 15:22:35 +08:00
parent ba1b3afa6f
commit 7b46cc7e6f
41 changed files with 2405 additions and 16 deletions

View file

@ -61,10 +61,7 @@ watch(
draggable="false"
/>
<div class="flex flex-col gap-3 text-left">
<h1
class="text-4xl font-bold m-3 text-left"
ref="orgNameAnimation"
>
<h1 class="text-4xl font-bold m-3 text-left" ref="orgNameAnimation">
{{ fetchNewsOrgInfo?.title }}
</h1>
<span class="text-ms m-1 mt-5 text-left text-wrap">{{

View file

@ -1,13 +1,26 @@
<script setup lang="ts">
import { HeartIcon } from 'lucide-vue-next';
import { HeartIcon } from "lucide-vue-next";
const localeLink = useLocalePath();
</script>
<template>
<div
class="flex flex-col justify-center align-center text-center absolute inset-x-0"
>
<span class="text-sm text-center align-center justify-center flex flex-row group mb-0"><span>Made with </span><HeartIcon class="w-5 h-5 mx-2 text-red-500 transition-all duration-300 group-hover:scale-125" /><span> & <a href="https://github.com/hpware/news-analyze" class="hover:text-sky-500 transition-all duration-100">Open Source</a></span></span>
<span class="text-sm m-4 mt-0 mb-0 text-center align-center justify-center"
<span
class="text-sm text-center align-center justify-center flex flex-row group mb-0"
><span>Made with </span
><HeartIcon
class="w-5 h-5 mx-2 text-red-500 transition-all duration-300 group-hover:scale-125"
/><span>
&
<a
href="https://github.com/hpware/news-analyze"
class="hover:text-sky-500 transition-all duration-100"
>Open Source</a
></span
></span
>
<span class="text-sm m-4 mt-0 mb-0 text-center align-center justify-center"
>2025 - {{ new Date().getFullYear() }} &copy; hpware</span
>
<span class="text-xs mt-0 m-2 text-center align-center justify-center">

29
docs/.vitepress/config.ts Normal file
View file

@ -0,0 +1,29 @@
import { defineConfig } from "vitepress";
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "News Analzye Docs",
description: "The documentation for news analyze the project.",
base: "/docs/",
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
nav: [
{ text: "Home", link: "/" },
{ text: "Examples", link: "/markdown-examples" },
],
sidebar: [
{
text: "Examples",
items: [
{ text: "Markdown Examples", link: "/markdown-examples" },
{ text: "Runtime API Examples", link: "/api-examples" },
],
},
],
socialLinks: [
{ icon: "github", link: "https://github.com/vuejs/vitepress" },
],
},
});

49
docs/api-examples.md Normal file
View file

@ -0,0 +1,49 @@
---
outline: deep
---
# Runtime API Examples
This page demonstrates usage of some of the runtime APIs provided by VitePress.
The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:
```md
<script setup>
import { useData } from 'vitepress'
const { theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```
<script setup>
import { useData } from 'vitepress'
const { site, theme, page, frontmatter } = useData()
</script>
## Results
### Theme Data
<pre>{{ theme }}</pre>
### Page Data
<pre>{{ page }}</pre>
### Page Frontmatter
<pre>{{ frontmatter }}</pre>
## More
Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).

25
docs/index.md Normal file
View file

@ -0,0 +1,25 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: "News Analzye Docs"
text: "The documentation for news analyze the project."
tagline: My great project tagline
actions:
- theme: brand
text: Markdown Examples
link: /markdown-examples
- theme: alt
text: API Examples
link: /api-examples
features:
- title: Feature A
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature B
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
- title: Feature C
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
---

85
docs/markdown-examples.md Normal file
View file

@ -0,0 +1,85 @@
# Markdown Extension Examples
This page demonstrates some of the built-in markdown extensions provided by VitePress.
## Syntax Highlighting
VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:
**Input**
````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````
**Output**
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
## Custom Containers
**Input**
```md
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
**Output**
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
## More
Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).

View file

@ -10,7 +10,10 @@
"postinstall": "nuxt prepare",
"prettier": "prettier --write .",
"createdb": "bun run createDatabase.ts",
"start": "bun run .output/server/index.mjs"
"start": "bun run .output/server/index.mjs",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"dependencies": {
"@fontsource-variable/noto-sans-tc": "^5.2.5",

View file

@ -0,0 +1,444 @@
{
"fallback": {
"getTabsData": {
"modules": [
{
"type": "TABS",
"tabs": [
{
"portalPageId": "5e4b951677475352cac02588",
"portalPageUrlPath": "top",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "焦點",
"id": "5e4b951677475352cac02588",
"urlPath": "top",
"type": "GENERAL"
}
},
"key": "65c4a4d4a25cba35a599fb95",
"id": "5e4b951677475352cac02588",
"urlPath": "top",
"title": "焦點"
},
{
"portalPageId": "5e4b95d377475352cac0258c",
"portalPageUrlPath": "entertainment",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "娛樂",
"id": "5e4b95d377475352cac0258c",
"urlPath": "entertainment",
"type": "GENERAL"
}
},
"key": "5e4b97063429e7a65895ac37",
"id": "5e4b95d377475352cac0258c",
"urlPath": "entertainment",
"title": "娛樂"
},
{
"portalPageId": "5e4b95da77475352cac0258e",
"portalPageUrlPath": "domestic",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "國內",
"id": "5e4b95da77475352cac0258e",
"urlPath": "domestic",
"type": "GENERAL"
}
},
"key": "5e4b97063429e7a65895ac38",
"id": "5e4b95da77475352cac0258e",
"urlPath": "domestic",
"title": "國內"
},
{
"portalPageId": "5e4b95ee77475352cac02594",
"portalPageUrlPath": "global",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "國際",
"id": "5e4b95ee77475352cac02594",
"urlPath": "global",
"type": "GENERAL"
}
},
"key": "5e4b97193429e7a65895ac3b",
"id": "5e4b95ee77475352cac02594",
"urlPath": "global",
"title": "國際"
},
{
"portalPageId": "5e4b95e577475352cac02590",
"portalPageUrlPath": "life",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "生活",
"id": "5e4b95e577475352cac02590",
"urlPath": "life",
"type": "GENERAL"
}
},
"key": "5e4b97073429e7a65895ac39",
"id": "5e4b95e577475352cac02590",
"urlPath": "life",
"title": "生活"
},
{
"portalPageId": "66e13d50aab4e2201b06a71a",
"portalPageUrlPath": "gooddeal",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "好康",
"id": "66e13d50aab4e2201b06a71a",
"urlPath": "gooddeal",
"type": "GENERAL"
}
},
"key": "66e2597f3a5c70865176895d",
"id": "66e13d50aab4e2201b06a71a",
"urlPath": "gooddeal",
"title": "好康"
},
{
"portalPageId": "5e4b9674285bec4ff1420418",
"portalPageUrlPath": "finance",
"lastModifiedTime": 1747721415846,
"expireMode": "AUTO",
"link": {
"pageType": "GENERAL",
"page": {
"name": "理財",
"id": "5e4b9674285bec4ff1420418",
"urlPath": "finance",
"type": "GENERAL"
}
},
"key": "5e4b971c3429e7a65895ac3f",
"id": "5e4b9674285bec4ff1420418",
"urlPath": "finance",
"title": "理財"
},
{
"portalPageId": "61e41c49bc1a99261f617aec",
"portalPageUrlPath": "drama",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "追劇",
"id": "61e41c49bc1a99261f617aec",
"urlPath": "drama",
"type": "GENERAL"
}
},
"key": "61f368109cf51a3a4d297c4b",
"id": "61e41c49bc1a99261f617aec",
"urlPath": "drama",
"title": "追劇"
},
{
"portalPageId": "5e4ba98d5c01c9fd138e2fb2",
"portalPageUrlPath": "movie",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "電影",
"id": "5e4ba98d5c01c9fd138e2fb2",
"urlPath": "movie",
"type": "GENERAL"
}
},
"key": "5e4ba9ea25b077fc4ed91b55",
"id": "5e4ba98d5c01c9fd138e2fb2",
"urlPath": "movie",
"title": "電影"
},
{
"portalPageId": "66d58a5a9ccb7d6f902da726",
"portalPageUrlPath": "anime",
"fontColor": "DEFAULT",
"expireMode": "AUTO",
"expirePeriod": 900000,
"link": {
"pageType": "GENERAL",
"page": {
"name": "動漫",
"id": "66d58a5a9ccb7d6f902da726",
"urlPath": "anime",
"type": "GENERAL"
}
},
"key": "66e7ad6950b55e4e0e1e45ab",
"id": "66d58a5a9ccb7d6f902da726",
"urlPath": "anime",
"title": "動漫"
},
{
"portalPageId": "5e4b95f877475352cac02596",
"portalPageUrlPath": "music",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "音樂",
"id": "5e4b95f877475352cac02596",
"urlPath": "music",
"type": "GENERAL"
}
},
"key": "5e4b971a3429e7a65895ac3c",
"id": "5e4b95f877475352cac02596",
"urlPath": "music",
"title": "音樂"
},
{
"portalPageId": "5e4b960277475352cac0259a",
"portalPageUrlPath": "sports",
"fontColor": "DEFAULT",
"expireMode": "MANUAL",
"expirePeriod": 21600000,
"link": {
"pageType": "GENERAL",
"page": {
"name": "運動",
"id": "5e4b960277475352cac0259a",
"urlPath": "sports",
"type": "GENERAL"
}
},
"key": "5e4b971b3429e7a65895ac3e",
"id": "5e4b960277475352cac0259a",
"urlPath": "sports",
"title": "運動"
},
{
"portalPageId": "5e4b95fd77475352cac02598",
"portalPageUrlPath": "NBA",
"expireMode": "MANUAL",
"expirePeriod": 21600000,
"link": {
"pageType": "GENERAL",
"page": {
"name": "NBA",
"id": "5e4b95fd77475352cac02598",
"urlPath": "NBA",
"type": "GENERAL"
}
},
"key": "5e4b971b3429e7a65895ac3d",
"id": "5e4b95fd77475352cac02598",
"urlPath": "NBA",
"title": "NBA"
},
{
"portalPageId": "5e4b96e9285bec4ff1420426",
"portalPageUrlPath": "CPBL",
"lastModifiedTime": 1747708741773,
"expireMode": "AUTO",
"link": {
"pageType": "GENERAL",
"page": {
"name": "中職",
"id": "5e4b96e9285bec4ff1420426",
"urlPath": "CPBL",
"type": "GENERAL"
}
},
"key": "5e4b973c3429e7a65895ac4d",
"id": "5e4b96e9285bec4ff1420426",
"urlPath": "CPBL",
"title": "中職"
},
{
"portalPageId": "630f08c7c0a5c10da6407146",
"portalPageUrlPath": "video",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "看片",
"id": "630f08c7c0a5c10da6407146",
"urlPath": "video",
"type": "GENERAL"
}
},
"key": "63102fb4c55605107ac0e121",
"id": "630f08c7c0a5c10da6407146",
"urlPath": "video",
"title": "看片"
},
{
"portalPageId": "5e4b967a285bec4ff142041a",
"portalPageUrlPath": "health",
"expireMode": "MANUAL",
"expirePeriod": 43200000,
"link": {
"pageType": "GENERAL",
"page": {
"name": "健康",
"id": "5e4b967a285bec4ff142041a",
"urlPath": "health",
"type": "GENERAL"
}
},
"key": "5e4b97253429e7a65895ac40",
"id": "5e4b967a285bec4ff142041a",
"urlPath": "health",
"title": "健康"
},
{
"portalPageId": "5e4b968d5c01c9fd138e2f92",
"portalPageUrlPath": "horoscope",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "星座運勢",
"id": "5e4b968d5c01c9fd138e2f92",
"urlPath": "horoscope",
"type": "GENERAL"
}
},
"key": "5e4b97273429e7a65895ac43",
"id": "5e4b968d5c01c9fd138e2f92",
"urlPath": "horoscope",
"title": "星座運勢"
},
{
"portalPageId": "5e4b96985c01c9fd138e2f96",
"portalPageUrlPath": "food",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "美食",
"id": "5e4b96985c01c9fd138e2f96",
"urlPath": "food",
"type": "GENERAL"
}
},
"key": "5e4b97303429e7a65895ac45",
"id": "5e4b96985c01c9fd138e2f96",
"urlPath": "food",
"title": "美食"
},
{
"portalPageId": "5e4b969e285bec4ff142041c",
"portalPageUrlPath": "travel",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "旅遊",
"id": "5e4b969e285bec4ff142041c",
"urlPath": "travel",
"type": "GENERAL"
}
},
"key": "5e4b97313429e7a65895ac46",
"id": "5e4b969e285bec4ff142041c",
"urlPath": "travel",
"title": "旅遊"
},
{
"portalPageId": "5e4b96b8285bec4ff142041e",
"portalPageUrlPath": "fashion",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "潮流時尚",
"id": "5e4b96b8285bec4ff142041e",
"urlPath": "fashion",
"type": "GENERAL"
}
},
"key": "5e4b97313429e7a65895ac47",
"id": "5e4b96b8285bec4ff142041e",
"urlPath": "fashion",
"title": "潮流時尚"
},
{
"portalPageId": "5e4b96855c01c9fd138e2f8e",
"portalPageUrlPath": "fun",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "鄉民",
"id": "5e4b96855c01c9fd138e2f8e",
"urlPath": "fun",
"type": "GENERAL"
}
},
"key": "5e4b97263429e7a65895ac41",
"id": "5e4b96855c01c9fd138e2f8e",
"urlPath": "fun",
"title": "鄉民"
},
{
"portalPageId": "5f4dfec21cdbd312eed6a6bf",
"portalPageUrlPath": "recommendation",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "推薦",
"id": "5f4dfec21cdbd312eed6a6bf",
"urlPath": "recommendation",
"type": "GENERAL"
}
},
"key": "61c2ea09e90ac55cc92ce8cf",
"id": "5f4dfec21cdbd312eed6a6bf",
"urlPath": "recommendation",
"title": "推薦"
},
{
"portalPageId": "5fbcdd867747539bab38afbf",
"portalPageUrlPath": "subscription",
"fontColor": "DEFAULT",
"expireMode": "OFF",
"link": {
"pageType": "GENERAL",
"page": {
"name": "追蹤",
"id": "5fbcdd867747539bab38afbf",
"urlPath": "subscription",
"type": "GENERAL"
}
},
"key": "67242e4c8836f4141c1b385a",
"id": "5fbcdd867747539bab38afbf",
"urlPath": "subscription",
"title": "追蹤"
}
]
}
]
}
}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,16 @@
import{u as p,c as h,o,ae as d,j as a,t,k as i,a as s}from"./chunks/framework.WowTybjF.js";const f=JSON.parse('{"title":"Runtime API Examples","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api-examples.md","filePath":"api-examples.md"}'),m={name:"api-examples.md"},E=Object.assign(m,{setup(k){const{site:g,theme:n,page:l,frontmatter:r}=p();return(c,e)=>(o(),h("div",null,[e[0]||(e[0]=d(`<h1 id="runtime-api-examples" tabindex="-1">Runtime API Examples <a class="header-anchor" href="#runtime-api-examples" aria-label="Permalink to &quot;Runtime API Examples&quot;"></a></h1><p>This page demonstrates usage of some of the runtime APIs provided by VitePress.</p><p>The main <code>useData()</code> API can be used to access site, theme, and page data for the current page. It works in both <code>.md</code> and <code>.vue</code> files:</p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;script setup&gt;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">import { useData } from &#39;vitepress&#39;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">const { theme, page, frontmatter } = useData()</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;/script&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">## Results</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### Theme Data</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;pre&gt;{{ theme }}&lt;/pre&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### Page Data</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;pre&gt;{{ page }}&lt;/pre&gt;</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">### Page Frontmatter</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;pre&gt;{{ frontmatter }}&lt;/pre&gt;</span></span></code></pre></div><h2 id="results" tabindex="-1">Results <a class="header-anchor" href="#results" aria-label="Permalink to &quot;Results&quot;"></a></h2><h3 id="theme-data" tabindex="-1">Theme Data <a class="header-anchor" href="#theme-data" aria-label="Permalink to &quot;Theme Data&quot;"></a></h3>`,6)),a("pre",null,t(i(n)),1),e[1]||(e[1]=a("h3",{id:"page-data",tabindex:"-1"},[s("Page Data "),a("a",{class:"header-anchor",href:"#page-data","aria-label":'Permalink to "Page Data"'},"")],-1)),a("pre",null,t(i(l)),1),e[2]||(e[2]=a("h3",{id:"page-frontmatter",tabindex:"-1"},[s("Page Frontmatter "),a("a",{class:"header-anchor",href:"#page-frontmatter","aria-label":'Permalink to "Page Frontmatter"'},"")],-1)),a("pre",null,t(i(r)),1),e[3]||(e[3]=a("h2",{id:"more",tabindex:"-1"},[s("More "),a("a",{class:"header-anchor",href:"#more","aria-label":'Permalink to "More"'},"")],-1)),e[4]||(e[4]=a("p",null,[s("Check out the documentation for the "),a("a",{href:"https://vitepress.dev/reference/runtime-api#usedata",target:"_blank",rel:"noreferrer"},"full list of runtime APIs"),s(".")],-1))]))}});export{f as __pageData,E as default};

View file

@ -0,0 +1 @@
import{u as p,c as h,o,ae as d,j as a,t,k as i,a as s}from"./chunks/framework.WowTybjF.js";const f=JSON.parse('{"title":"Runtime API Examples","description":"","frontmatter":{"outline":"deep"},"headers":[],"relativePath":"api-examples.md","filePath":"api-examples.md"}'),m={name:"api-examples.md"},E=Object.assign(m,{setup(k){const{site:g,theme:n,page:l,frontmatter:r}=p();return(c,e)=>(o(),h("div",null,[e[0]||(e[0]=d("",6)),a("pre",null,t(i(n)),1),e[1]||(e[1]=a("h3",{id:"page-data",tabindex:"-1"},[s("Page Data "),a("a",{class:"header-anchor",href:"#page-data","aria-label":'Permalink to "Page Data"'},"")],-1)),a("pre",null,t(i(l)),1),e[2]||(e[2]=a("h3",{id:"page-frontmatter",tabindex:"-1"},[s("Page Frontmatter "),a("a",{class:"header-anchor",href:"#page-frontmatter","aria-label":'Permalink to "Page Frontmatter"'},"")],-1)),a("pre",null,t(i(r)),1),e[3]||(e[3]=a("h2",{id:"more",tabindex:"-1"},[s("More "),a("a",{class:"header-anchor",href:"#more","aria-label":'Permalink to "More"'},"")],-1)),e[4]||(e[4]=a("p",null,[s("Check out the documentation for the "),a("a",{href:"https://vitepress.dev/reference/runtime-api#usedata",target:"_blank",rel:"noreferrer"},"full list of runtime APIs"),s(".")],-1))]))}});export{f as __pageData,E as default};

View file

@ -0,0 +1 @@
import{t as p}from"./chunks/theme.zLgzrmCh.js";import{R as s,a0 as i,a1 as u,a2 as c,a3 as l,a4 as f,a5 as d,a6 as m,a7 as h,a8 as g,a9 as A,d as v,u as y,v as C,s as P,aa as b,ab as w,ac as R,ad as E}from"./chunks/framework.WowTybjF.js";function r(e){if(e.extends){const a=r(e.extends);return{...a,...e,async enhanceApp(t){a.enhanceApp&&await a.enhanceApp(t),e.enhanceApp&&await e.enhanceApp(t)}}}return e}const n=r(p),S=v({name:"VitePressApp",setup(){const{site:e,lang:a,dir:t}=y();return C(()=>{P(()=>{document.documentElement.lang=a.value,document.documentElement.dir=t.value})}),e.value.router.prefetchLinks&&b(),w(),R(),n.setup&&n.setup(),()=>E(n.Layout)}});async function T(){globalThis.__VITEPRESS__=!0;const e=_(),a=D();a.provide(u,e);const t=c(e.route);return a.provide(l,t),a.component("Content",f),a.component("ClientOnly",d),Object.defineProperties(a.config.globalProperties,{$frontmatter:{get(){return t.frontmatter.value}},$params:{get(){return t.page.value.params}}}),n.enhanceApp&&await n.enhanceApp({app:a,router:e,siteData:m}),{app:a,router:e,data:t}}function D(){return A(S)}function _(){let e=s;return h(a=>{let t=g(a),o=null;return t&&(e&&(t=t.replace(/\.js$/,".lean.js")),o=import(t)),s&&(e=!1),o},n.NotFound)}s&&T().then(({app:e,router:a,data:t})=>{a.go().then(()=>{i(a.route,t.site),e.mount("#app")})});export{T as createApp};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{_ as e,c as t,o as a}from"./chunks/framework.WowTybjF.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"News Analzye Docs","text":"The documentation for news analyze the project.","tagline":"My great project tagline","actions":[{"theme":"brand","text":"Markdown Examples","link":"/markdown-examples"},{"theme":"alt","text":"API Examples","link":"/api-examples"}]},"features":[{"title":"Feature A","details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{"title":"Feature B","details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{"title":"Feature C","details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function o(s,n,r,l,c,m){return a(),t("div")}const u=e(i,[["render",o]]);export{p as __pageData,u as default};

View file

@ -0,0 +1 @@
import{_ as e,c as t,o as a}from"./chunks/framework.WowTybjF.js";const p=JSON.parse('{"title":"","description":"","frontmatter":{"layout":"home","hero":{"name":"News Analzye Docs","text":"The documentation for news analyze the project.","tagline":"My great project tagline","actions":[{"theme":"brand","text":"Markdown Examples","link":"/markdown-examples"},{"theme":"alt","text":"API Examples","link":"/api-examples"}]},"features":[{"title":"Feature A","details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{"title":"Feature B","details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"},{"title":"Feature C","details":"Lorem ipsum dolor sit amet, consectetur adipiscing elit"}]},"headers":[],"relativePath":"index.md","filePath":"index.md"}'),i={name:"index.md"};function o(s,n,r,l,c,m){return a(),t("div")}const u=e(i,[["render",o]]);export{p as __pageData,u as default};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,33 @@
import{_ as a,c as i,o as n,ae as e}from"./chunks/framework.WowTybjF.js";const E=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"markdown-examples.md","filePath":"markdown-examples.md"}'),t={name:"markdown-examples.md"};function l(p,s,h,k,r,o){return n(),i("div",null,s[0]||(s[0]=[e(`<h1 id="markdown-extension-examples" tabindex="-1">Markdown Extension Examples <a class="header-anchor" href="#markdown-extension-examples" aria-label="Permalink to &quot;Markdown Extension Examples&quot;"></a></h1><p>This page demonstrates some of the built-in markdown extensions provided by VitePress.</p><h2 id="syntax-highlighting" tabindex="-1">Syntax Highlighting <a class="header-anchor" href="#syntax-highlighting" aria-label="Permalink to &quot;Syntax Highlighting&quot;"></a></h2><p>VitePress provides Syntax Highlighting powered by <a href="https://github.com/shikijs/shiki" target="_blank" rel="noreferrer">Shiki</a>, with additional features like line-highlighting:</p><p><strong>Input</strong></p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\`\`\`js{4}</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">export default {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> data () {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> return {</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> msg: &#39;Highlighted!&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">\`\`\`</span></span></code></pre></div><p><strong>Output</strong></p><div class="language-js vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">js</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">export</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> default</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> data</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> () {</span></span>
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> return</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
<span class="line highlighted"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> msg: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&#39;Highlighted!&#39;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="custom-containers" tabindex="-1">Custom Containers <a class="header-anchor" href="#custom-containers" aria-label="Permalink to &quot;Custom Containers&quot;"></a></h2><p><strong>Input</strong></p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::: info</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">This is an info box.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:::</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::: tip</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">This is a tip.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:::</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::: warning</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">This is a warning.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:::</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::: danger</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">This is a dangerous warning.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:::</span></span>
<span class="line"></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">::: details</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">This is a details block.</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">:::</span></span></code></pre></div><p><strong>Output</strong></p><div class="info custom-block"><p class="custom-block-title">INFO</p><p>This is an info box.</p></div><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>This is a tip.</p></div><div class="warning custom-block"><p class="custom-block-title">WARNING</p><p>This is a warning.</p></div><div class="danger custom-block"><p class="custom-block-title">DANGER</p><p>This is a dangerous warning.</p></div><details class="details custom-block"><summary>Details</summary><p>This is a details block.</p></details><h2 id="more" tabindex="-1">More <a class="header-anchor" href="#more" aria-label="Permalink to &quot;More&quot;"></a></h2><p>Check out the documentation for the <a href="https://vitepress.dev/guide/markdown" target="_blank" rel="noreferrer">full list of markdown extensions</a>.</p>`,19)]))}const c=a(t,[["render",l]]);export{E as __pageData,c as default};

View file

@ -0,0 +1 @@
import{_ as a,c as i,o as n,ae as e}from"./chunks/framework.WowTybjF.js";const E=JSON.parse('{"title":"Markdown Extension Examples","description":"","frontmatter":{},"headers":[],"relativePath":"markdown-examples.md","filePath":"markdown-examples.md"}'),t={name:"markdown-examples.md"};function l(p,s,h,k,r,o){return n(),i("div",null,s[0]||(s[0]=[e("",19)]))}const c=a(t,[["render",l]]);export{E as __pageData,c as default};

File diff suppressed because one or more lines are too long

1
public/docs/hashmap.json Normal file
View file

@ -0,0 +1 @@
{"api-examples.md":"B5cbNgMl","index.md":"ZzqtzDg7","markdown-examples.md":"OYFiuX35"}

25
public/docs/index.html Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
public/docs/vp-icons.css Normal file
View file

@ -0,0 +1 @@
.vpi-social-github{--icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='black' d='M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12'/%3E%3C/svg%3E")}

View file

@ -1,3 +1,8 @@
import { gunzip } from "zlib";
import { promisify } from "util";
const gunzipAsync = promisify(gunzip);
// Check /about/scraping_line_today_home.md for more info or https://news.yuanhau.com/datainfo/linetodayjsondata.json
async function getLineTodayData(type: string) {
try {
@ -10,7 +15,10 @@ async function getLineTodayData(type: string) {
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
},
});
const res = await req.json();
const buffer = await req.arrayBuffer();
const decompressed = await gunzipAsync(Buffer.from(buffer));
const res = JSON.parse(decompressed.toString());
const data = res.getPageData?.[type];
return res;
} catch (e) {
@ -18,6 +26,9 @@ async function getLineTodayData(type: string) {
}
}
console.log(await getLineTodayData("domestic"));
async function demo() {
console.log(await getLineTodayData("domestic"));
}
demo();
//export default getLineTodayData;

View file

@ -78,10 +78,7 @@ module.exports = {
},
},
},
plugins: [
require("tailwindcss-animate"),
require('tailwind-scrollbar'),
],
plugins: [require("tailwindcss-animate"), require("tailwind-scrollbar")],
corePlugins: {
preflight: true,
},