Phase 1, part 4: promote the company's own products

- Content lists the company first, at /content/own: its products from
  the profile (always there to pick from), its own feeds (a new profile
  field for the blog, news and releases), and new or updated pages from
  its websites' sitemaps, with each page's title and description.
- Drafts from it are kind "product" (utm_campaign=product), filed under
  the company's name, and prompted to promote the company's own work
  without unsupported claims; on Reddit, in the makers' voice, with a
  warning that self-promotion is often restricted.

This completes Phase 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 14:42:37 -07:00
co-authored by Claude Opus 5.5
parent 0e34f574b7
commit cd24f2a06d
20 changed files with 685 additions and 30 deletions
+31 -9
View File
@@ -5,16 +5,18 @@
<a href="/content/published">Published</a>
</nav>
<div class="heading">
<h1>{{.Entry.Name}} <span class="badge {{.Entry.Relationship}}">{{.Entry.Relationship}}</span></h1>
<h1>{{.Name}} <span class="badge {{.Entry.Relationship}}">{{.Entry.Relationship}}</span></h1>
<div class="buttons">
<form method="post" action="/content/{{.Entry.ID}}/fetch" data-busy="Fetching…">
<form method="post" action="{{.Base}}/fetch" data-busy="Fetching…">
<button type="submit" {{if not .Sources}}disabled{{end}}>Fetch new</button>
</form>
<a class="button secondary" href="/inventory/{{.Entry.ID}}">Edit entry</a>
{{if .Own}}<a class="button secondary" href="/profile">Edit profile</a>{{else}}<a class="button secondary" href="/inventory/{{.Entry.ID}}">Edit entry</a>{{end}}
</div>
</div>
<p class="lede">
{{if .Sources}}Reads {{join .Sources ", "}}.{{else}}This entry has no sources yet: add an X handle, hashtags, a YouTube channel or RSS feeds to it.{{end}}
{{if .Own}}Posts that promote your own work: pick a product, or fetch your feeds and new pages on your websites.
{{if .Sources}}Reads {{join .Sources ", "}}.{{else}}Add your blog and release feeds, and your websites, to the <a href="/profile">profile</a> to fetch them.{{end}}
{{else}}{{if .Sources}}Reads {{join .Sources ", "}}.{{else}}This entry has no sources yet: add an X handle, hashtags, a YouTube channel or RSS feeds to it.{{end}}{{end}}
Last fetched {{ago .LastChecked}}; the next fetch looks for posts since {{.Since.Local.Format "2 Jan 15:04"}}.
</p>
@@ -28,13 +30,32 @@
{{end}}
<nav class="tabs">
<a href="/content/{{.Entry.ID}}" {{if not .ShowDismissed}}aria-current="page"{{end}}>Items</a>
<a href="/content/{{.Entry.ID}}?dismissed=1" {{if .ShowDismissed}}aria-current="page"{{end}}>Dismissed</a>
<a href="{{.Base}}" {{if not .ShowDismissed}}aria-current="page"{{end}}>Items</a>
<a href="{{.Base}}?dismissed=1" {{if .ShowDismissed}}aria-current="page"{{end}}>Dismissed</a>
</nav>
{{if .Items}}
<form method="post" action="/content/{{.Entry.ID}}/items" data-busy-on="write" data-busy="Writing drafts…">
{{if or .Items (and .Products (not .ShowDismissed))}}
<form method="post" action="{{.Base}}/items" data-busy-on="write" data-busy="Writing drafts…">
{{if .ShowDismissed}}<input type="hidden" name="dismissed" value="1">{{end}}
{{if and .Products (not .ShowDismissed)}}
<h2>Products</h2>
<ul class="items">
{{range .Products}}
<li class="item{{if .Used}} used{{end}}">
<label class="check">
<input type="checkbox" name="item" value="{{.ID}}">
<span>
<strong>{{.Title}}</strong>{{if .Used}} <span class="meta"><em>drafted before</em></span>{{end}}
<span class="body">{{truncate 300 .Body}}</span>
{{if .URL}}<a href="{{.URL}}" target="_blank" rel="noopener noreferrer">Open</a>{{end}}
</span>
</label>
</li>
{{end}}
</ul>
{{if .Items}}<h2>News from your feeds and sites</h2>{{end}}
{{end}}
{{if .Items}}
<ul class="items">
{{range .Items}}
<li class="item{{if .Used}} used{{end}}">
@@ -50,6 +71,7 @@
</li>
{{end}}
</ul>
{{end}}
{{if .ShowDismissed}}
<div class="actions"><button type="submit" name="action" value="restore" class="secondary">Restore selected</button></div>
@@ -83,7 +105,7 @@
</form>
{{else}}
<section class="card empty">
<p>{{if .ShowDismissed}}Nothing dismissed.{{else}}No items yet. Fetch to see what {{.Entry.Name}} has been up to.{{end}}</p>
<p>{{if .ShowDismissed}}Nothing dismissed.{{else if .Own}}No products or news yet: add products, feeds or websites to your <a href="/profile">profile</a>, then fetch.{{else}}No items yet. Fetch to see what {{.Name}} has been up to.{{end}}</p>
</section>
{{end}}
{{end}}{{end}}