diff --git a/_includes/details-map.md b/_includes/details-map.md index b7c2e09..f69bac1 100644 --- a/_includes/details-map.md +++ b/_includes/details-map.md @@ -1,11 +1,10 @@ {% comment %} -引数: なし (assignされたdata変数を参照) + 引数: + data_list: データ {% endcomment %} -{% comment %} -空のリストを作成 -{% endcomment %} {% assign details = "" | split: "|" %} +{% assign data = include.data_list %} {% comment %} リンク diff --git a/_includes/details-mod.md b/_includes/details-mod.md index bf99ae1..386534c 100644 --- a/_includes/details-mod.md +++ b/_includes/details-mod.md @@ -1,11 +1,10 @@ {% comment %} -引数: なし (assignされたdata変数を参照) + 引数: + data_list: データ {% endcomment %} -{% comment %} -空のリストを作成 -{% endcomment %} {% assign details = "" | split: "|" %} +{% assign data = include.data_list %} {% comment %} リンク diff --git a/_includes/details-subgame.md b/_includes/details-subgame.md index da322fa..4630b06 100644 --- a/_includes/details-subgame.md +++ b/_includes/details-subgame.md @@ -1,11 +1,10 @@ {% comment %} -引数: なし (assignされたdata変数を参照) + 引数: + data_list: データ {% endcomment %} -{% comment %} -空のリストを作成 -{% endcomment %} {% assign details = "" | split: "|" %} +{% assign data = include.data_list %} {% comment %} リンク diff --git a/_includes/details-texturepack.md b/_includes/details-texturepack.md index b7c2e09..f69bac1 100644 --- a/_includes/details-texturepack.md +++ b/_includes/details-texturepack.md @@ -1,11 +1,10 @@ {% comment %} -引数: なし (assignされたdata変数を参照) + 引数: + data_list: データ {% endcomment %} -{% comment %} -空のリストを作成 -{% endcomment %} {% assign details = "" | split: "|" %} +{% assign data = include.data_list %} {% comment %} リンク diff --git a/_includes/details-tool.md b/_includes/details-tool.md index 0fcce50..9644c88 100644 --- a/_includes/details-tool.md +++ b/_includes/details-tool.md @@ -1,11 +1,10 @@ {% comment %} -引数: なし (assignされたdata変数を参照) + 引数: + data_list: データ {% endcomment %} -{% comment %} -空のリストを作成 -{% endcomment %} {% assign details = "" | split: "|" %} +{% assign data = include.data_list %} {% comment %} リンク diff --git a/_includes/list-details.md b/_includes/list-details.md index d245945..2e29674 100644 --- a/_includes/list-details.md +++ b/_includes/list-details.md @@ -1,53 +1,26 @@ {% comment %} -引数: - type: 表示するdetailsの種類 - list: 表示するデータのリスト - キー: アンカー名 - 値: データ: - name: データ名 + 引数: + type: 表示するdetailsの種類 + list: 表示するデータのリスト + キー: アンカー名 + 値: データ: + 'name': データ名 {% endcomment %} -{% comment %} -アンカー名でソートする -{% endcomment %} - -{% comment %} -全てのアンカー名を一つの文字列にする -{% endcomment %} +{% capture template_name %}details-{{ include.type }}.md{% endcapture %} {% capture keys %} {% for data in include.list %} {{ data[0] }} {% endfor %} {% endcapture %} -{% comment %} -アンカー名を空白で区切ってソートする -{% endcomment %} -{% assign sorted_keys = (keys | split: " " | sort) %} - -{% comment %} -使用するテンプレートファイル名 -{% endcomment %} -{% capture template %}details-{{ include.type }}.md{% endcapture %} - -{% comment %} -ソートしたアンカーリストでFor実行 -{% endcomment %} +{% assign sorted_keys = keys | split: " " | sort %} {% for key in sorted_keys %} - {% comment %} - assignした変数はinclude先でも参照できる - アンカー名で参照 - {% endcomment %} - {% assign data = include.list[key] %} +{% assign data = include.list[key] %} - {% comment %} - Markdownはインデント不可 - {% endcomment %} # {{ data.name }} {#{{ key }}} - {% comment %} - テンプレートを表示 - 同じくインデント不可 - {% endcomment %} -{% include {{ template }} %} +{% include {{ template_name }} + data_list = include.list[key] +%} {% endfor %} diff --git a/wiki/mod-manuals/mod-manual-pipeworks.md b/wiki/mod-manuals/mod-manual-pipeworks.md index cec3ebc..33ad827 100644 --- a/wiki/mod-manuals/mod-manual-pipeworks.md +++ b/wiki/mod-manuals/mod-manual-pipeworks.md @@ -10,9 +10,6 @@ date: # Pipeworksとは -{% assign data = site.data.mods-industry.pipeworks %} -{% include details-mod.md %} - アイテムや水を輸送することを目的としたModです。また、輸送されたアイテムを使用する機械なども含まれています。 MeseconsやTechnic等を組み合わせることにより様々なことが可能となるModです。 diff --git a/wiki/mod-manuals/mod-manual-technic.md b/wiki/mod-manuals/mod-manual-technic.md index 9c6a45f..ed3bf9a 100644 --- a/wiki/mod-manuals/mod-manual-technic.md +++ b/wiki/mod-manuals/mod-manual-technic.md @@ -10,9 +10,6 @@ date: # Technicとは? -{% assign data = site.data.mods-industry.technic %} -{% include details-mod.md %} - 「Technic」はMinetestの工業化Modです。 『電力(EU)』という新しい仕組みを使って、いろいろな作業を自動化したり、新しい道具や機械を開発したりできます。