From 22dfedbd5cff54f7ac2f32c19b57eecd992791c5 Mon Sep 17 00:00:00 2001 From: kfly8 Date: Sun, 14 Feb 2021 22:09:32 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83=E3=82=AF?= =?UTF-8?q?=E3=82=B9=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=AE=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - やりたいこと - 初心者でも上級者でも利用しやすくしたい - コンテンツがすぐ目に入る形にしたい - やりたくないこと - perl.org の翻訳サイトにすること - そのために、次をしようと思う - 目的別にコンテンツを分ける - "チュートリアル、学ぶ、ブログ、コミュニティ、Play"の5種のメニューを用意した - 注目記事を用意する - ブラウザでコード実行できるようにする - 次のサイトから影響を受けた - https://golang.org/ - https://www.rust-lang.org/ja/ - https://developer.mozilla.org/ja/docs/Web/JavaScript - https://www.perl.org/ --- content/blog.md | 22 +++ content/{index.html => cheatsheet.md} | 229 +------------------------- content/community.md | 36 ++++ content/index.mt | 57 +++++++ content/learn.md | 29 ++++ content/play.mt | 4 + content/tutorial.md | 12 ++ layouts/include/footer.html | 5 + layouts/include/header.html | 9 + lib/PerlUsersJP/Builder.pm | 8 + lib/PerlUsersJP/FrontMatter.pm | 3 +- 11 files changed, 189 insertions(+), 225 deletions(-) create mode 100644 content/blog.md rename content/{index.html => cheatsheet.md} (71%) create mode 100644 content/community.md create mode 100644 content/index.mt create mode 100644 content/learn.md create mode 100644 content/play.mt create mode 100644 content/tutorial.md diff --git a/content/blog.md b/content/blog.md new file mode 100644 index 00000000..e3c82d6b --- /dev/null +++ b/content/blog.md @@ -0,0 +1,22 @@ +ブログ +meta-author: +meta-tags: +meta-date: + + + +

毎年12月に、日本の Perl コミュニティでは、技術記事を連載しています

+ + diff --git a/content/index.html b/content/cheatsheet.md similarity index 71% rename from content/index.html rename to content/cheatsheet.md index 14c0f34e..f61b7a15 100644 --- a/content/index.html +++ b/content/cheatsheet.md @@ -1,221 +1,10 @@ - - - - - - - - - +チートシート +meta-author: +meta-tags: +meta-date: - - - - - - - - - Perl-users.jp - 日本のPerlユーザのためのハブサイト - - - - - -
-
- -

perl-users.jp

-
- -
-

日本のPerlユーザーのためのハブサイト

-

日本の Perl ユーザーに最新の情報を届けたい

-
- -
-
-

Perl Mongers

-

Perl Mongers とは、日本各地に存在する、Perl ユーザーのコミュニティのことです。各種イベントが行われていますので、是非参加してみましょう。

- -
-
-

Perlで出来ているモノ

-

Perlで作られているプロダクトの一部を紹介します

- -
-
-

Perlでお仕事

-

Perl5 を利用している企業の採用情報、あります。

- Perl採用情報(JPA) -
- - -
-
- - -
-

Perl関連チャット

-

Lingr のチャットルームを設置しています。初心者歓迎のゆるふわなチャットですので、御気軽にご参加ください。

- -
-
-

貢献するには?

-

このサイトはgithub で管理されています( - githubのperl-users-jp.github.io)
記事の投稿/修正したい場合は fork して pull-req してください。

-
-
-
-

チートシート

@@ -1012,12 +801,4 @@

組み込み関数

- - - - - Fork me on GitHub - - + diff --git a/content/community.md b/content/community.md new file mode 100644 index 00000000..c16263b3 --- /dev/null +++ b/content/community.md @@ -0,0 +1,36 @@ +コミュニティ +meta-author: +meta-tags: +meta-date: + + +perl入学式 + +YAPC::Japan, Japan.pm + +

Perl Mongers

+

Perl Mongers とは、日本各地に存在する、Perl ユーザーのコミュニティのことです。各種イベントが行われていますので、是非参加してみましょう。

+ + + diff --git a/content/index.mt b/content/index.mt new file mode 100644 index 00000000..7e6374a7 --- /dev/null +++ b/content/index.mt @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + Perl-users.jp - 日本のPerlユーザのためのハブサイト + + + + + + + + + ('./include/header.html') ?> +
+
+

