feat: implement dynamic home page with configurable blog and category settings
This commit is contained in:
@@ -20,7 +20,15 @@ export async function getSiteSettings() {
|
||||
twitterUrl: "",
|
||||
instagramUrl: "",
|
||||
linkedinUrl: "",
|
||||
footerText: "© 2025 Afrohub. Tous droits réservés."
|
||||
footerText: "© 2025 Afrohub. Tous droits réservés.",
|
||||
homeBlogShow: true,
|
||||
homeBlogTitle: "Derniers Articles",
|
||||
homeBlogSubtitle: "Toutes les actualités de l'entrepreneuriat africain.",
|
||||
homeBlogCount: 3,
|
||||
homeBlogSelection: "latest",
|
||||
homeBlogIds: [],
|
||||
homeBlogCategories: [],
|
||||
homeCategories: ["Technologie & IT", "Agriculture & Agrobusiness", "Mode & Textile", "Cosmétique & Beauté"]
|
||||
};
|
||||
|
||||
if (!settings) return defaultSettings;
|
||||
@@ -43,7 +51,7 @@ export async function updateSiteSettings(data: any) {
|
||||
});
|
||||
|
||||
revalidatePath('/settings');
|
||||
revalidatePath('/', 'layout'); // Revalidate all public pages because footer/header might use it
|
||||
revalidatePath('/', 'layout');
|
||||
|
||||
return { success: true, settings };
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user