Skip to content

Commit

Permalink
Merge pull request dlang-jp#147 from shoo/add_githublink
Browse files Browse the repository at this point in the history
GitHubリポジトリ・ソースコードへのリンクを追加
  • Loading branch information
shoo committed Dec 25, 2021
2 parents aca611d + b04e33c commit 34a51c5
Show file tree
Hide file tree
Showing 42 changed files with 101 additions and 19 deletions.
3 changes: 2 additions & 1 deletion ddoc/custom.ddoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_=Macros for customizing the output for a particular project

PROJECT_SRC_ROOT=https://github.com/dlang-jp/Cookbook/tree/master
PROJECT_ROOT=https://github.com/dlang-jp/Cookbook
PROJECT_SRC_ROOT=$(PROJECT_ROOT)/tree/master
_=
3 changes: 2 additions & 1 deletion ddoc/main.ddoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,14 @@ SIDEBAR=
$(DIVC sidebar-underbar)
$(DIVC sidebar,
$(DIVC head,
$(AC githublinkimg, $(PROJECT_ROOT), <img src="img/GitHub-Mark-32px.png" width="32" height="32" />)
$(H2 $(PROJECT_NAME))
$(P $(SPANC smallprint, $(B version:) $(PROJECT_VERSION) $(SPANC separator, $(BR))
)
)
$(P $(LINK2 index.html, overview))
)
$(COMMENT MODULE_MENU is generated by gendocs.d)
$(COMMENT MODULE_MENU is generated by gendoc)
$(UL $(MODULE_MENU))
)
_=
4 changes: 3 additions & 1 deletion source/array_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
動的配列と静的配列の操作についてまとめます。
要素の初期化、要素の追加、要素の削除、ソート(WIP)、ループ操作(WIP)
Source: $(LINK_TO_SRC source/_array_example.d)
+/
module array_example;

Expand Down Expand Up @@ -93,4 +95,4 @@ unittest
int[] data = buffer.data;

assert(data == [10, 20]);
}
}
2 changes: 2 additions & 0 deletions source/assoc_array_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
連想配列
連想配列の操作についてまとめます。
Source: $(LINK_TO_SRC source/_assoc_array_example.d)
+/
module assoc_array_example;

Expand Down
2 changes: 2 additions & 0 deletions source/concurrency_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
並行処理
`std.concurrency` を使った並行処理の例をまとめます。
Source: $(LINK_TO_SRC source/_concurrency_example.d)
+/
module concurrency_example;

Expand Down
2 changes: 2 additions & 0 deletions source/container_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
コンテナ
スタックやキューなど、いくつかのデータ構造を実現する方法についてまとめます。
Source: $(LINK_TO_SRC source/_container_example.d)
+/
module container_example;

Expand Down
2 changes: 2 additions & 0 deletions source/data/base64_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Base64のエンコードとデコードを行うサンプルです
See_Also:
- https://dlang.org/phobos/std_base64.html
Source: $(LINK_TO_SRC source/data/_base64_example.d)
+/
module data.base64_example;

Expand Down
2 changes: 2 additions & 0 deletions source/data/csv_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ CSV操作
CSVファイル/CSVデータの読み書き等操作を扱います。
ここでは、標準で備えているstd.csvモジュールを用いたCSVファイルの読み込みと、
CSVファイルへの書き出しについて説明します。
Source: $(LINK_TO_SRC source/data/_csv_example.d)
+/
module data.csv_example;

Expand Down
2 changes: 2 additions & 0 deletions source/data/json_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ JSONファイル/JSONデータの読み書き等操作を扱います。
ここでは、標準で備えているstd.jsonモジュールと、その中のJSONValueについて説明します。
このモジュールは、あくまでもJSONが最低限取り扱える程度の機能があって、速度や利便性は二の次です。
ほかにもサードパーティのライブラリとして、asdfを代表として、より高度な取り扱いができるライブラリがあります。
Source: $(LINK_TO_SRC source/data/_json_example.d)
+/
module data.json_example;

