{"id":7290,"date":"2012-11-03T22:37:46","date_gmt":"2012-11-03T13:37:46","guid":{"rendered":"http:\/\/fukata.org\/?p=7290"},"modified":"2017-08-11T22:58:47","modified_gmt":"2017-08-11T22:58:47","slug":"mojolicious-change-static-and-template-directory","status":"publish","type":"post","link":"https:\/\/blog.fukata.org\/archives\/7290\/","title":{"rendered":"Mojolicious\u306estatic,template\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u5909\u66f4"},"content":{"rendered":"

Mojolicious\u3092\u4f7f\u7528\u3057\u3066\u3001\u5225\u30c9\u30e1\u30a4\u30f3\u3060\u3051\u3069\u540c\u3058\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u7ba1\u7406\u3057\u305f\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001static(public\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\u3001template\u306e\u5909\u66f4\u65b9\u6cd5\u3092\u63a2\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n

<\/p>\n

Mojolicious.pm\u5185\u3067\u4e0b\u8a18\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u3053\u306e\u8fba\u3092\u4e0a\u66f8\u304d\u3057\u3066\u4e0a\u3052\u308c\u3070\u5909\u66f4\u3067\u304d\u305d\u3046\u3002<\/p>\n

\r\n# Paths\r\nmy $home = $self->home;\r\npush @{$self->renderer->paths}, $home->rel_dir('templates');\r\npush @{$self->static->paths},   $home->rel_dir('public');\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

Mojolicious\u3092\u4f7f\u7528\u3057\u3066\u3001\u5225\u30c9\u30e1\u30a4\u30f3\u3060\u3051\u3069\u540c\u3058\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u7ba1\u7406\u3057\u305f\u3044\u3068\u3044\u3046\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u3001static(public\u30c7\u30a3\u30ec\u30af\u30c8\u30ea)\u3001template\u306e\u5909\u66f4\u65b9\u6cd5\u3092\u63a2\u3057\u3066\u307f\u307e\u3057\u305f\u3002 … \u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":9223372036854775807,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1980],"tags":[978],"_links":{"self":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/7290"}],"collection":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/comments?post=7290"}],"version-history":[{"count":0,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/7290\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media\/9223372036854775807"}],"wp:attachment":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media?parent=7290"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/categories?post=7290"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/tags?post=7290"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}