Skip to content

Commit 4ba6b87

Browse files
Merge pull request #700 from domitriusclark/move-slack-mentions-to-discord
Move slack mentions to discord
2 parents 09d1ed4 + c4fde6e commit 4ba6b87

File tree

10 files changed

+43
-49
lines changed

10 files changed

+43
-49
lines changed

.eleventy.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const lodashGet = require("lodash/get");
22
const yaml = require("js-yaml");
33

4-
module.exports = function(eleventyConfig) {
4+
module.exports = function (eleventyConfig) {
55
// Support yaml data files
66
eleventyConfig.addDataExtension("yaml", contents => yaml.safeLoad(contents))
77

@@ -19,7 +19,7 @@ module.exports = function(eleventyConfig) {
1919
const { DateTime } = require('luxon');
2020
eleventyConfig.addFilter('formatDate', (dateObj, formatStr) => {
2121
// convert any date strings to read dates
22-
if(typeof(dateObj) == "string") {
22+
if (typeof (dateObj) == "string") {
2323
dateObj = new Date(dateObj);
2424
}
2525
const format = formatStr ? formatStr : 'LLLL d, y';
@@ -45,7 +45,7 @@ module.exports = function(eleventyConfig) {
4545
});
4646

4747

48-
eleventyConfig.addCollection("resources", function(collectionApi) {
48+
eleventyConfig.addCollection("resources", function (collectionApi) {
4949
return collectionApi.getFilteredByGlob("src/site/resources/*.md");
5050
});
5151

@@ -72,7 +72,7 @@ module.exports = function(eleventyConfig) {
7272

7373
// filter a data array based on the value of a property
7474
eleventyConfig.addFilter('select', (array, clause) => {
75-
if(clause.indexOf("=") > -1) {
75+
if (clause.indexOf("=") > -1) {
7676
const property = clause.split("=")[0];
7777
const value = clause.split("=")[1];
7878
return array.filter(item => lodashGet(item, property).includes(value));
@@ -83,9 +83,9 @@ module.exports = function(eleventyConfig) {
8383

8484
eleventyConfig.addFilter('flatten', (array) => {
8585
let results = [];
86-
for(let result of array) {
87-
if(result) {
88-
if(Array.isArray(result)) {
86+
for (let result of array) {
87+
if (result) {
88+
if (Array.isArray(result)) {
8989
results = [...results, ...result];
9090
} else {
9191
results.push(result);
@@ -97,8 +97,8 @@ module.exports = function(eleventyConfig) {
9797

9898
eleventyConfig.addFilter('unique', (array) => {
9999
let caseInsensitive = {};
100-
for(let val of array) {
101-
if(typeof val === "string") {
100+
for (let val of array) {
101+
if (typeof val === "string") {
102102
caseInsensitive[val.toLowerCase()] = val;
103103
}
104104
}
@@ -110,15 +110,15 @@ module.exports = function(eleventyConfig) {
110110
if (count > array.length) {
111111
count = array.length;
112112
}
113-
const shuffled = array.sort( () => 0.5 - Math.random() );
113+
const shuffled = array.sort(() => 0.5 - Math.random());
114114
return shuffled.slice(0, count);
115115
});
116116

117117
// Convert an associative array into an indexable, iterable array
118118
eleventyConfig.addFilter('iterable', (obj) => {
119119
var iterableArray = new Array();
120-
for (var item in obj){
121-
iterableArray.push( obj[item] );
120+
for (var item in obj) {
121+
iterableArray.push(obj[item]);
122122
}
123123
return iterableArray;
124124
});
@@ -142,9 +142,9 @@ module.exports = function(eleventyConfig) {
142142
return arr.sort((a, b) => {
143143
let aKey = lodashGet(a, selector).toLowerCase();
144144
let bKey = lodashGet(b, selector).toLowerCase();
145-
if(aKey < bKey) {
145+
if (aKey < bKey) {
146146
return -1;
147-
} else if(aKey > bKey) {
147+
} else if (aKey > bKey) {
148148
return 1;
149149
}
150150
return 0;
@@ -155,9 +155,9 @@ module.exports = function(eleventyConfig) {
155155
return arr.sort((a, b) => {
156156
let aKey = githubData[a.data.repo] ? (githubData[a.data.repo].stars || 0) : 0;
157157
let bKey = githubData[b.data.repo] ? (githubData[b.data.repo].stars || 0) : 0;
158-
if(aKey < bKey) {
158+
if (aKey < bKey) {
159159
return 1;
160-
} else if(aKey > bKey) {
160+
} else if (aKey > bKey) {
161161
return -1;
162162
}
163163
return 0;
@@ -168,11 +168,11 @@ module.exports = function(eleventyConfig) {
168168
// Format a path to avoid any Cloudinary URL API miss-steps.
169169
eleventyConfig.addFilter("cloudinaryifyPath", (str) => {
170170

171-
if(str) {
172-
171+
if (str) {
172+
173173
// add generic url encoding
174174
str = encodeURI(str);
175-
175+
176176
// we also need to double escape some characters which might appear in text
177177
// but are meaningful in cloudinary URLs
178178
str = str.replace(/,/g, '%252C');
@@ -189,7 +189,7 @@ module.exports = function(eleventyConfig) {
189189
eleventyConfig.addPassthroughCopy("src/site/site.webmanifest");
190190
eleventyConfig.addPassthroughCopy("src/site/survey/2021/community-survey-2021-methodology.pdf");
191191

192-
return {
192+
return {
193193
dir: {
194194
input: "src/site",
195195
inludes: "_includes",

netlify.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
status = 302
1717

1818
[[redirects]]
19-
from = "/slack"
20-
to = "https://join.slack.com/t/jamstack/shared_invite/zt-qkent5tv-0D0Nu3M1rJEHhVHE4zUMBw"
19+
from = "/discord"
20+
to = "https://discord.gg/jamstack"
2121
status = 302
2222

2323
[[redirects]]

src/site/_includes/components/join-the-movement.njk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
</p>
88
<div class="lg:w-2/3 mx-auto md:grid md:grid-cols-2 md:gap-6 lg:gap-8">
99
{{ zinger.cta(
10-
"Join the Slack",
11-
"https://jamstack.org/slack",
10+
"Join the Discord",
11+
"https://discord.gg",
1212
"bg-gradient-card-sunrise card-shadow hover:card-shadow-sunrise",
13-
"#logo-slack"
13+
"#logo-discord"
1414
)
1515
}}
1616
{{ zinger.cta(

src/site/_includes/footer.njk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<footer class="py-20 text-blue-200">
33
<ul class="text-left md:flex justify-between">
44
<li class="p-2">&copy; {{ page.date | formatDate('yyyy') }} Netlify </li>
5-
<li class="p-2"><a href="https://jamstack.org/slack">Chat on Slack</a></li>
5+
<li class="p-2"><a href="https://jamstack.org/discord">Chat on Discord</a></li>
66
<li class="p-2"><a href="https://community.netlify.com/">Netlify Support</a></li>
77
<li class="p-2"><a href="{{ pkg.repository.url }}">Code on GitHub</a></li>
88
<li class="p-2"><a href="/code-of-conduct/">Code of Conduct</a></li>

src/site/_includes/header.njk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
<div>
5151
<div class="text-center text-sm mb-4 text-gray-300">Connect with us</div>
5252
<div class="grid grid-cols-3 divide-x divide-gray-700 text-gray-300">
53-
<a href="https://jamstack.org/slack" target="_BLANK" rel="noopener" class="flex items-center justify-center p-4 hover:text-pink-500">
54-
<svg role="img" aria-label="Slack" focusable="false" width="30" height="30" class="fill-current"><use xlink:href="#logo-slack"></use></svg>
53+
<a href="https://discord.gg/jamstack" target="_BLANK" rel="noopener" class="flex items-center justify-center p-4 hover:text-pink-500">
54+
<svg role="img" aria-label="Discord" focusable="false" width="36" height="36" class="fill-current"><use xlink:href="#logo-discord"></use></svg>
5555
</a>
5656
<a href="https://twitter.com/jamstackconf" target="_BLANK" rel="noopener" class="flex items-center justify-center p-4 hover:text-pink-500">
5757
<svg role="img" aria-label="Twitter" focusable="false" width="34" height="28" class="fill-current"><use xlink:href="#logo-twitter"></use></svg>

0 commit comments

Comments
 (0)