Browse Source

Started working on rss feed

pull/84/head
jrtechs 4 years ago
parent
commit
88bc769ce7
5 changed files with 82 additions and 16 deletions
  1. +4
    -4
      config.json
  2. +1
    -0
      package.json
  3. +7
    -0
      routes/index.js
  4. +37
    -0
      routes/rss.js
  5. +33
    -12
      sitemap.txt

+ 4
- 4
config.json View File

@ -3,10 +3,10 @@
"SESSION_SECRET": "random-data-to-seed-session-data",
"SQL_HOST": "sql-hostname",
"SQL_DATABASE": "sql-database-name",
"SQL_USER": "sql-user",
"SQL_PASSWORD": "sql-password",
"SQL_HOST": "localhost",
"SQL_DATABASE": "jrtechs_blog",
"SQL_USER": "root",
"SQL_PASSWORD": "password",
"CAPTCHA_SECRET": "captcha-secret",

+ 1
- 0
package.json View File

@ -18,6 +18,7 @@
"promise": "^8.0.1",
"request": "^2.88.0",
"routes": "^2.1.0",
"rss": "^1.2.2",
"sanitizer": "^0.1.3",
"sendmail": "^1.4.1",
"whiskers": "^0.4.0"

+ 7
- 0
routes/index.js View File

@ -50,8 +50,15 @@ routes.get('/posts', (request, result) =>
const project = require('./projects');
routes.use('/steam', project);
<<<<<<< Updated upstream
const api = require('./api');
routes.use('/api', api);
=======
const feed = require('./rss');
routes.use('/rss', feed);
>>>>>>> Stashed changes
//blog home page
routes.get('/', (request, result) =>

+ 37
- 0
routes/rss.js View File

@ -0,0 +1,37 @@
var RSS = require('rss');
const routes = require('express').Router();
const pageBuilder = require('../utils/pageBuilder');
var feed = new RSS({
title: 'jrtechs',
description: 'Jeffery\'s blog which has everything from data-science to cooking',
feed_url: 'https://jrtechs.net/rss',
site_url: 'https://jrtechs.net',
image_url: 'https://jrtechs.net/includes/img/favicon/android-chrome-512x512.png',
docs: 'https://github.com/jrtechs/NodeJSBlog',
managingEditor: 'Jeffery Russell',
webMaster: 'Jeffery Russell',
copyright: 'Jeffery Russell',
language: 'en',
categories: ['other', 'hardware', 'open-source', 'programming', 'projects', 'web-development', 'data-science'],
});
// var xml = require('xml');
var xmlFeed = feed.xml();
routes.get('/', (request, result) =>
{
result.set('Content-Type', 'text/xml');
result.send(xmlFeed);
});
routes.get('*', (request, result) =>
{
pageBuilder.print404(result);
});
module.exports = routes;

+ 33
- 12
sitemap.txt View File

@ -1,20 +1,41 @@
http://jrtechs.net/
http://jrtechs.net/category/projects
http://jrtechs.net/category/hardware
http://jrtechs.net/category/java
http://jrtechs.net/category/test
http://jrtechs.net/category/testing-2
http://jrtechs.net/category/testing-three 3
http://jrtechs.net/category/other
http://jrtechs.net/category/web-development
http://jrtechs.net/category/web-development
http://jrtechs.net/category/programming
http://jrtechs.net/projects/steam-friends-graph
http://jrtechs.net/projects/java-fibonacci-solver
http://jrtechs.net/projects/musical-floppy-drive-build-log
http://jrtechs.net/category/projects
http://jrtechs.net/category/web-development
http://jrtechs.net/hardware/2018-rochester-maker-faire
http://jrtechs.net/hardware/ddr4-ram-introduction
http://jrtechs.net/hardware/hard-drive-speeds
http://jrtechs.net/java/gremlin-in-10-minutes
http://jrtechs.net/java/top-three-recommended-java-ides
http://jrtechs.net/java/bash-usr-bin-java-cannot-execute-binary-file
http://jrtechs.net/other/college-cookbook
http://jrtechs.net/other/2018-in-review
http://jrtechs.net/other/morality-of-self-driving-cars
http://jrtechs.net/other/my-college-essay
http://jrtechs.net/web-development/node-website-optimization
http://jrtechs.net/web-development/node-website-optimization
http://jrtechs.net/other/deepfakes
http://jrtechs.net/other/why-do-i-blog
http://jrtechs.net/other/ways-to-avoid-getting-hacked
http://jrtechs.net/other/should-you-run-a-server-on-desktop-hardware
http://jrtechs.net/programming/sorting-algorithms
http://jrtechs.net/programming/knapsack-problem
http://jrtechs.net/programming/cs-theory-exam-2-review
http://jrtechs.net/programming/everything-fibonacci
http://jrtechs.net/programming/c-to-c++-tutorial
http://jrtechs.net/programming/gremlin-in-10-minutes
http://jrtechs.net/programming/university-vs-teaching-yourself-programming
http://jrtechs.net/programming/using-english-conventions-to-write-clean-code
http://jrtechs.net/projects/steam-friends-graph
http://jrtechs.net/projects/musical-floppy-drive-build-log
http://jrtechs.net/projects/musical-floppy-drives
http://jrtechs.net/projects/java-fibonacci-solver
http://jrtechs.net/projects/ackermann-function-written-in-java
http://jrtechs.net/projects/batch-minecraft-launcher-with-auto-restart
http://jrtechs.net/projects/time-lapse-programming-zombie-game
http://jrtechs.net/projects/time-lapse-programming-pong
http://jrtechs.net/web-development/lazy-loading-youtube-videos
http://jrtechs.net/web-development/node-website-optimization
http://jrtechs.net/web-development/node-vs-php
http://jrtechs.net/web-development/why-i-stopped-using-wordpress
http://jrtechs.net/web-development/history-of-jrtechs

Loading…
Cancel
Save