Skip to content

Commit 4b44e9d

Browse files
committed
Use Mustache for tweet
1 parent 04bc5d8 commit 4b44e9d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ https://json-ld.github.io/minutes/{{gDate}}/
7979
8080
#w3c #json-ld`;
8181

82+
const TWITTER_BODY = `JSON-LD CG discusses {{message}}:
83+
https://json-ld.github.io/minutes/{{gDate}}/ #w3c #json-ld`;
84+
85+
8286
/************************* Utility Functions *********************************/
8387
function postToWordpress(username, password, content, callback) {
8488
var client = wp.createClient({
@@ -423,9 +427,8 @@ async.waterfall([ function(callback) {
423427
}
424428
}, function(err, results) {
425429
// construct the tweet
426-
var tweet = 'JSON-LD CG discusses ' +
427-
results.message + ': https://json-ld.github.io/minutes/' +
428-
gDate + '/ #w3c #json-ld';
430+
var tweet = Mustache.render(TWITTER_BODY,
431+
{message: results.message, gDate});
429432

430433
// send the tweet
431434
twitter.updateStatus(tweet, function(data) {

0 commit comments

Comments
 (0)