Expand Down
1 change: 1 addition & 0 deletions source/data/package.d
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ $(DL
)
)
Source: $(LINK_TO_SRC source/_data/package.d)
+/
module data;

Expand Down
2 changes: 2 additions & 0 deletions source/datetime_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
時刻・日付
時刻・日付の操作についてまとめます。
Source: $(LINK_TO_SRC source/_datetime_example.d)
+/
module datetime_example;

Expand Down
2 changes: 2 additions & 0 deletions source/exception_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ D言語は「例外機構」をもつ言語です。
例外を捕まえるまで関数呼び出し元をたどっていってスタックをロールバックして…
といった、いわゆる大域ジャンプを伴う、プログラムの特殊なフローのことです。
ここでは例外の使い方についてまとめます。
Source: $(LINK_TO_SRC source/_exception_example.d)
+/
module exception_example;

Expand Down
3 changes: 2 additions & 1 deletion source/file_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
ファイル・パス操作についてまとめます。
Source: $(LINK_TO_SRC source/_file_example.d)
+/
module file_example;

Expand Down Expand Up @@ -177,7 +178,7 @@ unittest
`dirEntries` に対して対象とするファイル名の glob パターンを指定します。
See_Also: https://dlang.org/phobos/std_file.html#dirEntries
See_Also: https://dlang.org/phobos/std_file.html#dirEntries
See_Also: https://dlang.org/phobos/std_path.html#.globMatch
+/
unittest
Expand Down
2 changes: 2 additions & 0 deletions source/getopt_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
`std.getopt` の使い方についてまとめます。
実行プログラムの引数を解析することができ、柔軟なプログラム作成を助けます。
Source: $(LINK_TO_SRC source/_getopt_example.d)
+/
module getopt_example;

Expand Down
2 changes: 2 additions & 0 deletions source/is_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
is式
is式についてまとめます。
Source: $(LINK_TO_SRC source/_is_example.d)
+/
module is_example;

Expand Down
2 changes: 2 additions & 0 deletions source/meta_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
メタプログラミング
メタプログラミングに出てくるイディオム等についてまとめます。
Source: $(LINK_TO_SRC source/_meta_example.d)
+/
module meta_example;

Expand Down
2 changes: 2 additions & 0 deletions source/network_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
ネットワークモジュール、特に `std.net.curl` の使い方についてまとめます。
HTTP通信などができます。
Source: $(LINK_TO_SRC source/_network_example.d)
+/
module network_example;

Expand Down
2 changes: 2 additions & 0 deletions source/numeric_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
標準ライブラリで提供される数値計算の関数などについてまとめます。
主に `std.math` や `std.mathspecial`、 `std.numeric` を使った例を対象とします。
Source: $(LINK_TO_SRC source/_numeric_example.d)
+/
module numeric_example;

Expand Down
2 changes: 2 additions & 0 deletions source/opovl_excample.d
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ D言語では、演算子オーバーロードを定義する際には、もと
See_Also:
- https://dlang.org/spec/operatoroverloading.html
- https://dlang.org/dstyle.html#operator_overloading
Source: $(LINK_TO_SRC source/_opovl_excample.d)
+/
module opovl_excample;

Expand Down
2 changes: 2 additions & 0 deletions source/parallelism_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
並列処理
`std.parallelism` を使った並列処理の例をまとめます。
Source: $(LINK_TO_SRC source/_parallelism_example.d)
+/
module parallelism_example;

Expand Down
2 changes: 2 additions & 0 deletions source/process_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
プロセス
プロセス操作についてまとめます。
Source: $(LINK_TO_SRC source/_process_example.d)
+/
module process_example;

Expand Down
2 changes: 2 additions & 0 deletions source/random_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
乱数
乱数操作についてまとめます。
Source: $(LINK_TO_SRC source/_random_example.d)
+/
module random_example;

