github-issue-blockquote-not.tmpl
This template produces a simple wrapper for GitHub issue content in gwern.net's content display system.
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
| Variable | Type | Description |
|---|---|---|
contentTypeClass | String | CSS class indicating content type (set to "github-issue" by content.js) |
issueContent | HTML | The 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-transformclass 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-contentcontains 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:
- Content loaders: The
githubIssuecontent type incontent.js, which fetches issue content from the GitHub API - Popup system: When displaying GitHub issues in pop-frames (this is the
popFrameTemplatevariant)
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
- github-issue-blockquote-outside.tmpl - Variant with blockquote wrapper
- annotation-blockquote-not.tmpl - Similar "no-blockquote" pattern for annotations
- content.js - Content type system (
githubIssue) that fetches issue content and selects this template - popups.js - Popup system that displays issue popups
- transclude.js - Transclusion system for embedding external content
- extracts.js - Coordinates popup/transclude content display