Update docs.

This commit is contained in:
吳元皓 2025-05-27 09:36:44 +08:00
parent a4ccad0989
commit 7057f8293d
7 changed files with 37 additions and 15 deletions

View File

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -8,3 +8,6 @@ sentry*
package.json package.json
node_modules node_modules
/public/docs /public/docs
Dockerfile
docker-compose.yml
nginx.conf

View File

@ -1,6 +1,7 @@
# 新聞解析 / News Analyze # 新聞解析 / News Analyze
![](https://hackatime-badge.hackclub.com/U087ATD163V/news-analyize) ![](https://hackatime-badge.hackclub.com/U087ATD163V/news-analyize) ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/hpware/news-analyze?utm_source=oss&utm_medium=github&utm_campaign=hpware%2Fnews-analyze&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews) ![LICENSE](https://img.shields.io/github/license/hpware/news-analyze?style=flat) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/hpware/news-analyze/build_docker_image.yml)
App Design: [PDF Document](/design.pdf) App Design: [PDF Document](/design.pdf)
@ -95,4 +96,4 @@ https://news.yuanhau.com/api/home/lt?query=domestic
https://news.yuanhau.com/api/news/get/lt/${article url hash} https://news.yuanhau.com/api/news/get/lt/${article url hash}
or you can self host the API on your own server with a basic docker compose command. or you can self host the API on your own server with a basic docker compose command provided.

View File

@ -13,7 +13,6 @@ const errorr = ref(false);
const switchTabs = ref(false); const switchTabs = ref(false);
const tabs = ref([]); const tabs = ref([]);
const primary = ref<string>("domestic"); const primary = ref<string>("domestic");
const likeart = ref([]);
const updateContent = async (url: string, tabAction: boolean) => { const updateContent = async (url: string, tabAction: boolean) => {
if (tabAction === true) { if (tabAction === true) {
@ -131,10 +130,6 @@ watch(
<p :class="getCheckResult(item.title) ? 'hidden' : ''"> <p :class="getCheckResult(item.title) ? 'hidden' : ''">
{{ item.shortDescription }} {{ item.shortDescription }}
</p> </p>
<!--ADD 類似 NEWS ARTICLES.-->
<div class="flex flex-col bg-gray-500">
<div class="" v-for="item in likeart"></div>
</div>
</div> </div>
</button> </button>
</div> </div>

View File

@ -9,6 +9,7 @@ const activateAiSummary = ref(false);
const isGenerating = ref(false); const isGenerating = ref(false);
const summaryText = ref(""); const summaryText = ref("");
const { locale } = useI18n(); const { locale } = useI18n();
const likeart = ref([]);
const aiSummary = async () => { const aiSummary = async () => {
activateAiSummary.value = true; activateAiSummary.value = true;
isGenerating.value = true; isGenerating.value = true;
@ -57,6 +58,15 @@ const aiSummary = async () => {
</button> </button>
<div v-else>{{ summaryText }}</div> <div v-else>{{ summaryText }}</div>
</div> </div>
<div class="flex flex-col bg-gray-500">
<div class="flex flex-row" v-for="item in likeart">
<img /><!--Image-->
<div class="flex flex-col">
<h2>title</h2>
<span>description</span>
</div>
</div>
</div>
</div> </div>
</div> </div>
</template> </template>

View File

@ -1,14 +1,27 @@
# Run :%s/news.yuanhau.com/your.domain.here/ in vim to replace news.yuanhau.com to your domain.
# Caddy is currently not supported.
# Before getting the SSL cert for your website comment the the few with the lines of #commentbeforessl
#
#
#
# If you want to change the log dir use :%s/news_analyze/{your-file-here}
#
#
#
#
#
#
server { server {
listen 80; listen 80;
listen 443 ssl; listen 443 ssl; #commentbeforessl
ssl_certificate /etc/letsencrypt/live/news.yuanhau.com/fullchain.pem; ssl_certificate /etc/letsencrypt/live/news.yuanhau.com/fullchain.pem; #commentbeforessl
ssl_certificate_key /etc/letsencrypt/live/news.yuanhau.com/privkey.pem; ssl_certificate_key /etc/letsencrypt/live/news.yuanhau.com/privkey.pem; #commentbeforessl
server_name news.yuanhau.com; server_name news.yuanhau.com;
access_log /var/log/nginx/news_analyze.access.log; access_log /var/log/nginx/news_analyze.access.log;
error_log /var/log/nginx/news_analyze.error.log; error_log /var/log/nginx/news_analyze.error.log;
location / { location / {
proxy_pass http://127.0.0.1:36694; proxy_pass http://127.0.0.1:36694; # Traefik port.
proxy_set_header X-real-IP $remote_addr; proxy_set_header X-real-IP $remote_addr;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forward-For $proxy_add_x_forwarded_for; proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

View File

@ -396,9 +396,9 @@ const openArticles = async (slug: string) => {
}; };
const getStaticArticleId = () => { const getStaticArticleId = () => {
storeStaticArticleId.value += 1 storeStaticArticleId.value += 1;
return storeStaticArticleId.value return storeStaticArticleId.value;
} };
</script> </script>
<template> <template>
<div v-if="changeLangAnimation"> <div v-if="changeLangAnimation">