Expand Down
2 changes: 2 additions & 0 deletions source/range_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ TODO:
* レンジの種類の紹介
* std.rangeの各関数の紹介
Source: $(LINK_TO_SRC source/_range_example.d)
+/
module range_example;

Expand Down
4 changes: 3 additions & 1 deletion source/regex_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
正規表現
正規表現の操作についてまとめます。
Source: $(LINK_TO_SRC source/_regex_example.d)
+/
module regex_example;

Expand Down Expand Up @@ -51,7 +53,7 @@ module regex_example;
// `escaper`の戻り値は、`Escaper`という遅延評価を行うレンジになります。
// 実行時にstringと連結して新たなパターン文字列を作るような場合、`std.conv.to`や`std.conv.text`を使うと効率的です。
import std.conv : to, text;

string s4 = "^" ~ escaper("https://dlang.org").to!string() ~ "$";
string s5 = text("^", escaper("https://dlang.org"), "$");
assert(s4 == `^https\:\/\/dlang\.org$`);
Expand Down
2 changes: 2 additions & 0 deletions source/string_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
文字列操作についてまとめます。
TODO: 置換(replace), 削除(remove), 分割(split)
Source: $(LINK_TO_SRC source/_string_example.d)
+/
module string_example;

Expand Down
2 changes: 2 additions & 0 deletions source/sync_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- `Condition`
- `Semaphore` (TODO)
- `Event` (TODO)
Source: $(LINK_TO_SRC source/_sync_example.d)
+/
module sync_example;

Expand Down
2 changes: 2 additions & 0 deletions source/template_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
See_Also:
- https://dlang.org/spec/template.html
Source: $(LINK_TO_SRC source/_template_example.d)
+/
module template_example;

Expand Down
4 changes: 3 additions & 1 deletion source/typecons_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
型を作るユーティリティ
様々な型を作れるtemplateを提供する`std.typecons`パッケージについて解説します。
Source: $(LINK_TO_SRC source/_typecons_example.d)
+/
module typecons_example;

Expand Down Expand Up @@ -168,7 +170,7 @@ unittest

// 新しいリソースを保持するRefCounted!Payloadを、refCounted関数で生成します。
auto rc1 = refCounted(Payload(1234));

// 現在の参照カウントは1です。
assert(rc1.refCountedStore.refCount == 1);

Expand Down
2 changes: 2 additions & 0 deletions source/uda_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
UDA(User Defined Attribute)
UDAの使用例についてまとめます。
Source: $(LINK_TO_SRC source/_uda_example.d)
+/
module uda_example;

Expand Down
2 changes: 2 additions & 0 deletions source/unittests_example.d
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
単体テスト
様々な単体テストの記法についてまとめます。
Source: $(LINK_TO_SRC source/_unittests_example.d)
+/
module unittests_example;

Expand Down
15 changes: 11 additions & 4 deletions source_docs/css/proj_docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,15 @@ dt.ddoc_decl:hover .ddoc_decl_anchor
.sidebar h2
{
border-bottom: 1px solid #993333;
font-size: 1em;
margin-right: -1em;
font-size: 1.2em;
line-height: 32px;
text-transform: capitalize;
margin-right: 40px;
}

.sidebar .githublinkimg
{
float: right;
}

.sidebar ul
Expand Down Expand Up @@ -677,15 +684,15 @@ table a
body > .container {
overflow: auto;
}

.d_code {
overflow: auto;
}
}

@media screen and (min-width:768px) {
/* For PC Layout */

body > .container {
margin: 15px;
}
Expand Down
Binary file added source_docs/img/GitHub-Mark-32px.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions subpkg/source/subpkg/test.d
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/++
サブパッケージの作り方
Source: $(LINK_TO_SRC subpkg/source/subpkg/_test.d)
+/
module subpkg.test;

Expand Down
Loading

0 comments on commit 34a51c5

Please sign in to comment.