日本のPerlユーザーのためのハブサイト

+

日本の Perl ユーザーに最新の情報を届けたい

+
+ +

Perlを試してみる

+ webperl + + open play ground + +

注目記事

+ + 記事aaaaaaaaaaaaa + + 記事bbbb + + 何かリストを用意しておいて、そこからランダムで埋め込み + [もっと読む](Blog) + +

注目動画

+ 何かリストを用意しておいて、そこからランダムで埋め込み +
+ ('./include/footer.html') ?> + + diff --git a/content/learn.md b/content/learn.md new file mode 100644 index 00000000..b4f633a5 --- /dev/null +++ b/content/learn.md @@ -0,0 +1,29 @@ +学ぶ +meta-author: +meta-tags: +meta-date: + + +# 初心者向け + +- [モダンなPerl入門](/modern_introduction_perl/) +- [Perl5 の小ネタ集](/cookbook/) + +# 中級者向け + +- [CPANモジュール入門](/modules/) +- [Perl 5 今昔](/nowpast.html) + - 昔の書き方/今の書き方。ネタがわかる人向け。 +- [Perl べからず集](/dont/) +- [用語集](/keywords.html) + - まだ未完すぎて方向が定まってない + +# 上級者向け + +- [エキスパートPerl](/expert_perl/) + +# 万人向け + +- [Perl関連書籍の書評](/books.html) +- [Perlで出来ているモノ](/products.html) + diff --git a/content/play.mt b/content/play.mt new file mode 100644 index 00000000..ce7d6dcf --- /dev/null +++ b/content/play.mt @@ -0,0 +1,4 @@ + + +webperlを動かす + diff --git a/content/tutorial.md b/content/tutorial.md new file mode 100644 index 00000000..d09e30bd --- /dev/null +++ b/content/tutorial.md @@ -0,0 +1,12 @@ +チュートリアル +meta-author: +meta-tags: +meta-date: + + +チュートリアル + +Perlって何?メリットって? +どういうとこで使われる? +なぜPerl? + diff --git a/layouts/include/footer.html b/layouts/include/footer.html index 1588f1f0..ef1cb098 100644 --- a/layouts/include/footer.html +++ b/layouts/include/footer.html @@ -3,6 +3,11 @@ + + meta::cpan + perl.org + Japan Perl Association +

Perl-users.jp - 日本のPerlユーザーのためのハブサイトです。日本の Perl ユーザーに最新の情報を届けることを目的にしています。 diff --git a/layouts/include/header.html b/layouts/include/header.html index 7cf7f987..8d30d461 100644 --- a/layouts/include/header.html +++ b/layouts/include/header.html @@ -1,3 +1,12 @@

diff --git a/lib/PerlUsersJP/Builder.pm b/lib/PerlUsersJP/Builder.pm index e4d64439..77ffee4f 100644 --- a/lib/PerlUsersJP/Builder.pm +++ b/lib/PerlUsersJP/Builder.pm @@ -125,6 +125,11 @@ sub build_entry { $src->copy($dest); $src->copy($sub_dest) if $sub_dest; } + elsif ($matter->format eq 'microtemplate') { + my $html = $self->_render_string($src); + $dest->spew_utf8($html); + $sub_dest->spew_utf8($html) if $sub_dest; + } else { my $html = $self->_render_string('entry.html', { text => $self->entry_text($src), @@ -531,6 +536,9 @@ sub format_text { elsif ($format eq 'html') { return $text; } + elsif ($format eq 'microtemplate') { + return $text; + } else { die "unsupported format: $format"; } diff --git a/lib/PerlUsersJP/FrontMatter.pm b/lib/PerlUsersJP/FrontMatter.pm index 5984d737..4b76b5e9 100644 --- a/lib/PerlUsersJP/FrontMatter.pm +++ b/lib/PerlUsersJP/FrontMatter.pm @@ -32,7 +32,7 @@ sub BUILDARGS { # file is not entry return {}; } - elsif ($format eq 'html') { + elsif ($format eq 'html' || $format eq 'microtemplate') { my $data = _parse_html_entry($file); return { @@ -76,6 +76,7 @@ sub _detect_entry_format { : $ext eq 'markdown' ? 'markdown' : $ext eq 'txt' ? 'hatena' : $ext eq 'html' ? 'html' + : $ext eq 'mt' ? 'microtemplate' : undef }