Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (15 sloc) 852 Bytes
block variables
- var siteName = locals.site.siteName ? locals.site.siteName : 'Starter Project';
- var siteDesc = locals.site.siteDesc ? locals.site.siteDesc : 'Default site description.';
- var siteURL = locals.site.siteURL ? locals.site.siteURL : '/';
- var siteImg = locals.site.siteImg ? locals.site.siteImg : '/';
- var og = locals.site.og ? locals.site.og : '/';
- var menu = locals.site.menu ? locals.site.menu : [];
- var menu2 = locals.site.menu2 ? locals.site.menu2 : [];
- var list = locals.data.list ? locals.data.list.filter(item => new Date(item.date) < new Date()) : [];
- var thisItem = list.slice(-1).pop()
- function formatNumber(num)
- return num < 10 ? '0' + num : num;
- function formatDate(date)
- var d = new Date(date);
- return d.getFullYear() + '-' + formatNumber(d.getMonth() + 1) + '-' + formatNumber(d.getDate());
You can’t perform that action at this time.