{"action":"opened","number":3605,"pull_request":{"url":"https://api.github.com/repos/gohugoio/hugo/pulls/3605","id":126182925,"html_url":"https://github.com/gohugoio/hugo/pull/3605","diff_url":"https://github.com/gohugoio/hugo/pull/3605.diff","patch_url":"https://github.com/gohugoio/hugo/pull/3605.patch","issue_url":"https://api.github.com/repos/gohugoio/hugo/issues/3605","number":3605,"state":"open","locked":false,"title":"create: Use archetype template as-is as a Go template","user":{"login":"bep","id":394382,"avatar_url":"https://avatars2.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"body":"This commit removes the fragile front matter decoding, and takes the provided archetype file as-is and processes it as a template.\n\nThis also means that we no longer will attempt to fill in default values for `title` and `date`.\n\nThe upside is that it is now easy to create these values in a dynamic way:\n\n```toml\n+++\ntitle = {{ .Name | title }}\ndate = {{ .Date }}\ndraft = true\n+++\n```\n\nYou can currently use all of Hugo's template funcs, but the data context is currently very shallow:\n\n* `.Type` gives the archetype kind provided\n* `.Name` gives the target file name without extension.\n* `.Path` gives the target file name\n* `.Date` gives the current time as RFC3339 formatted string\n\nThe above  will probably be extended in #1629.\n\nFixes #452\nUpdates #1629","created_at":"2017-06-18T09:33:58Z","updated_at":"2017-06-18T09:33:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/gohugoio/hugo/pulls/3605/commits","review_comments_url":"https://api.github.com/repos/gohugoio/hugo/pulls/3605/comments","review_comment_url":"https://api.github.com/repos/gohugoio/hugo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gohugoio/hugo/issues/3605/comments","statuses_url":"https://api.github.com/repos/gohugoio/hugo/statuses/58d845ec613a3a179ed28ee2602ffd128e36b0a0","head":{"label":"bep:archetyperevival","ref":"archetyperevival","sha":"58d845ec613a3a179ed28ee2602ffd128e36b0a0","user":{"login":"bep","id":394382,"avatar_url":"https://avatars2.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"repo":{"id":23870368,"name":"hugo","full_name":"bep/hugo","owner":{"login":"bep","id":394382,"avatar_url":"https://avatars2.githubusercontent.com/u/394382?v=3","gravatar_id":"","url":"https://api.github.com/users/bep","html_url":"https://github.com/bep","followers_url":"https://api.github.com/users/bep/followers","following_url":"https://api.github.com/users/bep/following{/other_user}","gists_url":"https://api.github.com/users/bep/gists{/gist_id}","starred_url":"https://api.github.com/users/bep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bep/subscriptions","organizations_url":"https://api.github.com/users/bep/orgs","repos_url":"https://api.github.com/users/bep/repos","events_url":"https://api.github.com/users/bep/events{/privacy}","received_events_url":"https://api.github.com/users/bep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bep/hugo","description":"A Fast and Flexible Static Site Generator built with love by spf13 in GoLang","fork":true,"url":"https://api.github.com/repos/bep/hugo","forks_url":"https://api.github.com/repos/bep/hugo/forks","keys_url":"https://api.github.com/repos/bep/hugo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bep/hugo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bep/hugo/teams","hooks_url":"https://api.github.com/repos/bep/hugo/hooks","issue_events_url":"https://api.github.com/repos/bep/hugo/issues/events{/number}","events_url":"https://api.github.com/repos/bep/hugo/events","assignees_url":"https://api.github.com/repos/bep/hugo/assignees{/user}","branches_url":"https://api.github.com/repos/bep/hugo/branches{/branch}","tags_url":"https://api.github.com/repos/bep/hugo/tags","blobs_url":"https://api.github.com/repos/bep/hugo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bep/hugo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bep/hugo/git/refs{/sha}","trees_url":"https://api.github.com/repos/bep/hugo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bep/hugo/statuses/{sha}","languages_url":"https://api.github.com/repos/bep/hugo/languages","stargazers_url":"https://api.github.com/repos/bep/hugo/stargazers","contributors_url":"https://api.github.com/repos/bep/hugo/contributors","subscribers_url":"https://api.github.com/repos/bep/hugo/subscribers","subscription_url":"https://api.github.com/repos/bep/hugo/subscription","commits_url":"https://api.github.com/repos/bep/hugo/commits{/sha}","git_commits_url":"https://api.github.com/repos/bep/hugo/git/commits{/sha}","comments_url":"https://api.github.com/repos/bep/hugo/comments{/number}","issue_comment_url":"https://api.github.com/repos/bep/hugo/issues/comments{/number}","contents_url":"https://api.github.com/repos/bep/hugo/contents/{+path}","compare_url":"https://api.github.com/repos/bep/hugo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bep/hugo/merges","archive_url":"https://api.github.com/repos/bep/hugo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bep/hugo/downloads","issues_url":"https://api.github.com/repos/bep/hugo/issues{/number}","pulls_url":"https://api.github.com/repos/bep/hugo/pulls{/number}","milestones_url":"https://api.github.com/repos/bep/hugo/milestones{/number}","notifications_url":"https://api.github.com/repos/bep/hugo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bep/hugo/labels{/name}","releases_url":"https://api.github.com/repos/bep/hugo/releases{/id}","deployments_url":"https://api.github.com/repos/bep/hugo/deployments","created_at":"2014-09-10T10:25:42Z","updated_at":"2017-04-18T09:21:57Z","pushed_at":"2017-06-18T09:33:42Z","git_url":"git://github.com/bep/hugo.git","ssh_url":"git@github.com:bep/hugo.git","clone_url":"https://github.com/bep/hugo.git","svn_url":"https://github.com/bep/hugo","homepage":"http://hugo.spf13.com","size":37302,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"gohugoio:master","ref":"master","sha":"4aa1239070bb9d4324d3582f3e809b702a59d3ac","user":{"login":"gohugoio","id":29385237,"avatar_url":"https://avatars1.githubusercontent.com/u/29385237?v=3","gravatar_id":"","url":"https://api.github.com/users/gohugoio","html_url":"https://github.com/gohugoio","followers_url":"https://api.github.com/users/gohugoio/followers","following_url":"https://api.github.com/users/gohugoio/following{/other_user}","gists_url":"https://api.github.com/users/gohugoio/gists{/gist_id}","starred_url":"https://api.github.com/users/gohugoio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohugoio/subscriptions","organizations_url":"https://api.github.com/users/gohugoio/orgs","repos_url":"https://api.github.com/users/gohugoio/repos","events_url":"https://api.github.com/users/gohugoio/events{/privacy}","received_events_url":"https://api.github.com/users/gohugoio/received_events","type":"Organization","site_admin":false},"repo":{"id":11180687,"name":"hugo","full_name":"gohugoio/hugo","owner":{"login":"gohugoio","id":29385237,"avatar_url":"https://avatars1.githubusercontent.com/u/29385237?v=3","gravatar_id":"","url":"https://api.github.com/users/gohugoio","html_url":"https://github.com/gohugoio","followers_url":"https://api.github.com/users/gohugoio/followers","following_url":"https://api.github.com/users/gohugoio/following{/other_user}","gists_url":"https://api.github.com/users/gohugoio/gists{/gist_id}","starred_url":"https://api.github.com/users/gohugoio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gohugoio/subscriptions","organizations_url":"https://api.github.com/users/gohugoio/orgs","repos_url":"https://api.github.com/users/gohugoio/repos","events_url":"https://api.github.com/users/gohugoio/events{/privacy}","received_events_url":"https://api.github.com/users/gohugoio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/gohugoio/hugo","description":"A Fast and Flexible Static Site Generator built with love in GoLang.","fork":false,"url":"https://api.github.com/repos/gohugoio/hugo","forks_url":"https://api.github.com/repos/gohugoio/hugo/forks","keys_url":"https://api.github.com/repos/gohugoio/hugo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gohugoio/hugo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gohugoio/hugo/teams","hooks_url":"https://api.github.com/repos/gohugoio/hugo/hooks","issue_events_url":"https://api.github.com/repos/gohugoio/hugo/issues/events{/number}","events_url":"https://api.github.com/repos/gohugoio/hugo/events","assignees_url":"https://api.github.com/repos/gohugoio/hugo/assignees{/user}","branches_url":"https://api.github.com/repos/gohugoio/hugo/branches{/branch}","tags_url":"https://api.github.com/repos/gohugoio/hugo/tags","blobs_url":"https://api.github.com/repos/gohugoio/hugo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gohugoio/hugo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gohugoio/hugo/git/refs{/sha}","trees_url":"https://api.github.com/repos/gohugoio/hugo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gohugoio/hugo/statuses/{sha}","languages_url":"https://api.github.com/repos/gohugoio/hugo/languages","stargazers_url":"https://api.github.com/repos/gohugoio/hugo/stargazers","contributors_url":"https://api.github.com/repos/gohugoio/hugo/contributors","subscribers_url":"https://api.github.com/repos/gohugoio/hugo/subscribers","subscription_url":"https://api.github.com/repos/gohugoio/hugo/subscription","commits_url":"https://api.github.com/repos/gohugoio/hugo/commits{/sha}","git_commits_url":"https://api.github.com/repos/gohugoio/hugo/git/commits{/sha}","comments_url":"https://api.github.com/repos/gohugoio/hugo/comments{/number}","issue_comment_url":"https://api.github.com/repos/gohugoio/hugo/issues/comments{/number}","contents_url":"https://api.github.com/repos/gohugoio/hugo/contents/{+path}","compare_url":"https://api.github.com/repos/gohugoio/hugo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gohugoio/hugo/merges","archive_url":"https://api.github.com/repos/gohugoio/hugo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gohugoio/hugo/downloads","issues_url":"https://api.github.com/repos/gohugoio/hugo/issues{/number}","pulls_url":"https://api.github.com/repos/gohugoio/hugo/pulls{/number}","milestones_url":"https://api.github.com/repos/gohugoio/hugo/milestones{/number}","notifications_url":"https://api.github.com/repos/gohugoio/hugo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gohugoio/hugo/labels{/name}","releases_url":"https://api.github.com/repos/gohugoio/hugo/releases{/id}","deployments_url":"https://api.github.com/repos/gohugoio/hugo/deployments","created_at":"2013-07-04T15:26:26Z","updated_at":"2017-06-18T05:59:23Z","pushed_at":"2017-06-17T08:07:11Z","git_url":"git://github.com/gohugoio/hugo.git","ssh_url":"git@github.com:gohugoio/hugo.git","clone_url":"https://github.com/gohugoio/hugo.git","svn_url":"https://github.com/gohugoio/hugo","homepage":"http://gohugo.io","size":37364,"stargazers_count":17772,"watchers_count":17772,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2489,"mirror_url":null,"open_issues_count":274,"forks":2489,"open_issues":274,"watchers":17772,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gohugoio/hugo/pulls/3605"},"html":{"href":"https://github.com/gohugoio/hugo/pull/3605"},"issue":{"href":"https://api.github.com/repos/gohugoio/hugo/issues/3605"},"comments":{"href":"https://api.github.com/repos/gohugoio/hugo/issues/3605/comments"},"review_comments":{"href":"https://api.github.com/repos/gohugoio/hugo/pulls/3605/comments"},"review_comment":{"href":"https://api.github.com/repos/gohugoio/hugo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gohugoio/hugo/pulls/3605/commits"},"statuses":{"href":"https://api.github.com/repos/gohugoio/hugo/statuses/58d845ec613a3a179ed28ee2602ffd128e36b0a0"}},"merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":107,"deletions":99,"changed_files":5}}
{"actor":{"display_login":"bep"}}