Skip to main content

github-issue-blockquote-not.tmpl

This template produces a simple wrapper for GitHub issue content in gwern.net's content display system.

Pathtemplate/include/github-issue-blockquote-not.tmpl
LanguageHTML5/Pandoc
Lines3

Read this when Use this page when tracing the HTML/Pandoc templates and include fragments that shape rendered gwern.net pages around github-issue-blockquote-not.tmpl.

Overview

This template produces a simple wrapper for GitHub issue content in gwern.net's content display system. It wraps the issue content in a <div> with appropriate classes but without using blockquote elements, making it suitable for contexts where the content should be displayed as primary content rather than quoted material.

The template is part of gwern.net's content transformation system, which handles various external content types including GitHub issues. When a GitHub issue is loaded (either as popup content or transcluded into a page), this template provides the HTML structure wrapping the rendered issue content.

This template is filled entirely at runtime by the JavaScript frontend, not by the Haskell backend: all template/include/*.tmpl files are bundled into js/transclude-templates-GENERATED.js by build/build_unified_assets.php and rendered by fillTemplate() in transclude.js. In content.js, the githubIssue content type sets popFrameTemplate: "github-issue-blockquote-not" — i.e., this variant is used when a GitHub issue is displayed inside a popup/popin, where the pop-frame already provides the visual container; in-page transclusion uses github-issue-blockquote-outside instead.

Template Variables

VariableTypeDescription
contentTypeClassStringCSS class indicating content type (set to "github-issue" by content.js)
issueContentHTMLThe rendered GitHub issue content (title, body, comments, metadata)

Output Structure

The template generates a minimal two-div wrapper:

<div class="content-transform [content-type-class]">
<div class="data-field issue-content">[rendered issue HTML]</div>
</div>

Key structural features:

  • Outer wrapper: content-transform class indicates this is transformed external content
  • Content type class: Dynamic class for content-type-specific styling (e.g., github-issue)
  • Inner wrapper: data-field issue-content contains the actual rendered issue
  • No blockquote: Uses only <div> elements, not <blockquote>
  • Minimal structure: Two-level nesting with straightforward semantics

Content Type Classification

The contentTypeClass variable allows the frontend to style different content types appropriately. For this template, content.js's githubIssue content type always supplies "github-issue"; other content-transform types (e.g., tweets, with contentTypeClass: "tweet") use their own analogous templates (tweet-blockquote-outside/tweet-blockquote-not) rather than this one.

Integration with Content System

This template is used by:

  1. Content loaders: The githubIssue content type in content.js, which fetches issue content from the GitHub API
  2. Popup system: When displaying GitHub issues in pop-frames (this is the popFrameTemplate variant)

The issueContent variable is populated from the GitHub API response (requested with Accept: application/vnd.github.html+json, so GitHub returns the issue body pre-rendered as HTML).

Styling Hooks

The wrapper structure provides CSS hooks for:

  • .content-transform: General styling for all transformed external content
  • .[contentTypeClass]: Specific styling for content type (e.g., .github-issue)
  • .data-field: Consistent styling for data fields across all templates
  • .issue-content: Specific targeting of the issue content container

This allows the CSS to:

  • Apply consistent spacing/borders to all external content
  • Style GitHub issues differently from other content types
  • Target issue-specific elements (comments, metadata, code blocks)

Semantic Considerations

Unlike "blockquote-outside" variants, this template uses <div> elements instead of <blockquote>:

  • Not quotation: Indicates content is displayed as primary material, not quoted reference
  • Screen readers: Won't announce as quoted content
  • Styling: Won't inherit blockquote indentation/styling
  • Semantic neutrality: Generic container without semantic implications

This is appropriate when GitHub issues are displayed as main content (e.g., in a dedicated popup or embedded section) rather than as quoted references.


See Also