<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>header documentation on header — website metadata toolkit</title><link>https://arran4.github.io/header/</link><description>Recent content in header documentation on header — website metadata toolkit</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://arran4.github.io/header/index.xml" rel="self" type="application/rss+xml"/><item><title>Extraction and rendering</title><link>https://arran4.github.io/header/docs/concepts/metadata-and-rendering/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arran4.github.io/header/docs/concepts/metadata-and-rendering/</guid><description>&lt;h1 id="extraction-and-rendering"&gt;Extraction and rendering&lt;a class="anchor" href="#extraction-and-rendering" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The program first fetches a page and extracts its available metadata into a &lt;code&gt;PageInfo&lt;/code&gt; value. Supported groups include Open Graph, Twitter Cards, JSON-LD, App Links, HTML link relationships and selected site-specific information.&lt;/p&gt;
&lt;p&gt;Different output styles render selected properties rather than changing the underlying extraction. The &lt;code&gt;json&lt;/code&gt; style exposes structured fields; the Open Graph and Twitter styles focus on their respective families. This is why a field may be present in one style but omitted by design in another.&lt;/p&gt;</description></item><item><title>Getting started</title><link>https://arran4.github.io/header/docs/getting-started/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arran4.github.io/header/docs/getting-started/</guid><description>&lt;h1 id="getting-started"&gt;Getting started&lt;a class="anchor" href="#getting-started" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Goal:&lt;/strong&gt; Install &lt;code&gt;header&lt;/code&gt;, extract metadata from a URL, and inspect the result.&lt;/p&gt;
&lt;h2 id="prerequisites"&gt;Prerequisites&lt;a class="anchor" href="#prerequisites" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Install a supported Go toolchain (Go 1.26 or later to build from source) and have network access to a webpage. Alternatively, download a compatible binary from &lt;a href="https://github.com/arran4/header/releases"&gt;GitHub Releases&lt;/a&gt; when available.&lt;/p&gt;
&lt;h2 id="install"&gt;Install&lt;a class="anchor" href="#install" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go install github.com/arran4/header/cmd/header@latest&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Check the installed command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header --help&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id="extract-metadata"&gt;Extract metadata&lt;a class="anchor" href="#extract-metadata" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header extract --style json https://example.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This requests the page and prints the extracted metadata in JSON. The actual fields depend on the remote page and can change as its content changes.&lt;/p&gt;</description></item><item><title>Inspect social preview metadata</title><link>https://arran4.github.io/header/docs/how-to/inspect-preview/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arran4.github.io/header/docs/how-to/inspect-preview/</guid><description>&lt;h1 id="inspect-social-preview-metadata"&gt;Inspect social preview metadata&lt;a class="anchor" href="#inspect-social-preview-metadata" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Fetch a page and focus on the metadata that social platforms use:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header extract --style opengraph https://example.com
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header extract --style twitter https://example.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The output only includes properties found on the page; an absent Open Graph image, for example, is not invented.&lt;/p&gt;
&lt;p&gt;To run built-in metadata checks:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header lint https://example.com
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header lint --list all https://example.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To generate a PNG preview card from a webpage:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header card list
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header card file --out card.png https://example.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The card file is written locally. Be aware that downloaded website images remain the property of their respective owners.&lt;/p&gt;</description></item><item><title>Trace redirects</title><link>https://arran4.github.io/header/docs/how-to/trace-redirects/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arran4.github.io/header/docs/how-to/trace-redirects/</guid><description>&lt;h1 id="trace-redirects"&gt;Trace redirects&lt;a class="anchor" href="#trace-redirects" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;To follow HTTP redirects and HTML meta-refresh redirects:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;header trace-redirects https://example.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use &lt;code&gt;header trace-redirects --help&lt;/code&gt; for the current redirect limit, delay and cookie options. Avoid using the fetcher as an unrestricted proxy in a privileged network environment; see the repository&amp;rsquo;s &lt;a href="https://github.com/arran4/header/blob/main/SECURITY.md"&gt;security policy&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Troubleshooting</title><link>https://arran4.github.io/header/docs/how-to/troubleshooting/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arran4.github.io/header/docs/how-to/troubleshooting/</guid><description>&lt;h1 id="troubleshooting"&gt;Troubleshooting&lt;a class="anchor" href="#troubleshooting" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Symptom&lt;/th&gt;
 &lt;th&gt;First check&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;The request fails&lt;/td&gt;
 &lt;td&gt;Confirm the URL is reachable and that the host accepts your client and User-Agent&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;A metadata field is missing&lt;/td&gt;
 &lt;td&gt;Inspect the source document; &lt;code&gt;header&lt;/code&gt; does not fabricate absent properties&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;A rendered output is unexpected&lt;/td&gt;
 &lt;td&gt;Run &lt;code&gt;header extract --style json URL&lt;/code&gt; and compare the raw parsed properties&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;A generated card fails&lt;/td&gt;
 &lt;td&gt;Verify destination permissions and image availability&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;To diagnose a page with the built-in rules:&lt;/p&gt;</description></item><item><title>Contributing</title><link>https://arran4.github.io/header/docs/contributing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://arran4.github.io/header/docs/contributing/</guid><description>&lt;h1 id="contributing"&gt;Contributing&lt;a class="anchor" href="#contributing" aria-label="Link"&gt;&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The project is written in Go. Build from a checkout with Go 1.26 or later.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go test ./...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go test -race -count&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt; ./...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go vet ./...
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;go generate ./...&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Generated command sources under &lt;code&gt;cmd/&lt;/code&gt; are produced from definitions under &lt;code&gt;internal/cli/&lt;/code&gt; using the pinned &lt;code&gt;gosubc&lt;/code&gt; dependency. Review &lt;a href="https://github.com/arran4/header/blob/main/AGENTS.md"&gt;AGENTS.md&lt;/a&gt; and the &lt;a href="https://github.com/arran4/header/blob/main/internal/generate/README.md"&gt;generation notes&lt;/a&gt; before changing commands.&lt;/p&gt;
&lt;h2 id="documentation"&gt;Documentation&lt;a class="anchor" href="#documentation" aria-label="Link"&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The documentation source lives in &lt;code&gt;docs/&lt;/code&gt; and uses Hugo Book as a pinned submodule. Preview with:&lt;/p&gt;</description></item></channel></rss>