Commit 445e730c by Jun Matsushita

Upgrade to dynamic collection module

parent 256353fc
......@@ -4,26 +4,17 @@
"metadata": {},
"clean": false,
"frontmatter": false,
"ignore": [
"LICENSE",
"README.md"
],
"ignore": ["LICENSE", "README.md"],
"plugins": [
{
"metalsmith-ignore": [
"**/.git/**",
"mockup/**"
]
"metalsmith-ignore": ["**/.git/**", "mockup/**"]
},
{
"metalsmith-ignore": [
"code/**",
"layouts/**"
]
"metalsmith-ignore": ["code/**", "layouts/**"]
},
{
"metalsmith-congregate": {
"files": [ "_config.yml", "code/404.html", "code/atom.xml" ],
"files": ["_config.yml", "code/404.html", "code/atom.xml"],
"output": "."
}
},
......@@ -46,37 +37,26 @@
},
{
"metalsmith-metacopy": {
"file": [
{ "src": "paths.href", "dest": "source" }
]
"file": [{ "src": "paths.href", "dest": "source" }]
}
},
{
"metalsmith-collections": {
"metalsmith-dynamic-collections": {
"pages": {
"pattern": [
"**",
"!blog/**",
"!**/*.xml",
"!**/*.png",
"!**/*.css",
"!**/*.ico",
"!code/**",
"!**/404.html"
]
"pattern": ["**", "!blog/**", "!**/*.xml", "!**/*.png", "!**/*.css", "!**/*.ico", "!code/**", "!**/404.html"]
},
"posts": {
"pattern": [ "blog/*.md" ],
"pattern": ["blog/*.md"],
"sortBy": "paths.name",
"reverse": true
},
"impact/reports/inbox": {
"pattern": [ "impact/reports/inbox/*.md" ],
"pattern": ["impact/reports/inbox/*.md"],
"sortBy": "date",
"reverse": true
},
"impact/reports/events/internet-freedom-festival-2016": {
"pattern": [ "impact/reports/events/internet-freedom-festival-2016/*.md" ],
"pattern": ["impact/reports/events/internet-freedom-festival-2016/*.md"],
"sortBy": "date",
"reverse": true
}
......@@ -84,18 +64,62 @@
},
{
"metalsmith-filemetadata": [
{"pattern": "architecture/**/*.*", "preserve": "true", "metadata": {"subrepo": "project/architecture","subdir": "architecture"}},
{"pattern": "blog/**/*.*", "preserve": "true", "metadata": {"subrepo": "project/blog","subdir": "blog"}},
{"pattern": "framework/**/*.*", "preserve": "true", "metadata": {"subrepo": "project/framework","subdir": "framework"}},
{"pattern": "impact/reports/**/*.*", "preserve": "true", "metadata": {"subrepo": "impact", "layout": "impact/reports","subdir": "impact/reports"}},
{"pattern": "design/**/*.*", "preserve": "true", "metadata": {"subrepo": "project/design","subdir": "design"}},
{"pattern": "practices/design/**/*.*", "preserve": "true", "metadata": {"subrepo": "practices/design","subdir": "practices/design"}},
{"pattern": "practices/policy/**/*.*", "preserve": "true", "metadata": {"subrepo": "practices/policy","subdir": "practices/policy"}},
{"pattern": "practices/technology/**/*.*", "preserve": "true", "metadata": {"subrepo": "practices/technology","subdir": "practices/technology"}},
{"pattern": "scores/sources/**/*.*", "preserve": "true", "metadata": {"subrepo": "scores/sources","subdir": "scores/sources"}},
{"pattern": "metrics/agents/**/*.*", "preserve": "true", "metadata": {"subrepo": "metrics/agents","subdir": "metrics/agents"}},
{"pattern": "metrics/measurements/**/*.*", "preserve": "true", "metadata": {"subrepo": "metrics/measurements","subdir": "metrics/measurements"}},
{"pattern": "metrics/sources/**/*.*", "preserve": "true", "metadata": {"subrepo": "metrics/sources","subdir": "metrics/sources"}}
{
"pattern": "architecture/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "project/architecture", "subdir": "architecture" }
},
{ "pattern": "blog/**/*.*", "preserve": "true", "metadata": { "subrepo": "project/blog", "subdir": "blog" } },
{
"pattern": "framework/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "project/framework", "subdir": "framework" }
},
{
"pattern": "impact/reports/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "impact", "layout": "impact/reports", "subdir": "impact/reports" }
},
{
"pattern": "design/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "project/design", "subdir": "design" }
},
{
"pattern": "practices/design/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "practices/design", "subdir": "practices/design" }
},
{
"pattern": "practices/policy/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "practices/policy", "subdir": "practices/policy" }
},
{
"pattern": "practices/technology/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "practices/technology", "subdir": "practices/technology" }
},
{
"pattern": "scores/sources/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "scores/sources", "subdir": "scores/sources" }
},
{
"pattern": "metrics/agents/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "metrics/agents", "subdir": "metrics/agents" }
},
{
"pattern": "metrics/measurements/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "metrics/measurements", "subdir": "metrics/measurements" }
},
{
"pattern": "metrics/sources/**/*.*",
"preserve": "true",
"metadata": { "subrepo": "metrics/sources", "subdir": "metrics/sources" }
}
]
},
{
......@@ -103,14 +127,8 @@
},
{
"metalsmith-metacopy": {
"file": [
{ "src": "paths.href", "dest": "url" },
{ "src": "paths.name", "dest": "basename" }
],
"metadata": [
{ "src": "date", "dest": "site.date" },
{ "src": "collections", "dest": "site" }
]
"file": [{ "src": "paths.href", "dest": "url" }, { "src": "paths.name", "dest": "basename" }],
"metadata": [{ "src": "date", "dest": "site.date" }, { "src": "collections", "dest": "site" }]
}
},
{
......@@ -173,13 +191,16 @@
{
"metalsmith-permalinks": {
"relative": true,
"linksets": [{
"linksets": [
{
"match": { "collection": "posts" },
"pattern": "blog/:datebasename"
},{
"match": { "collection": "pages" },
"pattern": ":dir/:title"
}]
},
{
"match": { "collection": "pages" },
"pattern": ":dir/:title"
}
]
}
},
{
......@@ -202,10 +223,7 @@
{ "src": "url", "dest": "page.url" },
{ "src": "title", "dest": "page.title" }
],
"metadata": [
{ "src": "date", "dest": "site.date" },
{ "src": "collections", "dest": "site" }
]
"metadata": [{ "src": "date", "dest": "site.date" }, { "src": "collections", "dest": "site" }]
}
},
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment