diff --git a/config.default.js b/config.default.js index 6e5102d..d7040d3 100644 --- a/config.default.js +++ b/config.default.js @@ -57,21 +57,17 @@ var config = { // site links site_links: [ { - 'text': 'Node 官方网站', - 'url': 'http://nodejs.org/' + 'text': 'Node.js 官网', + 'url': 'http://nodejs.org/', }, { - 'text': 'Node Party', - 'url': 'http://party.cnodejs.net/' + text: 'Ruby-China', + url: 'https://ruby-china.org/', }, { - 'text': 'Node 入门', - 'url': 'http://nodebeginner.org/index-zh-cn.html' + text: 'Golang中国', + url: 'http://golangtc.com/', }, - { - 'text': 'Node 中文文档', - 'url': 'http://docs.cnodejs.net/cman/' - } ], // sidebar ads diff --git a/controllers/site.js b/controllers/site.js index 1c5631b..239fb1a 100644 --- a/controllers/site.js +++ b/controllers/site.js @@ -41,7 +41,8 @@ exports.index = function (req, res, next) { list_topic_count: limit, tops: tops, no_reply_topics: no_reply_topics, - pages: pages + pages: pages, + site_links: config.site_links, }); }); proxy.fail(next); diff --git a/views/sidebar.html b/views/sidebar.html index f04bd86..63f3f5b 100644 --- a/views/sidebar.html +++ b/views/sidebar.html @@ -69,4 +69,23 @@ <% } %> + <% if (typeof(site_links) !== 'undefined') { %> +
无
+ <% } %> +