on master help sign in
Merge branch 'master' into patch-2
1e1931dDevine Lu Linvega
scripts/hallway.js+6−2
@@ -171,8 +171,8 @@ function Hallway (sites) {
171 const parts = line.replace(' ', '\t').split('\t')
171 const parts = line.replace(' ', '\t').split('\t')
172 const date = parts[0].trim()
172 const date = parts[0].trim()
173 const body = escapeHtml(parts[1].trim()).trim()
173 const body = escapeHtml(parts[1].trim()).trim()
174− const channel = body.substr(0, 1) === '/' ? body.split(' ')[0].substr(1).toLowerCase() : body.substr(0, 1) === '@' ? 'veranda' : 'lobby'
174+ const channel = body.substr(0, 1) === '/' ? cleanTags(body.split(' ')[0].substr(1).toLowerCase()) : body.substr(0, 1) === '@' ? 'veranda' : 'lobby'
175− const tags = (body.match(reTag) || []).map(a => a.substr(a.indexOf('#') + 1).toLowerCase())
175+ const tags = (body.match(reTag) || []).map(a => cleanTags(a.substr(a.indexOf('#') + 1).toLowerCase()))
176 const offset = new Date() - new Date(date)
176 const offset = new Date() - new Date(date)
177 entries.push({ date, body, author, offset, channel, tags })
177 entries.push({ date, body, author, offset, channel, tags })
178 }
178 }
@@ -215,6 +215,10 @@ function escapeHtml (unsafe) {
215 return unsafe.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;')
215 return unsafe.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#039;')
216}
216}
217
217
218+function cleanTags (unsafe){
219+ return unsafe.replace(/([^a-z0-9]+)/gi, '-')
220+}
221+
218function stripHash (hash) {
222function stripHash (hash) {
219 const decoded = decodeURIComponent(hash)
223 const decoded = decodeURIComponent(hash)
220 return decoded.charAt(0) === '#' ? decoded.substring(1) : decoded
224 return decoded.charAt(0) === '#' ? decoded.substring(1) : decoded
scripts/sites.js+15−18
@@ -59,16 +59,6 @@ const sites = [
59 wiki: 'https://liamcooke.com/merveilles/wiki.ndtl'
59 wiki: 'https://liamcooke.com/merveilles/wiki.ndtl'
60 },
60 },
61
61
62− {
63− author: 'electricgecko',
64− contact: 'desk@electricgecko.de',
65− langs: ['de', 'en'],
66− title: 'electricgecko',
67− rss: 'https://electricgecko.de/feed',
68− type: 'blog',
69− url: 'https://electricgecko.de'
70− },
71−
72 {
62 {
73 langs: ['en'],
63 langs: ['en'],
74 url: 'https://hraew.autophagy.io'
64 url: 'https://hraew.autophagy.io'
@@ -100,11 +90,6 @@ const sites = [
100 url: 'https://heracl.es'
90 url: 'https://heracl.es'
101 },
91 },
102
92
103− {
104− langs: ['en'],
105− url: 'http://luminghao.com'
106− },
107−
108 {
93 {
109 langs: ['en'],
94 langs: ['en'],
110 url: 'https://turelio.github.io'
95 url: 'https://turelio.github.io'
@@ -164,7 +149,11 @@ const sites = [
164 },
149 },
165
150
166 {
151 {
152+ author: 'Paloma Kop',
153+ contact: 'doubleobelisk@gmail.com',
167 langs: ['en'],
154 langs: ['en'],
155+ title: 'palomakop.tv',
156+ type: 'portfolio',
168 url: 'https://palomakop.tv'
157 url: 'https://palomakop.tv'
169 },
158 },
170
159
@@ -791,7 +780,7 @@ const sites = [
791 type: 'hybrid',
780 type: 'hybrid',
792 url: 'https://estfyr.net'
781 url: 'https://estfyr.net'
793 },
782 },
794−
783+
795 {
784 {
796 author: 'Payson Wallach',
785 author: 'Payson Wallach',
797 contact: 'payson@paysonwallach.com',
786 contact: 'payson@paysonwallach.com',
@@ -799,7 +788,7 @@ const sites = [
799 langs: ['en'],
788 langs: ['en'],
800 url: 'https://paysonwallach.com'
789 url: 'https://paysonwallach.com'
801 },
790 },
802−
791+
803 {
792 {
804 author: 'icco',
793 author: 'icco',
805 contact: 'nat@natwelch.com',
794 contact: 'nat@natwelch.com',
@@ -808,7 +797,7 @@ const sites = [
808 type: 'portfolio',
797 type: 'portfolio',
809 url: 'https://natwelch.com'
798 url: 'https://natwelch.com'
810 },
799 },
811−
800+
812 {
801 {
813 author: 'whtrbt',
802 author: 'whtrbt',
814 contact: 'pi@benjamin.gray.land',
803 contact: 'pi@benjamin.gray.land',
@@ -824,6 +813,14 @@ const sites = [
824 langs: ['en'],
813 langs: ['en'],
825 url: 'https://aklsh.github.io',
814 url: 'https://aklsh.github.io',
826 type: 'hybrid'
815 type: 'hybrid'
816+ },
817+
818+ {
819+ author: 'hxii',
820+ contact: 'paul@glushak.net',
821+ langs: ['en'],
822+ type: 'hybrid',
823+ url: 'https://paulglushak.com'
827 }
824 }
828]
825]
829
826