- Migrate historical posts, localized assets, and 103 comments - Colocate media into posts/<slug>/images/ and remove wp-content - Add native bilingual support for ai-can-change post (English default, /zh variant) - Support clean taxonomy routing (/category/:category and /tag/:tag) - Dynamically populate categories and tags in sitemap.xml - Fix header scroll padding/margin offsets for anchor and reference links - Constrain image and media widths to prevent content overflow - Redesign homepage recent posts to 4 compact editorial cards - Restore valid binary favicon.ico and high-res icon assets - Remove placeholder content and sample test comments
17 lines
433 B
JavaScript
17 lines
433 B
JavaScript
const express = require('express');
|
|
const router = express.Router();
|
|
const contentService = require('../services/content');
|
|
|
|
router.get('/', (req, res) => {
|
|
const homePage = contentService.getPage('/');
|
|
const recentPosts = contentService.getAllPosts().slice(0, 4);
|
|
|
|
res.render('pages/home', {
|
|
title: homePage ? homePage.title : res.locals.site.title,
|
|
page: homePage,
|
|
recentPosts
|
|
});
|
|
});
|
|
|
|
module.exports = router;
|