Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions scripts/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ hexo.extend.helper.register('count_tags', function() {
});

hexo.extend.helper.register('ranking_tags', function() {

const tagPosts = this.site.tags.map(tag => ({tag:tag, posts:tag.posts, count:tag.posts.length, shareCount:totalCount(tag.posts)}));

const compareFunc = (a, b) => (b.shareCount + b.count)/b.count - (a.shareCount + a.count)/a.count;
Expand Down Expand Up @@ -67,8 +66,6 @@ function customTagCloudHelper(options) {
let result = '';

tags.forEach(tag => {
// ▼▼▼ フォントサイズ計算ロジックの変更箇所 ▼▼▼

// 1. 基本となる線形の比率(0.0 〜 1.0)を算出
const ratio = spread === 0 ? 0.5 : (tag.length - minSize) / spread;

Expand All @@ -79,8 +76,6 @@ function customTagCloudHelper(options) {
// 3. 調整後の比率を元にフォントサイズを決定
const fontSize = minFont + (maxFont - minFont) * adjustedRatio;

// ▲▲▲ ここまで ▲▲▲

const tagName = tag.name.replace(/ /g, '-');
const tagLink = hexo.url_for(tag.path);

Expand Down
9 changes: 9 additions & 0 deletions themes/future/layout/_partial/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,24 @@
title = page.category + ' の記事一覧';
description = page.category + ' カテゴリの記事一覧 | ' + config.description
keywords = keywords + ',' + page.category;
} else if (page.path === 'categories/index.html') {
title = 'カテゴリ一覧';
description = 'カテゴリ一覧 | ' + config.description;
} else if (is_tag()){
title = page.tag + ' の記事一覧';
description = page.tag + ' タグの記事一覧 | ' + config.description
keywords = keywords + ',' + page.tag;
} else if (page.path === 'tags/index.html') {
title = 'タグ一覧';
description = 'タグ一覧 | ' + config.description;
} else if (path.indexOf('authors/' + page.author) >= 0) {
title = page.author;
description = page.author + ' が執筆した記事一覧 | ' + config.description
keywords = keywords + ',' + page.author;
author = page.author;
} else if (page.path === 'authors/index.html') {
title = '著者一覧';
description = '著者一覧 | ' + config.description;
}

if (title) {
Expand Down
Loading