mirror of
https://github.com/Start9Labs/start9.com.git
synced 2026-03-26 10:21:54 +00:00
added jobs, news, contact; added site.json backend; lazy loading images
This commit is contained in:
28
src/_data/news.js
Normal file
28
src/_data/news.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const Parser = require('rss-parser');
|
||||
const parser = new Parser();
|
||||
|
||||
let medium_feed = 'https://medium.com/feed/@Start9Labs';
|
||||
let twitter_feed = 'https://nitter.it/start9labs/rss';
|
||||
|
||||
module.exports = async function() {
|
||||
|
||||
let md = await parser.parseURL(medium_feed);
|
||||
let tw = await parser.parseURL(twitter_feed);
|
||||
|
||||
let data = await Promise.all([md,tw]).then((values)=>{
|
||||
let all = [];
|
||||
|
||||
values.forEach(item => {
|
||||
all = [...all, ...item.items];
|
||||
});
|
||||
|
||||
all.sort(function(a,b){
|
||||
return new Date(b.pubDate) - new Date(a.pubDate);
|
||||
});
|
||||
|
||||
return all;
|
||||
});
|
||||
|
||||
return data;
|
||||
|
||||
};
|
||||
@@ -1,4 +1,7 @@
|
||||
module.exports = {
|
||||
pitch: {
|
||||
url: "#infographics" //"https://start9.com/latest/learn/index"
|
||||
},
|
||||
products: {
|
||||
buyUrl: "https://store.start9.com/",
|
||||
diyUrl: "https://start9.com/latest/diy",
|
||||
@@ -7,6 +10,18 @@ module.exports = {
|
||||
whyRunBitcoinUrl: "https://bitcoinmagazine.com/culture/six-reasons-you-should-run-bitcoin-node",
|
||||
whyRunLightningUrl: "",
|
||||
},
|
||||
beYourOwn: {
|
||||
url: "https://marketplace.start9.com/"
|
||||
},
|
||||
poweredBy: {
|
||||
url: "https://github.com/Start9Labs/embassy-os"
|
||||
},
|
||||
support: {
|
||||
url: "https://start9.com/latest/support/index"
|
||||
},
|
||||
dev: {
|
||||
url: "https://start9.com/latest/developer-docs/"
|
||||
},
|
||||
footer: {
|
||||
copyright: "© " + new Date().getFullYear() + " by START9 LABS, INC.",
|
||||
canary:
|
||||
|
||||
Reference in New Issue
Block a user