diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cfd30a7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +_site +.sass-cache +.jekyll-metadata +.bundle +vendor +Gemfile.lock diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..37f5eaa --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +source 'https://rubygems.org' +gem 'github-pages', group: :jekyll_plugins diff --git a/_config.yml b/_config.yml index d3aa475..2ad418a 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,5 @@ +### サイト設定 ### + title: "Minetest JP Wiki" description: "" google_site_verification: "SzmyhmFa1r6eafWLqLct1hOKj-Awxn0JH8r0U4PUCyc" @@ -6,43 +8,49 @@ logo: "images/icon.png" author: "Minetest-JP Team" publisher: "Minetest-JP Team" -### Minetest関連 ### - -# Wiki内で使用 -minetest: - # Minetestの最新バージョン - # Windowsのダウンロードリンクもこれに依存します - latest_version: "0.4.17" ### Wiki設定 ### +minetest: + # Minetestの最新バージョン + # Windowsのダウンロードリンクもこれに依存します + latest_version: "0.4.17.1" + wiki: - # Wikiのタイトル - # TODO: site.titleを使用する - title: "Minetest JP Wiki" # 画像フォルダのパス images_dir: "images" # テーマカラー # モバイル版Chromeのタブ色に使用される theme_color: "#f2f2f2" -### レイアウト関連 ### - # デスクトップ判定 media-desktop: "all and (min-width: 768px)" + # モバイル端末判定 media-mobile: "not all and (min-width: 768px)" -### Jekyll設定 ### -# ページ用Markdownのパス -source: "wiki" +### Jekyllの設定 ### + +# Jekyllから除外するファイル +exclude: ["README.md", "CONTRIBUTING.md", "images/LICENSE.txt", "vendor"] + # Markdownパーサ markdown: "kramdown" -# Jekyllから除外するファイル -exclude: ["README.md", "CONTRIBUTING.md", "images/LICENSE.txt"] -### ページのデフォルト設定 ### +kramdown: + # Markdownの書式はGithubスタイル + input: "GFM" + # HTMLコードをそのまま出力 + html_to_native: true + # "#"を

相当にする + header_offset: 1 + +sass: + style: "compressed" + +compress_html: + comments: all defaults: - @@ -64,27 +72,6 @@ defaults: width: 600 height: 603 -### SASS(SCSS)設定 ### - -sass: - # CSS生成スタイル - # 圧縮する - style: "compressed" - -### Kramdownの設定 ### - -kramdown: - # Markdownの書式 - # Githubスタイルの書式を設定 - input: "GFM" - # HTMLコードをそのまま出力 - html_to_native: true - # "#"を

