{"action":"created","comment":{"url":"https://api.github.com/repos/MarkBind/markbind/pulls/comments/242379818","pull_request_review_id":185874585,"id":242379818,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjM3OTgxOA==","diff_hunk":"@@ -205,4 +205,47 @@ If you want to include a keyword without rendering it to the page, add `d-none`\n This is good for catching <span class=\"keyword\">regressions</span>\r\n ```\r\n \r\n+# Using Tags\r\n+\r\n+You can use tags to selectively display or hide certain elements on the compiled static site.\r\n+\r\n+Tags are specified by the `tags` attribute, **and can be attached to any HTML element**. For example:\r\n+\r\n+```html\r\n+# Welcome to my site\r\n+\r\n+<p tags=\"language--english\">Hello</p>\r\n+<div tags=\"language--french\">Bonjour</div>\r\n+<span tags=\"language--spanish\">Hola</span>\r\n+```\r\n+\r\n+You need to specify the tags to include in `site.json`, under the `tags` option:\r\n+\r\n+```\r\n+{\r\n+  ...\r\n+  \"tags\": [\"language--english\"]\r\n+}\r\n+```\r\n+\r\n+When compiled, only elements that match tags specified in the `site.json` files will be displayed. All other tagged elements will be hidden. In this case, only the element with the `language--english` tag will be displayed. This is helpful when creating multiple versions of a page without having to maintain separate copies. If this option is not specified, all tagged elements will be displayed.\r\n+\r\n+**You can also use multiple tags in a single HTML element. Specify each tag in the `tag` attribute** separated by a space. An element will be displayed if **any of the tags** matches the one in site.json.\r","path":"docs/userGuide/usingComponents.md","position":29,"original_position":29,"commit_id":"20a93a2aa7295969e9d0287b646047db07035853","original_commit_id":"20a93a2aa7295969e9d0287b646047db07035853","user":{"login":"yamgent","id":3168908,"node_id":"MDQ6VXNlcjMxNjg5MDg=","avatar_url":"https://avatars1.githubusercontent.com/u/3168908?v=4","gravatar_id":"","url":"https://api.github.com/users/yamgent","html_url":"https://github.com/yamgent","followers_url":"https://api.github.com/users/yamgent/followers","following_url":"https://api.github.com/users/yamgent/following{/other_user}","gists_url":"https://api.github.com/users/yamgent/gists{/gist_id}","starred_url":"https://api.github.com/users/yamgent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yamgent/subscriptions","organizations_url":"https://api.github.com/users/yamgent/orgs","repos_url":"https://api.github.com/users/yamgent/repos","events_url":"https://api.github.com/users/yamgent/events{/privacy}","received_events_url":"https://api.github.com/users/yamgent/received_events","type":"User","site_admin":false},"body":"Sorry, just spotted a typo. It should be `tags`, not `tag`? Same as with the code snippet below.","created_at":"2018-12-18T01:31:30Z","updated_at":"2018-12-18T01:31:39Z","html_url":"https://github.com/MarkBind/markbind/pull/467#discussion_r242379818","pull_request_url":"https://api.github.com/repos/MarkBind/markbind/pulls/467","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/MarkBind/markbind/pulls/comments/242379818"},"html":{"href":"https://github.com/MarkBind/markbind/pull/467#discussion_r242379818"},"pull_request":{"href":"https://api.github.com/repos/MarkBind/markbind/pulls/467"}}},"pull_request":{"url":"https://api.github.com/repos/MarkBind/markbind/pulls/467","id":238063888,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4MDYzODg4","html_url":"https://github.com/MarkBind/markbind/pull/467","diff_url":"https://github.com/MarkBind/markbind/pull/467.diff","patch_url":"https://github.com/MarkBind/markbind/pull/467.patch","issue_url":"https://api.github.com/repos/MarkBind/markbind/issues/467","number":467,"state":"open","locked":false,"title":"Add element tagging functionality","user":{"login":"jamos-tay","id":19278089,"node_id":"MDQ6VXNlcjE5Mjc4MDg5","avatar_url":"https://avatars3.githubusercontent.com/u/19278089?v=4","gravatar_id":"","url":"https://api.github.com/users/jamos-tay","html_url":"https://github.com/jamos-tay","followers_url":"https://api.github.com/users/jamos-tay/followers","following_url":"https://api.github.com/users/jamos-tay/following{/other_user}","gists_url":"https://api.github.com/users/jamos-tay/gists{/gist_id}","starred_url":"https://api.github.com/users/jamos-tay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamos-tay/subscriptions","organizations_url":"https://api.github.com/users/jamos-tay/orgs","repos_url":"https://api.github.com/users/jamos-tay/repos","events_url":"https://api.github.com/users/jamos-tay/events{/privacy}","received_events_url":"https://api.github.com/users/jamos-tay/received_events","type":"User","site_admin":false},"body":"**What is the purpose of this pull request? (put \"X\" next to an item, remove the rest)**\r\n\r\n• [X] New feature\r\n\r\nFixes #435 \r\n\r\n<!--\r\n    If this pull request is addressing an issue, link to the issue: \"Fixes #xxx\" or \"Resolves #xxx\"\r\n-->\r\n\r\n\r\n<!--\r\n    Please ensure your pull request is ready:\r\n    - Bug fix PR that is non-trivial **should** add a page or unit test for regression testing.\r\n    - Feature PR **must** add a page to the user guide for demo.\r\n    - Enhancement PR **should** update the user guide.\r\n\r\n    Otherwise, prefix your PR title with \"[WIP]\".\r\n-->\r\n\r\n**What is the rationale for this request?**\r\n\r\nThe user may want to be able to show/hide certain elements from a page depending on the deploy configuration.\r\n\r\nCited use case:\r\n\r\nWhen generating multiple sites with only slightly differing content, it might be easier to store all the information in one page, and allow the author to show/hide them. For example, if I have a Java tutorial page and a C# tutorial page, the text content can be exactly the same, only the code will differ:\r\n\r\n```\r\n# Print a line\r\n\r\n<!-- Example syntax -->\r\n<div tag=\"lang--java\">\r\n    System.out.println(\"Hello world\");\r\n</div>\r\n<div tag=\"lang--Csharp\">\r\n    Console.WriteLine(\"Hello world\");\r\n</div>\r\n```\r\n\r\nThe user can then deploy a Java or a C# version of the site without having two projects.\r\n\r\n**What changes did you make? (Give an overview)**\r\n\r\nFunctionality implemented based on what was discussed here: https://github.com/MarkBind/markbind/issues/435#issuecomment-423080705\r\n\r\nTags (`{tagType}--{tagName}`) are added to any HTML element.\r\nUser can specify which tags to include in site.json or frontmatter. Frontmatter takes precedence.\r\nOnly elements with tags in site.json are displayed, rest are hidden.\r\n\r\nSimplified from `include: { type: 'lang', include: ['java'] }` to just `include: { 'lang': ['java'] }` though.\r\n\r\n**Is there anything you'd like reviewers to focus on?**\r\n\r\nBehavior works according to spec, but I'm wondering if it's a little unintuitive - do we want to mandate categorizing tags into different types (`lang` etc.) rather than just having general use tags, without the `{type}--`? I.e. `include : ['tag1', 'tag2' ... ]` I don't think we lose any functionality by having the latter.\r\n","created_at":"2018-12-12T14:49:34Z","updated_at":"2018-12-18T01:31:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"757d40dfafadb8cfa7ee1d71b2d9e102ffdfb4e7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/MarkBind/markbind/pulls/467/commits","review_comments_url":"https://api.github.com/repos/MarkBind/markbind/pulls/467/comments","review_comment_url":"https://api.github.com/repos/MarkBind/markbind/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MarkBind/markbind/issues/467/comments","statuses_url":"https://api.github.com/repos/MarkBind/markbind/statuses/20a93a2aa7295969e9d0287b646047db07035853","head":{"label":"jamos-tay:add-element-tagging","ref":"add-element-tagging","sha":"20a93a2aa7295969e9d0287b646047db07035853","user":{"login":"jamos-tay","id":19278089,"node_id":"MDQ6VXNlcjE5Mjc4MDg5","avatar_url":"https://avatars3.githubusercontent.com/u/19278089?v=4","gravatar_id":"","url":"https://api.github.com/users/jamos-tay","html_url":"https://github.com/jamos-tay","followers_url":"https://api.github.com/users/jamos-tay/followers","following_url":"https://api.github.com/users/jamos-tay/following{/other_user}","gists_url":"https://api.github.com/users/jamos-tay/gists{/gist_id}","starred_url":"https://api.github.com/users/jamos-tay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamos-tay/subscriptions","organizations_url":"https://api.github.com/users/jamos-tay/orgs","repos_url":"https://api.github.com/users/jamos-tay/repos","events_url":"https://api.github.com/users/jamos-tay/events{/privacy}","received_events_url":"https://api.github.com/users/jamos-tay/received_events","type":"User","site_admin":false},"repo":{"id":127748144,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc3NDgxNDQ=","name":"markbind","full_name":"jamos-tay/markbind","private":false,"owner":{"login":"jamos-tay","id":19278089,"node_id":"MDQ6VXNlcjE5Mjc4MDg5","avatar_url":"https://avatars3.githubusercontent.com/u/19278089?v=4","gravatar_id":"","url":"https://api.github.com/users/jamos-tay","html_url":"https://github.com/jamos-tay","followers_url":"https://api.github.com/users/jamos-tay/followers","following_url":"https://api.github.com/users/jamos-tay/following{/other_user}","gists_url":"https://api.github.com/users/jamos-tay/gists{/gist_id}","starred_url":"https://api.github.com/users/jamos-tay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamos-tay/subscriptions","organizations_url":"https://api.github.com/users/jamos-tay/orgs","repos_url":"https://api.github.com/users/jamos-tay/repos","events_url":"https://api.github.com/users/jamos-tay/events{/privacy}","received_events_url":"https://api.github.com/users/jamos-tay/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jamos-tay/markbind","description":"MarkBind is a tool for generating content-heavy websites from source files in Markdown format","fork":true,"url":"https://api.github.com/repos/jamos-tay/markbind","forks_url":"https://api.github.com/repos/jamos-tay/markbind/forks","keys_url":"https://api.github.com/repos/jamos-tay/markbind/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamos-tay/markbind/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamos-tay/markbind/teams","hooks_url":"https://api.github.com/repos/jamos-tay/markbind/hooks","issue_events_url":"https://api.github.com/repos/jamos-tay/markbind/issues/events{/number}","events_url":"https://api.github.com/repos/jamos-tay/markbind/events","assignees_url":"https://api.github.com/repos/jamos-tay/markbind/assignees{/user}","branches_url":"https://api.github.com/repos/jamos-tay/markbind/branches{/branch}","tags_url":"https://api.github.com/repos/jamos-tay/markbind/tags","blobs_url":"https://api.github.com/repos/jamos-tay/markbind/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamos-tay/markbind/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamos-tay/markbind/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamos-tay/markbind/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamos-tay/markbind/statuses/{sha}","languages_url":"https://api.github.com/repos/jamos-tay/markbind/languages","stargazers_url":"https://api.github.com/repos/jamos-tay/markbind/stargazers","contributors_url":"https://api.github.com/repos/jamos-tay/markbind/contributors","subscribers_url":"https://api.github.com/repos/jamos-tay/markbind/subscribers","subscription_url":"https://api.github.com/repos/jamos-tay/markbind/subscription","commits_url":"https://api.github.com/repos/jamos-tay/markbind/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamos-tay/markbind/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamos-tay/markbind/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamos-tay/markbind/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamos-tay/markbind/contents/{+path}","compare_url":"https://api.github.com/repos/jamos-tay/markbind/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamos-tay/markbind/merges","archive_url":"https://api.github.com/repos/jamos-tay/markbind/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamos-tay/markbind/downloads","issues_url":"https://api.github.com/repos/jamos-tay/markbind/issues{/number}","pulls_url":"https://api.github.com/repos/jamos-tay/markbind/pulls{/number}","milestones_url":"https://api.github.com/repos/jamos-tay/markbind/milestones{/number}","notifications_url":"https://api.github.com/repos/jamos-tay/markbind/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamos-tay/markbind/labels{/name}","releases_url":"https://api.github.com/repos/jamos-tay/markbind/releases{/id}","deployments_url":"https://api.github.com/repos/jamos-tay/markbind/deployments","created_at":"2018-04-02T11:37:40Z","updated_at":"2018-08-06T13:35:04Z","pushed_at":"2018-12-17T08:26:32Z","git_url":"git://github.com/jamos-tay/markbind.git","ssh_url":"git@github.com:jamos-tay/markbind.git","clone_url":"https://github.com/jamos-tay/markbind.git","svn_url":"https://github.com/jamos-tay/markbind","homepage":"https://markbind.github.io/markbind/","size":3710,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"MarkBind:master","ref":"master","sha":"e70e762eae07a08b762bcd2f2eac62c23ab868d6","user":{"login":"MarkBind","id":25006893,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDA2ODkz","avatar_url":"https://avatars1.githubusercontent.com/u/25006893?v=4","gravatar_id":"","url":"https://api.github.com/users/MarkBind","html_url":"https://github.com/MarkBind","followers_url":"https://api.github.com/users/MarkBind/followers","following_url":"https://api.github.com/users/MarkBind/following{/other_user}","gists_url":"https://api.github.com/users/MarkBind/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkBind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkBind/subscriptions","organizations_url":"https://api.github.com/users/MarkBind/orgs","repos_url":"https://api.github.com/users/MarkBind/repos","events_url":"https://api.github.com/users/MarkBind/events{/privacy}","received_events_url":"https://api.github.com/users/MarkBind/received_events","type":"Organization","site_admin":false},"repo":{"id":78425531,"node_id":"MDEwOlJlcG9zaXRvcnk3ODQyNTUzMQ==","name":"markbind","full_name":"MarkBind/markbind","private":false,"owner":{"login":"MarkBind","id":25006893,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MDA2ODkz","avatar_url":"https://avatars1.githubusercontent.com/u/25006893?v=4","gravatar_id":"","url":"https://api.github.com/users/MarkBind","html_url":"https://github.com/MarkBind","followers_url":"https://api.github.com/users/MarkBind/followers","following_url":"https://api.github.com/users/MarkBind/following{/other_user}","gists_url":"https://api.github.com/users/MarkBind/gists{/gist_id}","starred_url":"https://api.github.com/users/MarkBind/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarkBind/subscriptions","organizations_url":"https://api.github.com/users/MarkBind/orgs","repos_url":"https://api.github.com/users/MarkBind/repos","events_url":"https://api.github.com/users/MarkBind/events{/privacy}","received_events_url":"https://api.github.com/users/MarkBind/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/MarkBind/markbind","description":"MarkBind is a tool for generating content-heavy websites from source files in Markdown format","fork":false,"url":"https://api.github.com/repos/MarkBind/markbind","forks_url":"https://api.github.com/repos/MarkBind/markbind/forks","keys_url":"https://api.github.com/repos/MarkBind/markbind/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MarkBind/markbind/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MarkBind/markbind/teams","hooks_url":"https://api.github.com/repos/MarkBind/markbind/hooks","issue_events_url":"https://api.github.com/repos/MarkBind/markbind/issues/events{/number}","events_url":"https://api.github.com/repos/MarkBind/markbind/events","assignees_url":"https://api.github.com/repos/MarkBind/markbind/assignees{/user}","branches_url":"https://api.github.com/repos/MarkBind/markbind/branches{/branch}","tags_url":"https://api.github.com/repos/MarkBind/markbind/tags","blobs_url":"https://api.github.com/repos/MarkBind/markbind/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MarkBind/markbind/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MarkBind/markbind/git/refs{/sha}","trees_url":"https://api.github.com/repos/MarkBind/markbind/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MarkBind/markbind/statuses/{sha}","languages_url":"https://api.github.com/repos/MarkBind/markbind/languages","stargazers_url":"https://api.github.com/repos/MarkBind/markbind/stargazers","contributors_url":"https://api.github.com/repos/MarkBind/markbind/contributors","subscribers_url":"https://api.github.com/repos/MarkBind/markbind/subscribers","subscription_url":"https://api.github.com/repos/MarkBind/markbind/subscription","commits_url":"https://api.github.com/repos/MarkBind/markbind/commits{/sha}","git_commits_url":"https://api.github.com/repos/MarkBind/markbind/git/commits{/sha}","comments_url":"https://api.github.com/repos/MarkBind/markbind/comments{/number}","issue_comment_url":"https://api.github.com/repos/MarkBind/markbind/issues/comments{/number}","contents_url":"https://api.github.com/repos/MarkBind/markbind/contents/{+path}","compare_url":"https://api.github.com/repos/MarkBind/markbind/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MarkBind/markbind/merges","archive_url":"https://api.github.com/repos/MarkBind/markbind/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MarkBind/markbind/downloads","issues_url":"https://api.github.com/repos/MarkBind/markbind/issues{/number}","pulls_url":"https://api.github.com/repos/MarkBind/markbind/pulls{/number}","milestones_url":"https://api.github.com/repos/MarkBind/markbind/milestones{/number}","notifications_url":"https://api.github.com/repos/MarkBind/markbind/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MarkBind/markbind/labels{/name}","releases_url":"https://api.github.com/repos/MarkBind/markbind/releases{/id}","deployments_url":"https://api.github.com/repos/MarkBind/markbind/deployments","created_at":"2017-01-09T12:10:30Z","updated_at":"2018-12-17T02:47:24Z","pushed_at":"2018-12-17T08:26:33Z","git_url":"git://github.com/MarkBind/markbind.git","ssh_url":"git@github.com:MarkBind/markbind.git","clone_url":"https://github.com/MarkBind/markbind.git","svn_url":"https://github.com/MarkBind/markbind","homepage":"https://markbind.github.io/markbind/","size":3788,"stargazers_count":12,"watchers_count":12,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":90,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":16,"open_issues":90,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MarkBind/markbind/pulls/467"},"html":{"href":"https://github.com/MarkBind/markbind/pull/467"},"issue":{"href":"https://api.github.com/repos/MarkBind/markbind/issues/467"},"comments":{"href":"https://api.github.com/repos/MarkBind/markbind/issues/467/comments"},"review_comments":{"href":"https://api.github.com/repos/MarkBind/markbind/pulls/467/comments"},"review_comment":{"href":"https://api.github.com/repos/MarkBind/markbind/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MarkBind/markbind/pulls/467/commits"},"statuses":{"href":"https://api.github.com/repos/MarkBind/markbind/statuses/20a93a2aa7295969e9d0287b646047db07035853"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"yamgent"}}