Permalink
Browse files

add auto found RSS link

  • Loading branch information...
1 parent 16b80a8 commit ded499f862f5f1ab99693064eba9a221fa2c5bbf @fengmk2 fengmk2 committed Mar 17, 2012
Showing with 35 additions and 27 deletions.
  1. +17 −15 README.md
  2. +1 −1 config.default.js
  3. +3 −0 controllers/rss.js
  4. +1 −1 package.json
  5. +3 −0 views/layout.html
  6. +10 −10 views/sidebar.html
View
@@ -9,7 +9,7 @@ Node Club 是用 **Node.js** 和 **MongoDb** 开发的新型社区软件,界
## 安装部署
-```
+```bash
// install node npm mongodb
// run mongod
cd nodeclub
@@ -27,21 +27,21 @@ node app.js
allowedTags 添加:
-```
+```
embed //支持 flash 视频
table|thead|tbody|tr|td|th|caption //支持表格
```
allowedAttributes 添加:
-```
+```
embed:'src|quality|width|height|align|allowScriptAccess|allowFullScreen|mode|type'
table: 'class'
```
* express/node_modules/connect/lib/middleware/csrf.js 添加:
-```
+```javascript
if (req.body && req.body.user_action === 'upload_image') return next();
```
@@ -50,19 +50,21 @@ if (req.body && req.body.user_action === 'upload_image') return next();
从现在开始,所有提交都要严格遵循[代码规范](https://github.com/windyrobin/iFrame/blob/master/style.md)。
## Authors
-Below is the output from git-summary.
+
+Below is the output from `git-summary`.
```
project: nodeclub
- commits: 45
- files : 242
+ commits: 53
+ files : 244
authors:
- 22 fengmk2 48.9%
- 9 muyuan 20.0%
- 7 dead-horse 15.6%
- 3 Kenny Zhao 6.7%
- 1 LeToNode 2.2%
- 1 roymax 2.2%
- 1 thebrecht 2.2%
- 1 张洋 2.2%
+ 25 fengmk2 47.2%
+ 9 muyuan 17.0%
+ 8 dead-horse 15.1%
+ 4 ericzhang 7.5%
+ 3 Kenny Zhao 5.7%
+ 1 LeToNode 1.9%
+ 1 roymax 1.9%
+ 1 thebrecht 1.9%
+ 1 张洋 1.9%
```
View
@@ -5,7 +5,7 @@
exports.config = {
name: 'Node Club',
description: 'Node Club 是用Node.js开发的社区软件',
- version: '0.2.0',
+ version: '0.2.2',
// site settings
site_headers: [
View
@@ -4,6 +4,9 @@ var config = require('../config').config;
var data2xml = require('data2xml');
exports.index = function (req,res,next) {
+ if (!config.rss) {
+ return res.send('Please set `rss` in config.js');
+ }
var opt = { limit: config.rss.max_rss_items, sort: [['create_at','desc']] };
topic_ctrl.get_topics_by_query({}, opt, function (err, topics) {
View
@@ -1,6 +1,6 @@
{
"name": "nodeclub",
- "version": "0.2.1",
+ "version": "0.2.2",
"main": "./app.js",
"private": true,
"dependencies": {
View
@@ -10,6 +10,7 @@
%>
<%- headers[i] %>
<% } %>
+ <link title="RSS" type="application/rss+xml" rel="alternate" href="/rss" />
<!-- style -->
<link rel="stylesheet" type="text/css" href="/libs/bootstrap/css/bootstrap.css" media="screen" />
<link rel="stylesheet" type="text/css" href="/stylesheets/style.css" media="screen" />
@@ -73,6 +74,8 @@
<strong><a class='dark' href='/faq'>FAQ</a></strong>
&nbsp;&nbsp;|&nbsp;&nbsp;
<strong><a class='dark' href='https://github.com/muyuan/nodeclub/' target="_blank">Github</a></strong>
+ &nbsp;&nbsp;|&nbsp;&nbsp;
+ <strong><a class='dark' href='/rss' target="_blank">RSS</a></strong>
</div>
<div class='sep10'></div>
<div class='col_fade'>
View
@@ -17,16 +17,6 @@
<% } %>
</div>
- <div class='sep10'></div>
- <div class='panel'>
- <div class='header'>
- <span class='col_fade'>RSS订阅</span>
- </div>
- <div class='inner'>
- <a href="/rss"><img alt="RSS订阅" src="/images/rss_icon&40.png" /></a>
- </div>
- </div>
-
<% if (locals.tops) { %>
<div class='sep10'></div>
<div class='panel'>
@@ -144,4 +134,14 @@
<a href='http://ruby-china.org/?utm_source=nodejs&utm_medium=link&utm_campaign=upyun&md=nodejs' target='_blank'><img src='<%- config.site_static_host %>/images/ruby_china_logo.png' /></a>
</div>
</div>
+
+ <div class='sep10'></div>
+ <div class='panel'>
+ <div class='header'>
+ <span class='col_fade'>RSS订阅</span>
+ </div>
+ <div class='inner'>
+ <a href="/rss"><img alt="RSS订阅" src="/images/rss_icon&40.png" /></a>
+ </div>
+ </div>
</div>

0 comments on commit ded499f

Please sign in to comment.