Skip to content

Commit

Permalink
修复多主体兼容性问题
Browse files Browse the repository at this point in the history
  • Loading branch information
HCLonely committed Mar 28, 2023
1 parent 3139e2f commit f34100b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/bangumi-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module.exports = /*#__PURE__*/function () {
source: (_config$type$source = config[type].source) !== null && _config$type$source !== void 0 ? _config$type$source : 'bili',
showMyComment: (_config$type$showMyCo = config[type].showMyComment) !== null && _config$type$showMyCo !== void 0 ? _config$type$showMyCo : false,
pagination: (_config$type$paginati = config[type].pagination) !== null && _config$type$paginati !== void 0 ? _config$type$paginati : false,
theme: fs.existsSync(path.join(__dirname, "".concat(config.theme, ".css"))) ? config.theme : null,
theme: fs.existsSync(path.join(__dirname, "templates/theme/".concat(config.theme, ".min.css"))) ? config.theme : null,
ejsTemplate: fs.readFileSync(path.join(__dirname, "templates/".concat(config[type].source === 'bgm' ? 'bgm' : 'bili', "-template.ejs"))).toString().replace('class="bangumi-item"', 'class="bangumi-item bangumi-hide"'),
wantWatch: wantWatch,
watched: watched,
Expand Down
1 change: 1 addition & 0 deletions lib/templates/bangumi.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<% } %>
<style>
<%- include('index.css') %>
<% console.log(theme) %>
<% if (theme) { %>
<%- include(`theme/${theme}.min.css`) %>
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/templates/theme/fluid.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-bilibili-bangumi",
"version": "1.8.5",
"version": "1.8.6",
"description": "hexo bilibili番剧页",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/bangumi-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ module.exports = async function (locals, type = 'bangumi') {
source: config[type].source ?? 'bili',
showMyComment: config[type].showMyComment ?? false,
pagination: config[type].pagination ?? false,
theme: fs.existsSync(path.join(__dirname, `${config.theme}.css`)) ? config.theme : null,
theme: fs.existsSync(path.join(__dirname, `templates/theme/${config.theme}.min.css`)) ? config.theme : null,
ejsTemplate: fs.readFileSync(path.join(__dirname, `templates/${config[type].source === 'bgm' ? 'bgm' : 'bili'}-template.ejs`)).toString()
.replace('class="bangumi-item"', 'class="bangumi-item bangumi-hide"'),
wantWatch,
Expand Down

0 comments on commit f34100b

Please sign in to comment.