feat(core): serve logo locally (#12629)
* feat(core): serve logo locally * test: add test for logo
This commit is contained in:
@@ -13,6 +13,7 @@ const cache = require('./middleware/cache');
|
||||
const parameter = require('./middleware/parameter');
|
||||
const template = require('./middleware/template');
|
||||
const favicon = require('koa-favicon');
|
||||
const serve = require('koa-static');
|
||||
const debug = require('./middleware/debug');
|
||||
const accessControl = require('./middleware/access-control');
|
||||
const antiHotlink = require('./middleware/anti-hotlink');
|
||||
@@ -37,6 +38,7 @@ app.proxy = true;
|
||||
|
||||
// favicon
|
||||
app.use(favicon(__dirname + '/favicon.png'));
|
||||
app.use(serve(__dirname + '/static'));
|
||||
|
||||
// global error handing
|
||||
app.use(onerror);
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 87 KiB |
+7
-3
@@ -26,13 +26,17 @@
|
||||
a {
|
||||
color: #F5712C;
|
||||
}
|
||||
|
||||
img {
|
||||
filter: grayscale(1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="content">
|
||||
<p>
|
||||
<img src="https://i.loli.net/2019/09/04/lmBbNQoLzrKGgiM.jpg" alt="RSSHub" width="120">
|
||||
<img src="/logo.png" alt="RSSHub" width="120">
|
||||
</p>
|
||||
|
||||
<h1>Looks like something went wrong</h1>
|
||||
@@ -46,14 +50,14 @@ Node version: {{@ nodeVersion}}
|
||||
Git Hash: {{@ gitHash}}
|
||||
</pre>
|
||||
<pre class="message">
|
||||
如果您认为 RSSHub 导致了该错误,请在Github按照模版,复制本页面信息进行<a href="https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+bug&template=bug_report_zh.yml" target="_blank">汇报</a>
|
||||
If you believe this is an error caused by RSSHub, please <a href="https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+bug&template=bug_report_en.yml" target="_blank">report on github</a>
|
||||
如果您认为 RSSHub 导致了该错误,请在 GitHub 按照模版,复制本页面信息进行 <a href="https://github.com/DIYgod/RSSHub/issues/new?assignees=&labels=RSS+bug&template=bug_report_zh.yml" target="_blank">汇报</a>
|
||||
</pre>
|
||||
|
||||
<div style="margin: 50px 0">
|
||||
<p>在线文档与支持,请访问<a href="https://docs.rsshub.app/" target="_blank">docs.rsshub.app</a>。</p>
|
||||
<p>For online documentation and support please refer to
|
||||
<a href="https://docs.rsshub.app/" target="_blank">docs.rsshub.app</a>.</p>
|
||||
<p>在线文档与支持,请访问 <a href="https://docs.rsshub.app/" target="_blank">docs.rsshub.app</a>。</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
|
||||
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"
|
||||
{{ if itunes_author || itunes_category || (item && item.some((i) => (i.itunes_item_image || i.itunes_duration))) }}
|
||||
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
|
||||
{{ /if }}
|
||||
|
||||
@@ -79,13 +79,13 @@
|
||||
<body>
|
||||
<div class="content">
|
||||
<p>
|
||||
<img src="https://i.loli.net/2019/04/23/5cbeb7e41414c.png" alt="RSSHub" width="100">
|
||||
<img src="/logo.png" alt="RSSHub" width="100">
|
||||
</p>
|
||||
|
||||
<h1>Welcome to
|
||||
<span style="color: #F5712C;">RSSHub</span>!</h1>
|
||||
|
||||
<p>If you see this page, the RSSHub{{ if hash }} ({{ hash }}){{ /if }} is successfully installed and working.</p>
|
||||
<p>If you see this page, the RSSHub is successfully installed and working.</p>
|
||||
|
||||
<p>For online documentation and support please refer to
|
||||
<a href="https://docs.rsshub.app/" target="_blank">docs.rsshub.app</a>.</p>
|
||||
|
||||
Reference in New Issue
Block a user