deno.js to deploy static site

This commit is contained in:
James Feng Cao 2024-03-17 12:23:44 +08:00
parent 22277c08c3
commit 9f8edef028
9 changed files with 26 additions and 17 deletions

9
js/deno.js Normal file
View File

@ -0,0 +1,9 @@
import { serveFile } from "https://deno.land/std/http/file_server.ts";
async function handler(req){
let url = req.url;
let iSlash = url.indexOf('/',11);
let path = url.substring(iSlash+1);
return await serveFile(req, `${Deno.cwd()}/`+path);
};
Deno.serve(handler);

View File

@ -11,7 +11,7 @@
<sitemap>
<loc>/zh/sitemap.xml</loc>
<lastmod>2024-03-17T10:35:03+08:00</lastmod>
<lastmod>2024-03-17T11:46:48+08:00</lastmod>
</sitemap>

View File

@ -6,7 +6,7 @@
<description>Recent content in _Posts on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh</language>
<lastBuildDate>Sun, 17 Mar 2024 10:35:03 +0800</lastBuildDate>
<lastBuildDate>Sun, 17 Mar 2024 11:46:48 +0800</lastBuildDate>
<atom:link href="/zh/_posts/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>电视直播</title>

View File

@ -6,7 +6,7 @@
<description>Recent content on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh</language>
<lastBuildDate>Sun, 17 Mar 2024 10:35:03 +0800</lastBuildDate>
<lastBuildDate>Sun, 17 Mar 2024 11:46:48 +0800</lastBuildDate>
<atom:link href="/zh/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>电视直播</title>

View File

@ -53,10 +53,10 @@
</ul>
<h4 id="全局重定向">全局重定向</h4>
<p>长按设置,选中&quot;自定义资源重定向&quot;。此时如果<a href="i:60/data/data/info.torapp.uweb/files/config.html:https://jamesfengcao.codeberg.page/zh/searchurl/config.html">全局重定向url</a>为有效网址则所有网络访问被内部重定向至url: &quot;[全局重定向url]+[原始url]&quot;</p>
<p>Example: &quot;https://loud-moth-21.deno.dev/&quot;<br>
使用仓库&quot;https://github.com/torappinfo/fetch&quot;入口&quot;deno.js&quot;<a href="https://deno.com/deploy">部署Deno</a></p>
<p><a href="https://gitee.com/jja8/NewBingGoGo.wikis/blob/master/%E5%88%9B%E5%BB%BA%E9%AD%94%E6%B3%95%E9%93%BE%E6%8E%A5/%E4%BD%BF%E7%94%A8%E5%85%8D%E8%B4%B9%E7%9A%84%E7%9A%84%E4%BA%91%E6%9C%8D%E5%8A%A1%E6%8F%90%E4%BE%9B%E5%95%86%E5%88%9B%E5%BB%BA%E9%AD%94%E6%B3%95%E9%93%BE%E6%8E%A5.md">创建免费魔法重定向,说明类似但代码不同</a><br>
<a href="../../en/searchurl/cloudflare/redirect.js">cloudflare workers 全局重定向代码</a><br>
<p>Example: &quot;https://loud-moth-21.deno.dev/&quot;</p>
<p>使用仓库&quot;https://github.com/torappinfo/fetch&quot;入口&quot;deno.js&quot;<a href="https://deno.com/deploy">部署Deno</a></p>
<p><a href="https://gitee.com/jja8/NewBingGoGo.wikis/blob/master/%E5%88%9B%E5%BB%BA%E9%AD%94%E6%B3%95%E9%93%BE%E6%8E%A5/%E4%BD%BF%E7%94%A8%E5%85%8D%E8%B4%B9%E7%9A%84%E7%9A%84%E4%BA%91%E6%9C%8D%E5%8A%A1%E6%8F%90%E4%BE%9B%E5%95%86%E5%88%9B%E5%BB%BA%E9%AD%94%E6%B3%95%E9%93%BE%E6%8E%A5.md">创建免费魔法重定向,说明类似但代码不同</a></p>
<p><a href="../../en/searchurl/cloudflare/redirect.js">cloudflare workers 全局重定向代码</a><br>
<a href="https://github.com/torappinfo/vercel">vercel 全局重定向</a></p>
<h4 id="重定向文件-defaultredirect-仅在无有效全局重定向url时生效">重定向文件 &quot;default.redirect&quot; (仅在无有效全局重定向url时生效)</h4>
<p><a target="_self" href="i:0gdefault.redirect:../searchurl/txt/redirect.cfg">点击添加google recaptcha国内镜像</a></p>
@ -106,7 +106,7 @@ item.gome.com.cn::item.gomevvv.com.cn</p>
</div>
<p>Last Modified: 17 March 2024<br>
add deno url<br>
add global redirection example url<br>
<pre></pre>
</p>
<script>

View File

@ -3,7 +3,7 @@
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<url>
<loc>/zh/_posts/</loc>
<lastmod>2024-03-17T10:35:03+08:00</lastmod>
<lastmod>2024-03-17T11:46:48+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -16,7 +16,7 @@
/>
</url><url>
<loc>/zh/tags/</loc>
<lastmod>2024-03-17T10:35:03+08:00</lastmod>
<lastmod>2024-03-17T11:46:48+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -29,7 +29,7 @@
/>
</url><url>
<loc>/zh/</loc>
<lastmod>2024-03-17T10:35:03+08:00</lastmod>
<lastmod>2024-03-17T11:46:48+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"
@ -61,13 +61,13 @@
/>
</url><url>
<loc>/zh/tags/%E5%9B%BD%E5%A4%96%E7%BD%91%E5%9D%80/</loc>
<lastmod>2024-03-17T10:35:03+08:00</lastmod>
<lastmod>2024-03-17T11:46:48+08:00</lastmod>
</url><url>
<loc>/zh/tags/%E9%87%8D%E5%AE%9A%E5%90%91/</loc>
<lastmod>2024-03-17T10:35:03+08:00</lastmod>
<lastmod>2024-03-17T11:46:48+08:00</lastmod>
</url><url>
<loc>/zh/redirect/</loc>
<lastmod>2024-03-17T10:35:03+08:00</lastmod>
<lastmod>2024-03-17T11:46:48+08:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="en"

View File

@ -6,7 +6,7 @@
<description>Recent content in Tags on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh</language>
<lastBuildDate>Sun, 17 Mar 2024 10:35:03 +0800</lastBuildDate>
<lastBuildDate>Sun, 17 Mar 2024 11:46:48 +0800</lastBuildDate>
<atom:link href="/zh/tags/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>电视</title>

View File

@ -6,7 +6,7 @@
<description>Recent content in 国外网址 on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh</language>
<lastBuildDate>Sun, 17 Mar 2024 10:35:03 +0800</lastBuildDate>
<lastBuildDate>Sun, 17 Mar 2024 11:46:48 +0800</lastBuildDate>
<atom:link href="/zh/tags/%E5%9B%BD%E5%A4%96%E7%BD%91%E5%9D%80/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>重定向网址</title>

View File

@ -6,7 +6,7 @@
<description>Recent content in 重定向 on 超微浏览器: 威、快、高效、极致优化</description>
<generator>Hugo -- gohugo.io</generator>
<language>zh</language>
<lastBuildDate>Sun, 17 Mar 2024 10:35:03 +0800</lastBuildDate>
<lastBuildDate>Sun, 17 Mar 2024 11:46:48 +0800</lastBuildDate>
<atom:link href="/zh/tags/%E9%87%8D%E5%AE%9A%E5%90%91/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>重定向网址</title>