相当にする - header_offset: 1 - -### プラグイン ### - plugins: - "jekyll-seo-tag" - # サイトマップ生成 - - "jekyll-sitemap" + - "jekyll-sitemap" # サイトマップ生成 diff --git a/_data/tools-mapper/minetestmapper.yml b/_data/tools-mapper/minetestmapper.yml deleted file mode 100644 index b4b4867..0000000 --- a/_data/tools-mapper/minetestmapper.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: "Minetestmapper" -author: "Celeron55" -description: "Pythonが必要。色指定ファイルと併せて使う。" -links: - - - text: "スクリプト" - url: "https://raw.githubusercontent.com/minetest/minetest/master/util/minetestmapper.py" - - - text: "色指定ファイル" - url: "https://github.com/rubenwardy/NodeBoxEditor/releases" diff --git a/_data/tools-mapper/minetestmapper_cpp.yml b/_data/tools-mapper/minetestmapper_cpp.yml index eb7b2ab..b0ef4ce 100644 --- a/_data/tools-mapper/minetestmapper_cpp.yml +++ b/_data/tools-mapper/minetestmapper_cpp.yml @@ -1,10 +1,10 @@ name: "Minetest Mapper C++" author: "Minetest開発チーム" -description: "MinetestmapperをC++に移植したバージョン。コンパイルが必要。" +description: "C++で実装されたワールドのマップ画像生成ツールです。コマンドライン上で利用します。
minetestmapper(Windowsの場合はminetestmapper.exe) -i ワールドのパス -o 画像ファイル名と実行することで指定したワールドのマップ画像を作成できます。
minetestmapper --helpと実行するか、https://github.com/minetest/minetestmapper#parametersからその他のオプションを見ることができます。" links: - - - text: "フォーラム" - url: "https://forum.minetest.net/viewtopic.php?t=2896" - text: "Github" url: "https://github.com/minetest/minetestmapper" + - + text: "ダウンロード" + url: "https://github.com/minetest/minetestmapper/releases" diff --git a/_data/tools-mapper/minetestmapper_gui.yml b/_data/tools-mapper/minetestmapper_gui.yml index f649ecd..7c6f987 100644 --- a/_data/tools-mapper/minetestmapper_gui.yml +++ b/_data/tools-mapper/minetestmapper_gui.yml @@ -1,7 +1,7 @@ name: "Minetest Mapper GUI" author: "addi" screenshot: "/tools-mapper/minetestmapper_gui.png" -description: "Minetest Mapper C++のGUIフロントエンド。" +description: "Minetest Mapper C++のGUIバージョンです。" platform: "Windows" links: - diff --git a/_data/tools-mapper/minetestmapper_numpy.yml b/_data/tools-mapper/minetestmapper_numpy.yml deleted file mode 100644 index d2a8ff1..0000000 --- a/_data/tools-mapper/minetestmapper_numpy.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: "numpy-izing minetestmapper" -author: "spillz" -description: "Minetestmapperの改良版。PythonとNumPyが必要。色指定ファイルと併せて使う。" -links: - - - text: "フォーラム" - url: "https://forum.minetest.net/viewtopic.php?t=8730" - - - text: "スクリプト" - url: "https://raw.githubusercontent.com/spillz/minetest/master/util/minetestmapper-numpy.py" - - - text: "色指定ファイル" - url: "https://raw.githubusercontent.com/minetest/minetest/master/util/colors.txt" diff --git a/_includes/details-map.md b/_includes/details-map.md index 8e55f6b..636b294 100644 --- a/_includes/details-map.md +++ b/_includes/details-map.md @@ -1,31 +1,26 @@ -{% comment %} -引数: なし (assignされたdata変数を参照) -{% endcomment %} + +{% assign data = include.list[include.key] %} -{% comment %} -空のリストを作成 -{% endcomment %} + {% assign details = "" | split: "|" %} -{% comment %} -製作者 -{% endcomment %} -{% assign author = "" | split: "|" %} -{% assign author = author | push: "製作者" %} -{% assign author = author | push: data.author %} -{% assign details = details | push: author %} + +{% if data.author %} + {% assign author = "" | split: "|" %} + {% assign author = author | push: "製作者" %} + {% assign author = author | push: data.author %} + {% assign details = details | push: author %} +{% endif %} -{% comment %} -説明 -{% endcomment %} -{% assign description = "" | split: "|" %} -{% assign description = description | push: "説明" %} -{% assign description = description | push: data.description %} -{% assign details = details | push: description %} + +{% if data.description %} + {% assign description = "" | split: "|" %} + {% assign description = description | push: "説明" %} + {% assign description = description | push: data.description %} + {% assign details = details | push: description %} +{% endif %} -{% comment %} -リンク -{% endcomment %} + {% if data.links %} {% capture link_list %} {% for link_data in data.links %} @@ -40,10 +35,5 @@ {% assign details = details | push: links %} {% endif %} -{% comment %} -テンプレートをインクルード -{% endcomment %} -{% include details.md - screenshot = data.screenshot - details = details -%} + +{% include details.md screenshot=data.screenshot details=details %} diff --git a/_includes/details-mod.md b/_includes/details-mod.md index 20e4d1d..86af75b 100644 --- a/_includes/details-mod.md +++ b/_includes/details-mod.md @@ -1,15 +1,10 @@ -{% comment %} -引数: なし (assignされたdata変数を参照) -{% endcomment %} + +{% assign data = include.list[include.key] %} -{% comment %} -空のリストを作成 -{% endcomment %} + {% assign details = "" | split: "|" %} -{% comment %} -依存Mod -{% endcomment %} + {% if data.depends %} {% capture depend_list %} {% for depend in data.depends %} @@ -27,9 +22,7 @@ {% assign details = details | push: depends %} {% endif %} -{% comment %} -対応・連携可能Mod -{% endcomment %} + {% if data.depends-optional %} {% capture optionally_depend_list %} {% for depend in data.depends-optional %} @@ -47,25 +40,23 @@ {% assign details = details | push: depends_optional %} {% endif %} -{% comment %} -開発者 -{% endcomment %} -{% assign author = "" | split: "|" %} -{% assign author = author | push: "開発者" %} -{% assign author = author | push: data.author %} -{% assign details = details | push: author %} + +{% if data.author %} + {% assign author = "" | split: "|" %} + {% assign author = author | push: "開発者" %} + {% assign author = author | push: data.author %} + {% assign details = details | push: author %} +{% endif %} -{% comment %} -説明 -{% endcomment %} -{% assign description = "" | split: "|" %} -{% assign description = description | push: "説明" %} -{% assign description = description | push: data.description %} -{% assign details = details | push: description %} + +{% if data.description %} + {% assign description = "" | split: "|" %} + {% assign description = description | push: "説明" %} + {% assign description = description | push: data.description %} + {% assign details = details | push: description %} +{% endif %} -{% comment %} -リンク -{% endcomment %} + {% if data.links %} {% capture link_list %} {% for link_data in data.links %} @@ -80,10 +71,5 @@ {% assign details = details | push: links %} {% endif %} -{% comment %} -テンプレートをインクルード -{% endcomment %} -{% include details.md - screenshot = data.screenshot - details = details -%} + +{% include details.md screenshot=data.screenshot details=details %} diff --git a/_includes/details-subgame.md b/_includes/details-subgame.md index 808c5cc..6aad6f4 100644 --- a/_includes/details-subgame.md +++ b/_includes/details-subgame.md @@ -1,31 +1,26 @@ -{% comment %} -引数: なし (assignされたdata変数を参照) -{% endcomment %} + +{% assign data = include.list[include.key] %} -{% comment %} -空のリストを作成 -{% endcomment %} + {% assign details = "" | split: "|" %} -{% comment %} -開発者 -{% endcomment %} -{% assign author = "" | split: "|" %} -{% assign author = author | push: "開発者" %} -{% assign author = author | push: data.author %} -{% assign details = details | push: author %} + +{% if data.author %} + {% assign author = "" | split: "|" %} + {% assign author = author | push: "開発者" %} + {% assign author = author | push: data.author %} + {% assign details = details | push: author %} +{% endif %} -{% comment %} -説明 -{% endcomment %} -{% assign description = "" | split: "|" %} -{% assign description = description | push: "説明" %} -{% assign description = description | push: data.description %} -{% assign details = details | push: description %} + +{% if data.description %} + {% assign description = "" | split: "|" %} + {% assign description = description | push: "説明" %} + {% assign description = description | push: data.description %} + {% assign details = details | push: description %} +{% endif %} -{% comment %} -リンク -{% endcomment %} + {% if data.links %} {% capture link_list %} {% for link_data in data.links %} @@ -40,10 +35,5 @@ {% assign details = details | push: links %} {% endif %} -{% comment %} -テンプレートをインクルード -{% endcomment %} -{% include details.md - screenshot = data.screenshot - details = details -%} + +{% include details.md screenshot=data.screenshot details=details %} diff --git a/_includes/details-texturepack.md b/_includes/details-texturepack.md index 8e55f6b..636b294 100644 --- a/_includes/details-texturepack.md +++ b/_includes/details-texturepack.md @@ -1,31 +1,26 @@ -{% comment %} -引数: なし (assignされたdata変数を参照) -{% endcomment %} + +{% assign data = include.list[include.key] %} -{% comment %} -空のリストを作成 -{% endcomment %} + {% assign details = "" | split: "|" %} -{% comment %} -製作者 -{% endcomment %} -{% assign author = "" | split: "|" %} -{% assign author = author | push: "製作者" %} -{% assign author = author | push: data.author %} -{% assign details = details | push: author %} + +{% if data.author %} + {% assign author = "" | split: "|" %} + {% assign author = author | push: "製作者" %} + {% assign author = author | push: data.author %} + {% assign details = details | push: author %} +{% endif %} -{% comment %} -説明 -{% endcomment %} -{% assign description = "" | split: "|" %} -{% assign description = description | push: "説明" %} -{% assign description = description | push: data.description %} -{% assign details = details | push: description %} + +{% if data.description %} + {% assign description = "" | split: "|" %} + {% assign description = description | push: "説明" %} + {% assign description = description | push: data.description %} + {% assign details = details | push: description %} +{% endif %} -{% comment %} -リンク -{% endcomment %} + {% if data.links %} {% capture link_list %} {% for link_data in data.links %} @@ -40,10 +35,5 @@ {% assign details = details | push: links %} {% endif %} -{% comment %} -テンプレートをインクルード -{% endcomment %} -{% include details.md - screenshot = data.screenshot - details = details -%} + +{% include details.md screenshot=data.screenshot details=details %} diff --git a/_includes/details-tool.md b/_includes/details-tool.md index 9be33fd..d00c7ef 100644 --- a/_includes/details-tool.md +++ b/_includes/details-tool.md @@ -1,15 +1,10 @@ -{% comment %} -引数: なし (assignされたdata変数を参照) -{% endcomment %} + +{% assign data = include.list[include.key] %} -{% comment %} -空のリストを作成 -{% endcomment %} + {% assign details = "" | split: "|" %} -{% comment %} -プラットフォーム -{% endcomment %} + {% if data.platform %} {% assign platform = "" | split: "|" %} {% assign platform = platform | push: "プラットフォーム" %} @@ -17,25 +12,23 @@ {% assign details = details | push: platform %} {% endif %} -{% comment %} -開発者 -{% endcomment %} -{% assign author = "" | split: "|" %} -{% assign author = author | push: "開発者" %} -{% assign author = author | push: data.author %} -{% assign details = details | push: author %} + +{% if data.author %} + {% assign author = "" | split: "|" %} + {% assign author = author | push: "開発者" %} + {% assign author = author | push: data.author %} + {% assign details = details | push: author %} +{% endif %} -{% comment %} -説明 -{% endcomment %} -{% assign description = "" | split: "|" %} -{% assign description = description | push: "説明" %} -{% assign description = description | push: data.description %} -{% assign details = details | push: description %} + +{% if data.description %} + {% assign description = "" | split: "|" %} + {% assign description = description | push: "説明" %} + {% assign description = description | push: data.description %} + {% assign details = details | push: description %} +{% endif %} -{% comment %} -リンク -{% endcomment %} + {% if data.links %} {% capture link_list %} {% for link_data in data.links %} @@ -50,10 +43,5 @@ {% assign details = details | push: links %} {% endif %} -{% comment %} -テンプレートをインクルード -{% endcomment %} -{% include details.md - screenshot = data.screenshot - details = details -%} + +{% include details.md screenshot=data.screenshot details=details %} diff --git a/_includes/item.md b/_includes/item.md new file mode 100644 index 0000000..e69de29 diff --git a/_includes/list-details.md b/_includes/list-details.md index d245945..5bc26d9 100644 --- a/_includes/list-details.md +++ b/_includes/list-details.md @@ -7,47 +7,20 @@ name: データ名 {% endcomment %} -{% comment %} -アンカー名でソートする -{% endcomment %} - -{% comment %} -全てのアンカー名を一つの文字列にする -{% endcomment %} -{% capture keys %} - {% for data in include.list %} - {{ data[0] }} - {% endfor %} + +{% capture anchors %} +{% for data in include.list %} {{ data[0] }} {% endfor %} {% endcapture %} -{% comment %} -アンカー名を空白で区切ってソートする -{% endcomment %} -{% assign sorted_keys = (keys | split: " " | sort) %} + +{% assign sorted-anchors = anchors | split: " " | sort %} -{% comment %} -使用するテンプレートファイル名 -{% endcomment %} -{% capture template %}details-{{ include.type }}.md{% endcapture %} + +{% capture template-name %}details-{{ include.type }}.md{% endcapture %} -{% comment %} -ソートしたアンカーリストでFor実行 -{% endcomment %} -{% for key in sorted_keys %} - {% comment %} - assignした変数はinclude先でも参照できる - アンカー名で参照 - {% endcomment %} - {% assign data = include.list[key] %} - - {% comment %} - Markdownはインデント不可 - {% endcomment %} -# {{ data.name }} {#{{ key }}} - - {% comment %} - テンプレートを表示 - 同じくインデント不可 - {% endcomment %} -{% include {{ template }} %} + + +{% for anchor in sorted-anchors %} +# {{ include.list[anchor].name }} {#{{ anchor }}} +{% include {{ template-name }} list=include.list key=anchor %} {% endfor %} diff --git a/_includes/menu.md b/_includes/menu.md index 56ff87a..ef47be7 100644 --- a/_includes/menu.md +++ b/_includes/menu.md @@ -69,6 +69,4 @@ # 更新履歴 -{% include update-history.md - limit = 10 -%} +{% include update-history.md limit=10 %} diff --git a/_includes/style.scss b/_includes/style.scss index 170d30e..fb6c1d0 100644 --- a/_includes/style.scss +++ b/_includes/style.scss @@ -18,7 +18,7 @@ $background: url({{ site.github.url }}/images/background.png); $font-color: #333; $font-family: "Hiragino Kaku Gothic ProN", "Helvetica Neue", "meiryo", "arial", "sans-serif"; $font-size: 18px; -$font-size-mobile: 16px; +$font-size-mobile: 14px; $letter-spacing: 0.005em; $line-height: 1.5; $selection-background: #659b4b; @@ -26,9 +26,9 @@ $selection-font-color: #fff; // コンテナ $container-box-shadow: 0 0 10px 0 #ddd; -$container-columns: 25% 75%; +$container-columns: 80% 20%; $container-padding-top-mobile: 1em; -$container-max-width: 1024px; +$container-max-width: 1280px; // ヘッダ $header-background: #f2f2f2; @@ -37,8 +37,10 @@ $header-link-color: #694; $header-mobile-box-shadow: 0 0 5px 2px rgba(0,0,0,0.3); $header-img-vertical-adjustment: -.4em; -// 本文 (左メニュー含む) +// 本文 (右メニュー含む) $article-background: #fff; +$article-padding: 0 1em 1em 1em; +$article-padding-mobile: 0 0.5em 1em 0.5em; $article-link-color: #588f3d; $article-link-color-visited: #456336; @@ -71,10 +73,6 @@ $toc-border-radius: 10px; $footer-background: #333; $footer-text-color: #fff; -// モバイルメニュー -$mobile-menu-background: #555; -$mobile-menu-text-color: #fff; - // Modなどのスクリーンショット $screenshot-max-height: 250px; $screenshot-max-width: 500px; @@ -87,7 +85,6 @@ $screenshot-max-width: 500px; @import "header"; @import "article"; @import "footer"; -@import "mobile"; @import "toc"; @import "screenshot"; diff --git a/_layouts/default.html b/_layouts/default.html index 681cdc4..9c13554 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -4,14 +4,14 @@ layout: compress {% comment %}サイドメニューのMarkdownを読み込み、HTMLに変換{% endcomment %} {% capture menu_markdown %}{% include menu.md %}{% endcapture %} -{% assign menu = (menu_markdown | markdownify) %} +{% assign menu = menu_markdown | markdownify %} {% comment %}SCSSを読み込み、CSSに変換{% endcomment %} {% capture style_scss %}{% include style.scss %}{{ page.custom-style }}{% endcapture %} -{% assign style = (style_scss | scssify) %} +{% assign style = style_scss | scssify %} {% comment %}アイコンのURL{% endcomment %} -{% assign icon_url = (site.github.url | append: "/images/icon.png") %} +{% assign icon_url = site.github.url | append: "/images/icon.png" %} {% capture amp-boilerplate %} body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}} @@ -32,8 +32,6 @@ body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:non - -