TableauPageFeedbackExtension
- code :: https://github.com/halostatue/tableau_page_feedback_extension
- issues :: https://github.com/halostatue/tableau_page_feedback_extension/issues
A Tableau extension that generates feedback links (issues,
discussions) for pages and posts. Each displayable page gets a feedback_urls
map in its frontmatter, and $feedback:issue / $feedback:discussion markers
in rendered HTML are replaced with the full URLs.
Installation
Add tableau_page_feedback_extension to your dependencies in mix.exs:
def deps do
[
{:tableau_page_feedback_extension, "~> 1.0"}
]
endConfiguration
config :tableau, TableauPageFeedbackExtension,
enabled: true,
forge: :github,
repo: "owner/repo",
github: [
discussion: [category: "General"]
]Options
:forge(required) — The forge type. Currently only:githubis supported.:repo(required) — Repository slug ("owner/repo").:host— Override the forge host. Defaults to"github.com".:title_prefix— String prepended to the page title in the feedback title.:body_suffix— Additional text appended after the page URL in the feedback body.
Forge-Specific Configuration
Forge-specific options are nested under the forge key. Types with missing required config are disabled with a warning.
GitHub (:github)
:issue— No additional configuration. Enabled by default.:discussion— Requires:category(the GitHub Discussions category name).
Feedback Types by Forge
| Forge | Types |
|---|---|
:github | issue, discussion |
Usage
In Templates
The extension adds feedback_urls to each page's assigns:
<%= if assigns[:feedback_urls] do %>
<a href="<%= @feedback_urls.issue %>">Report an issue</a>
<a href="<%= @feedback_urls.discussion %>">Start a discussion</a>
<% end %>In Markdown Content
Use markers directly in content — they're replaced in the rendered HTML:
[Report an issue]($feedback:issue)
[Start a discussion]($feedback:discussion)Semantic Versioning
TableauPageFeedbackExtension follows Semantic Versioning 2.0.