{"action":"created","comment":{"url":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/comments/83368374","pull_request_review_id":4217365,"id":83368374,"diff_hunk":"@@ -16,8 +16,20 @@\n   <div class=\"highlightable\">\n     <ul class=\"topics\">\n       {{ $page := . }}\n-      {{ range $key , $value := .Site.Sections }}\n+      {{ $.Scratch.Set \"menuItems\" .Site.Params.menu }}\n+      {{ if not .Site.Params.menu }}\n+        {{ $.Scratch.Set \"menuItems\" .Site.Sections }}\n+      {{ end }}\n+      {{ $menuItems := $.Scratch.Get \"menuItems\" }}\n+      {{ range $i, $key := $menuItems }}\n       {{ if ne $key \"\" }}\n+\n+      {{ if not $.Site.Params.menu }}\n+        {{ $.Scratch.Set \"currentItem\" (index $page.Site.Sections $i) }}\n+      {{ else }}\n+        {{ $.Scratch.Set \"currentItem\" (index $page.Site.Sections $key) }}","path":"layouts/partials/menu.html","position":26,"original_position":16,"commit_id":"f92cab0955d712d6c186b8b568d1612f146a6bb5","original_commit_id":"7832dddc8920a76c727607b83cba0378fc0ddaf7","user":{"login":"kamilchm","id":1621930,"avatar_url":"https://avatars.githubusercontent.com/u/1621930?v=3","gravatar_id":"","url":"https://api.github.com/users/kamilchm","html_url":"https://github.com/kamilchm","followers_url":"https://api.github.com/users/kamilchm/followers","following_url":"https://api.github.com/users/kamilchm/following{/other_user}","gists_url":"https://api.github.com/users/kamilchm/gists{/gist_id}","starred_url":"https://api.github.com/users/kamilchm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamilchm/subscriptions","organizations_url":"https://api.github.com/users/kamilchm/orgs","repos_url":"https://api.github.com/users/kamilchm/repos","events_url":"https://api.github.com/users/kamilchm/events{/privacy}","received_events_url":"https://api.github.com/users/kamilchm/received_events","type":"User","site_admin":false},"body":"I changed it to show warning about possible typos in `config.toml`. I thought it would be better than skipping it silently.","created_at":"2016-10-14T07:13:04Z","updated_at":"2016-10-14T07:13:04Z","html_url":"https://github.com/matcornic/hugo-theme-learn/pull/8#discussion_r83368374","pull_request_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/comments/83368374"},"html":{"href":"https://github.com/matcornic/hugo-theme-learn/pull/8#discussion_r83368374"},"pull_request":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8","id":83453301,"html_url":"https://github.com/matcornic/hugo-theme-learn/pull/8","diff_url":"https://github.com/matcornic/hugo-theme-learn/pull/8.diff","patch_url":"https://github.com/matcornic/hugo-theme-learn/pull/8.patch","issue_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/issues/8","number":8,"state":"open","locked":false,"title":"Menu ordering and definition in config.toml","user":{"login":"kamilchm","id":1621930,"avatar_url":"https://avatars.githubusercontent.com/u/1621930?v=3","gravatar_id":"","url":"https://api.github.com/users/kamilchm","html_url":"https://github.com/kamilchm","followers_url":"https://api.github.com/users/kamilchm/followers","following_url":"https://api.github.com/users/kamilchm/following{/other_user}","gists_url":"https://api.github.com/users/kamilchm/gists{/gist_id}","starred_url":"https://api.github.com/users/kamilchm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamilchm/subscriptions","organizations_url":"https://api.github.com/users/kamilchm/orgs","repos_url":"https://api.github.com/users/kamilchm/repos","events_url":"https://api.github.com/users/kamilchm/events{/privacy}","received_events_url":"https://api.github.com/users/kamilchm/received_events","type":"User","site_admin":false},"body":"This is how I solved issues (https://github.com/matcornic/hugo-theme-learn/issues/2) with menu ordering for one of my sites.\r\nExample `tree content`:\r\n```\r\ncontent/\r\n├── about\r\n│   ├── content.md\r\n│   ├── index.md\r\n├── bar\r\n│   ├── index.md\r\n│   └── mode_bar.md\r\n├── foo\r\n│   ├── foo2.md\r\n│   └── index.md\r\n└── introduction\r\n    ├── index.md\r\n    └── blabla.md\r\n```\r\n\r\nNow if I want to have my menu ordered as:\r\n1. about\r\n2. introduction\r\n3. foo\r\n4. bar\r\nall I need is to add 2 lines in `config.toml`:\r\n```\r\ncreateFromSiteMenusMain = true\r\n[params]\r\n  menu = [ \"about\", \"introduction\", \"foo\", \"bar\" ]\r\n```","created_at":"2016-08-31T13:33:41Z","updated_at":"2016-10-14T07:13:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7f568aacf7c9e4040d5722076a1d9ffca232712","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8/commits","review_comments_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8/comments","review_comment_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/issues/8/comments","statuses_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/statuses/f92cab0955d712d6c186b8b568d1612f146a6bb5","head":{"label":"kamilchm:ordered-menu","ref":"ordered-menu","sha":"f92cab0955d712d6c186b8b568d1612f146a6bb5","user":{"login":"kamilchm","id":1621930,"avatar_url":"https://avatars.githubusercontent.com/u/1621930?v=3","gravatar_id":"","url":"https://api.github.com/users/kamilchm","html_url":"https://github.com/kamilchm","followers_url":"https://api.github.com/users/kamilchm/followers","following_url":"https://api.github.com/users/kamilchm/following{/other_user}","gists_url":"https://api.github.com/users/kamilchm/gists{/gist_id}","starred_url":"https://api.github.com/users/kamilchm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamilchm/subscriptions","organizations_url":"https://api.github.com/users/kamilchm/orgs","repos_url":"https://api.github.com/users/kamilchm/repos","events_url":"https://api.github.com/users/kamilchm/events{/privacy}","received_events_url":"https://api.github.com/users/kamilchm/received_events","type":"User","site_admin":false},"repo":{"id":67038927,"name":"hugo-theme-learn","full_name":"kamilchm/hugo-theme-learn","owner":{"login":"kamilchm","id":1621930,"avatar_url":"https://avatars.githubusercontent.com/u/1621930?v=3","gravatar_id":"","url":"https://api.github.com/users/kamilchm","html_url":"https://github.com/kamilchm","followers_url":"https://api.github.com/users/kamilchm/followers","following_url":"https://api.github.com/users/kamilchm/following{/other_user}","gists_url":"https://api.github.com/users/kamilchm/gists{/gist_id}","starred_url":"https://api.github.com/users/kamilchm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamilchm/subscriptions","organizations_url":"https://api.github.com/users/kamilchm/orgs","repos_url":"https://api.github.com/users/kamilchm/repos","events_url":"https://api.github.com/users/kamilchm/events{/privacy}","received_events_url":"https://api.github.com/users/kamilchm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kamilchm/hugo-theme-learn","description":"Porting Grav Learn theme to Hugo","fork":true,"url":"https://api.github.com/repos/kamilchm/hugo-theme-learn","forks_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/forks","keys_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/teams","hooks_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/hooks","issue_events_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/issues/events{/number}","events_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/events","assignees_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/assignees{/user}","branches_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/branches{/branch}","tags_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/tags","blobs_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/languages","stargazers_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/stargazers","contributors_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/contributors","subscribers_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/subscribers","subscription_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/subscription","commits_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/contents/{+path}","compare_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/merges","archive_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/downloads","issues_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/issues{/number}","pulls_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/labels{/name}","releases_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/releases{/id}","deployments_url":"https://api.github.com/repos/kamilchm/hugo-theme-learn/deployments","created_at":"2016-08-31T13:16:23Z","updated_at":"2016-08-31T13:16:24Z","pushed_at":"2016-10-14T07:08:31Z","git_url":"git://github.com/kamilchm/hugo-theme-learn.git","ssh_url":"git@github.com:kamilchm/hugo-theme-learn.git","clone_url":"https://github.com/kamilchm/hugo-theme-learn.git","svn_url":"https://github.com/kamilchm/hugo-theme-learn","homepage":"https://matcornic.github.io/hugo-learn-doc/basics/what-is-this-hugo-theme/","size":2035,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"matcornic:master","ref":"master","sha":"68a27015aaaf804087cd071cd0c6e9a2e91170db","user":{"login":"matcornic","id":3520706,"avatar_url":"https://avatars.githubusercontent.com/u/3520706?v=3","gravatar_id":"","url":"https://api.github.com/users/matcornic","html_url":"https://github.com/matcornic","followers_url":"https://api.github.com/users/matcornic/followers","following_url":"https://api.github.com/users/matcornic/following{/other_user}","gists_url":"https://api.github.com/users/matcornic/gists{/gist_id}","starred_url":"https://api.github.com/users/matcornic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matcornic/subscriptions","organizations_url":"https://api.github.com/users/matcornic/orgs","repos_url":"https://api.github.com/users/matcornic/repos","events_url":"https://api.github.com/users/matcornic/events{/privacy}","received_events_url":"https://api.github.com/users/matcornic/received_events","type":"User","site_admin":false},"repo":{"id":54111104,"name":"hugo-theme-learn","full_name":"matcornic/hugo-theme-learn","owner":{"login":"matcornic","id":3520706,"avatar_url":"https://avatars.githubusercontent.com/u/3520706?v=3","gravatar_id":"","url":"https://api.github.com/users/matcornic","html_url":"https://github.com/matcornic","followers_url":"https://api.github.com/users/matcornic/followers","following_url":"https://api.github.com/users/matcornic/following{/other_user}","gists_url":"https://api.github.com/users/matcornic/gists{/gist_id}","starred_url":"https://api.github.com/users/matcornic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matcornic/subscriptions","organizations_url":"https://api.github.com/users/matcornic/orgs","repos_url":"https://api.github.com/users/matcornic/repos","events_url":"https://api.github.com/users/matcornic/events{/privacy}","received_events_url":"https://api.github.com/users/matcornic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/matcornic/hugo-theme-learn","description":"Porting Grav Learn theme to Hugo","fork":false,"url":"https://api.github.com/repos/matcornic/hugo-theme-learn","forks_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/forks","keys_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/teams","hooks_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/hooks","issue_events_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/issues/events{/number}","events_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/events","assignees_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/assignees{/user}","branches_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/branches{/branch}","tags_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/tags","blobs_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/languages","stargazers_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/stargazers","contributors_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/contributors","subscribers_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/subscribers","subscription_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/subscription","commits_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/contents/{+path}","compare_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/merges","archive_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/downloads","issues_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/issues{/number}","pulls_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/labels{/name}","releases_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/releases{/id}","deployments_url":"https://api.github.com/repos/matcornic/hugo-theme-learn/deployments","created_at":"2016-03-17T10:58:41Z","updated_at":"2016-10-13T12:29:23Z","pushed_at":"2016-10-14T07:08:32Z","git_url":"git://github.com/matcornic/hugo-theme-learn.git","ssh_url":"git@github.com:matcornic/hugo-theme-learn.git","clone_url":"https://github.com/matcornic/hugo-theme-learn.git","svn_url":"https://github.com/matcornic/hugo-theme-learn","homepage":"https://matcornic.github.io/hugo-learn-doc/basics/what-is-this-hugo-theme/","size":2042,"stargazers_count":29,"watchers_count":29,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":5,"forks":10,"open_issues":5,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8"},"html":{"href":"https://github.com/matcornic/hugo-theme-learn/pull/8"},"issue":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/issues/8"},"comments":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/matcornic/hugo-theme-learn/statuses/f92cab0955d712d6c186b8b568d1612f146a6bb5"}}}}
{"actor":{"display_login":"kamilchm"}}