2024-01-02 20:19:49 +08:00
|
|
|
/**
|
2024-01-04 22:50:57 +08:00
|
|
|
* links.js v1 | https://github.com/xaoxuu/hexo-theme-stellar/
|
2024-01-02 20:19:49 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
module.exports = ctx => {
|
|
|
|
var allLinks = {}
|
|
|
|
const data = ctx.locals.get('data')
|
|
|
|
for (let key of Object.keys(data)) {
|
|
|
|
if (key.startsWith('links/')) {
|
|
|
|
let newKey = key.replace('links/', '')
|
|
|
|
allLinks[newKey] = data[key]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ctx.theme.config.links = allLinks
|
|
|
|
}
|