← back to Rentv 2026
rentv-v1: merge RENTV Originals into the homepage feed — published posts lead the wire, badged 'Original', link to /post/:id (category filter + most-read included)
c5fcc4790c371473f9934d8e7abac772cc76eef9 · 2026-07-21 15:50:54 -0700 · Steve Abrams
Files touched
M data/markets.jsonM data/news.jsonM data/ticker.jsonM public/index.html
Diff
commit c5fcc4790c371473f9934d8e7abac772cc76eef9
Author: Steve Abrams <steve@designerwallcoverings.com>
Date: Tue Jul 21 15:50:54 2026 -0700
rentv-v1: merge RENTV Originals into the homepage feed — published posts lead the wire, badged 'Original', link to /post/:id (category filter + most-read included)
---
data/markets.json | 2 +-
data/news.json | 2 +-
data/ticker.json | 2 +-
public/index.html | 16 +++++++++++-----
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/data/markets.json b/data/markets.json
index 73e9ff88..1eed488b 100644
--- a/data/markets.json
+++ b/data/markets.json
@@ -1,5 +1,5 @@
{
- "fetched_at": "2026-07-21T22:23:36.013Z",
+ "fetched_at": "2026-07-21T22:43:37.402Z",
"source": "Yahoo Finance — live (CBOE Treasury yields, Dow Jones/MSCI REIT indices)",
"curve": [
{
diff --git a/data/news.json b/data/news.json
index 6d3bd60e..3b3cf74f 100644
--- a/data/news.json
+++ b/data/news.json
@@ -1,6 +1,6 @@
{
"source": "rentv.com — live",
- "fetched_at": "2026-07-21T22:23:35.670Z",
+ "fetched_at": "2026-07-21T22:43:36.640Z",
"count": 30,
"items": [
{
diff --git a/data/ticker.json b/data/ticker.json
index 784d002e..38d051f9 100644
--- a/data/ticker.json
+++ b/data/ticker.json
@@ -1,5 +1,5 @@
{
- "fetched_at": "2026-07-21T22:23:35.985Z",
+ "fetched_at": "2026-07-21T22:43:37.375Z",
"la_office_vac": {
"label": "LA OFFICE VAC",
"value": "23.1%",
diff --git a/public/index.html b/public/index.html
index d88741c1..5a2d49f8 100644
--- a/public/index.html
+++ b/public/index.html
@@ -137,19 +137,25 @@ var _match=_CATS.filter(function(c){return c.toLowerCase()===_q;})[0];
let ALL=[], cat=_match||'all';
const esc=s=>(s||'').replace(/[&<>"]/g,c=>({'&':'&','<':'<','>':'>','"':'"'}[c]));
const bgimg=o=>(o&&o.image)?(' style="background:#12161a url(\''+esc(o.image)+'\') center/cover"'):'';
+var LK=x=>(x.orig?'/post/':'/news/')+encodeURIComponent(x.id); // originals → the blog reader
+var OB=x=>x.orig?' <span style="background:var(--red);color:#fff;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;padding:1px 6px;border-radius:8px;vertical-align:middle">Original</span>':'';
function render(){
const items = cat==='all'?ALL:ALL.filter(x=>x.cat===cat);
const lead=items[0];
- if(lead){document.getElementById('lead').innerHTML='<a href="/news/'+encodeURIComponent(lead.id)+'"><div class="img"'+bgimg(lead)+'></div><span class="chip">'+esc(lead.cat)+' · Western U.S.</span><h1>'+esc(lead.title)+'</h1><div class="byl">By RENTV Staff · live from rentv.com</div></a>';}
- const cards=items.slice(1,13).map(x=>'<a class="card" href="/news/'+encodeURIComponent(x.id)+'"><div class="img"'+bgimg(x)+'></div><span class="chip">'+esc(x.cat)+'</span><h4>'+esc(x.title)+'</h4><div class="byl">RENTV Staff</div></a>').join('');
+ if(lead){document.getElementById('lead').innerHTML='<a href="'+LK(lead)+'"><div class="img"'+bgimg(lead)+'></div><span class="chip">'+esc(lead.cat)+' · Western U.S.'+OB(lead)+'</span><h1>'+esc(lead.title)+'</h1><div class="byl">'+(lead.orig?'By '+esc(lead.author||'RENTV Staff')+' · RENTV Original':'By RENTV Staff · live from rentv.com')+'</div></a>';}
+ const cards=items.slice(1,13).map(x=>'<a class="card" href="'+LK(x)+'"><div class="img"'+bgimg(x)+'></div><span class="chip">'+esc(x.cat)+OB(x)+'</span><h4>'+esc(x.title)+'</h4><div class="byl">'+(x.orig?esc(x.author||'RENTV Staff'):'RENTV Staff')+'</div></a>').join('');
document.getElementById('cards').innerHTML=cards||'<p style="color:var(--sub)">No items in this section right now.</p>';
document.getElementById('breaking').innerHTML=ALL.slice(0,6).map(x=>'<span>'+esc(x.title)+'</span>').join(' · ').repeat(2);
- document.getElementById('mostread').innerHTML=ALL.slice(0,5).map(x=>'<li><a href="/news/'+encodeURIComponent(x.id)+'">'+esc(x.title)+'</a></li>').join('');
+ document.getElementById('mostread').innerHTML=ALL.slice(0,5).map(x=>'<li><a href="'+LK(x)+'">'+esc(x.title)+'</a></li>').join('');
}
async function load(){
try{
- const d=await (await fetch('/api/news')).json();
- ALL=(d.items||[]).map(x=>({...x,title:x.title}));
+ const [d,pd]=await Promise.all([
+ (await fetch('/api/news')).json(),
+ fetch('/api/posts?status=published').then(r=>r.json()).catch(()=>({items:[]}))
+ ]);
+ const orig=(pd.items||[]).map(p=>({id:p.id,title:p.title,cat:p.cat,image:p.image,author:p.author,orig:true}));
+ ALL=orig.concat((d.items||[]).map(x=>({...x,title:x.title}))); // RENTV Originals lead the feed
if(ALL.length){render();
const mins=Math.max(0,Math.round((Date.now()-new Date(d.fetched_at))/60000));
document.getElementById('freshness').textContent=mins<2?'updated just now':('updated '+mins+' min ago');
← 026bc4ee rentv-v1: BLOG BACKEND — file-backed original articles (post
·
back to Rentv 2026
·
rentv-v1 versions: add clean nav + mobile hamburger to all 1 b28c3f18 →