Skip to content

Commit 2c03e75

Browse files
Merge pull request #2222 from hpe-dev-incubator/upgrade-to-v5
Upgrade to v5
2 parents 0a12357 + d8703f2 commit 2c03e75

File tree

26 files changed

+9090
-14220
lines changed

26 files changed

+9090
-14220
lines changed

content/blog/artificial-intelligence-and-machine-learning-what-are-they-and-why-are-t.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ thumbnailimage:
1010
---
1111
**Editor’s Note:** MapR products and solutions sold prior to the acquisition of such assets by Hewlett Packard Enterprise Company in 2019, may have older product names and model numbers that differ from current solutions. For information about current offerings, which are now part of HPE Ezmeral Data Fabric, please visit [https://www.hpe.com/us/en/software/data-fabric.html](https://www.hpe.com/us/en/software/data-fabric.html)
1212

13-
## Original Post Information:
13+
## Original Post Information
1414

1515
```
1616
"authorDisplayName": "Saira Kennedy",
@@ -22,7 +22,7 @@ thumbnailimage:
2222

2323
Editor's Note: This post is based on the MapR Academy course, [_Introduction to Artificial Intelligence and Machine Learning_](https://learn.ezmeral.software.hpe.com/bus-introduction-to-artificial-intelligence-and-machine-learning).
2424

25-
<div style="padding:75% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/279683304?title=0&byline=0&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
25+
<div style="padding:75% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/279683304?title=0&byline=0&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div>
2626

2727
This post will give you a basic background on artificial intelligence and machine learning. It's a good place to gain an intro-level, working understanding of the categories, how they fit together, and their differences.
2828

@@ -60,9 +60,9 @@ Remember from the robot nesting doll example that machine learning is nested wit
6060

6161
Symbolic artificial intelligence is one of the first approaches to AI, which is based on the assertion that human intelligence can be achieved through the manipulation of symbols. This is the basis for physical symbol systems, also called formal systems, which center around three basic concepts that follow human thinking abilities:
6262

63-
* Symbols, like the plus sign as the physical joining of two perpendicular lines, are first encoded in our brains.
64-
* Thoughts are the structures, like the plus sign means to add things together.
65-
* The manipulation process is the act of thinking, or applying the symbol and its structure together, like when we use the plus sign in a mathematical equation for one plus two equals three.
63+
* Symbols, like the plus sign as the physical joining of two perpendicular lines, are first encoded in our brains.
64+
* Thoughts are the structures, like the plus sign means to add things together.
65+
* The manipulation process is the act of thinking, or applying the symbol and its structure together, like when we use the plus sign in a mathematical equation for one plus two equals three.
6666

6767
![](https://hpe-developer-portal.s3.amazonaws.com/uploads/media/2020/11/image15-1605168382441.jpg)
6868

gatsby-config.js

Lines changed: 60 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const remark = require('remark');
2-
const strip = require('strip-markdown');
1+
const remark = import('remark');
2+
const strip = import('strip-markdown');
33
require('dotenv').config({
44
path: `.env.${process.env.NODE_ENV}`,
55
});
@@ -8,14 +8,18 @@ const lunrHighlightPlugin = () => (builder) => {
88
builder.metadataWhitelist.push('position');
99
};
1010

11-
const stripMarkdown = (markdown) => {
12-
let text = markdown;
13-
remark()
11+
const stripMarkdown = async (markdown) => {
12+
// let text = markdown;
13+
// remark.then(r => {
14+
// r.remark().use(strip).process(markdown, (err, file) => {
15+
// text = file.contents;
16+
// });
17+
// });
18+
// return text;
19+
const markedup = await (await remark).remark()
1420
.use(strip)
15-
.process(markdown, (err, file) => {
16-
text = file.contents;
17-
});
18-
return text;
21+
.process(markdown);
22+
return markedup.contents;
1923
};
2024

2125
const paginatedCollection = (name, tag) => {
@@ -28,7 +32,7 @@ const paginatedCollection = (name, tag) => {
2832
{
2933
allMarkdownRemark(filter: {fields: {sourceInstanceName: {eq: "blog"}
3034
}, frontmatter: {disable:{ne: true},tags: {eq: "${tag}"}}},
31-
sort: {fields: [frontmatter___date], order: DESC}) {
35+
sort: {frontmatter: {date: DESC}}) {
3236
nodes {
3337
id
3438
fields {
@@ -230,8 +234,9 @@ module.exports = {
230234
wrapperStyle: 'margin-bottom: 1.0725rem',
231235
},
232236
},
233-
'gatsby-remark-copy-linked-files',
234237
'gatsby-plugin-catch-links',
238+
'gatsby-remark-copy-linked-files',
239+
235240
],
236241
},
237242
},
@@ -274,7 +279,47 @@ module.exports = {
274279
// },
275280
// },
276281
// },
277-
'gatsby-plugin-feed',
282+
{
283+
resolve: 'gatsby-plugin-feed',
284+
options:{
285+
feeds: [
286+
{
287+
serialize: ({ query: { site, allMarkdownRemark } }) => {
288+
return allMarkdownRemark.nodes.map(node => {
289+
return Object.assign({}, node.frontmatter, {
290+
description: node.excerpt,
291+
date: node.frontmatter.date,
292+
url: site.siteMetadata.siteUrl + node.fields.slug,
293+
guid: site.siteMetadata.siteUrl + node.fields.slug,
294+
custom_elements: [{ "content:encoded": node.html }],
295+
})
296+
})
297+
},
298+
query: `
299+
{
300+
allMarkdownRemark(
301+
sort: {frontmatter: {date: DESC}}
302+
) {
303+
nodes {
304+
excerpt
305+
html
306+
fields {
307+
slug
308+
}
309+
frontmatter {
310+
title
311+
date
312+
}
313+
}
314+
}
315+
}
316+
`,
317+
output: "/rss.xml",
318+
title: "Your Site's RSS Feed",
319+
},
320+
],
321+
}
322+
},
278323
{
279324
resolve: 'gatsby-plugin-manifest',
280325
options: {
@@ -304,7 +349,7 @@ module.exports = {
304349
{
305350
allMarkdownRemark(filter: {fields: {sourceInstanceName: {eq: "blog"}
306351
}, frontmatter: {disable:{ne: true},featuredBlog: {ne: true}}},
307-
sort: {fields: [frontmatter___date], order: DESC}) {
352+
sort: {frontmatter: {date: DESC}}) {
308353
nodes {
309354
id
310355
fields {
@@ -376,7 +421,7 @@ module.exports = {
376421
"cray",
377422
"swarm-learning",
378423
"hpe-nonstop"
379-
]}}}, sort: {fields: [frontmatter___date], order: DESC}) {
424+
]}}}, sort: {frontmatter: {date: DESC}}) {
380425
nodes {
381426
id
382427
fields {
@@ -455,7 +500,7 @@ module.exports = {
455500
"ilorest",
456501
"iLOrest",
457502
"ilo-restful-api"
458-
]}}}, sort: {fields: [frontmatter___date], order: DESC}) {
503+
]}}}, sort: {frontmatter: {date: DESC}}) {
459504
nodes {
460505
id
461506
fields {

gatsby-node.js

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ exports.createPages = async ({ graphql, actions }) => {
6464
badgeImg,
6565
},
6666
});
67-
console.log(
68-
`Create pages /hackshack/workshops/${id - 1}/special-badge from ${id}`,
69-
);
70-
console.log('------------------------------');
67+
// console.log(
68+
// `Create pages /hackshack/workshops/${id - 1}/special-badge from ${id}`,
69+
// );
70+
// console.log('------------------------------');
7171
});
7272
} catch (error) {
7373
console.log('error: ', error);
@@ -93,8 +93,8 @@ exports.createPages = async ({ graphql, actions }) => {
9393
},
9494
});
9595

96-
console.log(`Create pages /hackshack/replays/${id} from ${id}`);
97-
console.log('------------------------------');
96+
// console.log(`Create pages /hackshack/replays/${id} from ${id}`);
97+
// console.log('------------------------------');
9898

9999
createPage({
100100
path: `/hackshack/workshop/${id}`,
@@ -107,8 +107,8 @@ exports.createPages = async ({ graphql, actions }) => {
107107
},
108108
});
109109

110-
console.log(`Create pages /hackshack/workshop/${id} from ${id}`);
111-
console.log('------------------------------');
110+
// console.log(`Create pages /hackshack/workshop/${id} from ${id}`);
111+
// console.log('------------------------------');
112112

113113
createPage({
114114
path: `/hackshack/workshop/${id}/finisher-badge`,
@@ -121,10 +121,10 @@ exports.createPages = async ({ graphql, actions }) => {
121121
},
122122
});
123123

124-
console.log(
125-
`Create pages /hackshack/workshop/${id}/finisher-badge from ${id}`,
126-
);
127-
console.log('------------------------------');
124+
// console.log(
125+
// `Create pages /hackshack/workshop/${id}/finisher-badge from ${id}`,
126+
// );
127+
// console.log('------------------------------');
128128
});
129129
} catch (error) {
130130
console.log('error: ', error);
@@ -252,7 +252,7 @@ exports.createPages = async ({ graphql, actions }) => {
252252
{
253253
allMarkdownRemark(
254254
filter: { frontmatter: { disable: { ne: true } } }
255-
sort: { fields: [frontmatter___date], order: DESC }
255+
sort: {frontmatter: {date: DESC}}
256256
limit: 1000
257257
) {
258258
edges {
@@ -272,7 +272,7 @@ exports.createPages = async ({ graphql, actions }) => {
272272
}
273273
tagsGroup: allMarkdownRemark(limit: 2000,
274274
filter:{frontmatter:{disable:{ne:true}}}) {
275-
group(field: frontmatter___tags) {
275+
group(field: {frontmatter: {tags: SELECT}}) {
276276
fieldValue
277277
}
278278
}
@@ -294,10 +294,10 @@ exports.createPages = async ({ graphql, actions }) => {
294294
index === posts.length - 1 ? null : posts[index + 1].node;
295295
const next = index === 0 ? null : posts[index - 1].node;
296296
const { sourceInstanceName, slug } = post.node.fields;
297-
console.log(
298-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
299-
);
300-
console.log('------------------------------');
297+
// console.log(
298+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
299+
// );
300+
// console.log('------------------------------');
301301
createPage({
302302
path: `/${sourceInstanceName}${slug}`,
303303
component: blogPost,
@@ -310,10 +310,10 @@ exports.createPages = async ({ graphql, actions }) => {
310310
});
311311
} else if (post.node.fields.sourceInstanceName === 'platform') {
312312
const { sourceInstanceName, slug } = post.node.fields;
313-
console.log(
314-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
315-
);
316-
console.log('------------------------------');
313+
// console.log(
314+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
315+
// );
316+
// console.log('------------------------------');
317317
createPage({
318318
path: `/${sourceInstanceName}${slug}`,
319319
component: platform,
@@ -324,10 +324,10 @@ exports.createPages = async ({ graphql, actions }) => {
324324
});
325325
} else if (post.node.fields.sourceInstanceName === 'greenlake') {
326326
const { sourceInstanceName, slug } = post.node.fields;
327-
console.log(
328-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
329-
);
330-
console.log('------------------------------');
327+
// console.log(
328+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
329+
// );
330+
// console.log('------------------------------');
331331
createPage({
332332
path: `/${sourceInstanceName}${slug}`,
333333
component: platform,
@@ -338,10 +338,10 @@ exports.createPages = async ({ graphql, actions }) => {
338338
});
339339
} else if (post.node.fields.sourceInstanceName === 'event') {
340340
const { sourceInstanceName, slug } = post.node.fields;
341-
console.log(
342-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
343-
);
344-
console.log('------------------------------');
341+
// console.log(
342+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
343+
// );
344+
// console.log('------------------------------');
345345
createPage({
346346
path: `/${sourceInstanceName}${slug}`,
347347
component: event,
@@ -352,10 +352,10 @@ exports.createPages = async ({ graphql, actions }) => {
352352
});
353353
} else if (post.node.fields.sourceInstanceName === 'newsletter') {
354354
const { sourceInstanceName, slug } = post.node.fields;
355-
console.log(
356-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
357-
);
358-
console.log('------------------------------');
355+
// console.log(
356+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
357+
// );
358+
// console.log('------------------------------');
359359
createPage({
360360
path: `/${sourceInstanceName}${slug}`,
361361
component: newsletter,
@@ -366,10 +366,10 @@ exports.createPages = async ({ graphql, actions }) => {
366366
});
367367
} else if (post.node.fields.sourceInstanceName === 'campaign') {
368368
const { sourceInstanceName, slug } = post.node.fields;
369-
console.log(
370-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
371-
);
372-
console.log('------------------------------');
369+
// console.log(
370+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
371+
// );
372+
// console.log('------------------------------');
373373
createPage({
374374
path: `/${sourceInstanceName}${slug}`,
375375
component: campaignTemplate,
@@ -380,10 +380,10 @@ exports.createPages = async ({ graphql, actions }) => {
380380
});
381381
} else if (post.node.fields.sourceInstanceName === 'role') {
382382
const { sourceInstanceName, slug } = post.node.fields;
383-
console.log(
384-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
385-
);
386-
console.log('------------------------------');
383+
// console.log(
384+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
385+
// );
386+
// console.log('------------------------------');
387387
createPage({
388388
path: `/${sourceInstanceName}${slug}`,
389389
component: roleTemplate,
@@ -394,10 +394,10 @@ exports.createPages = async ({ graphql, actions }) => {
394394
});
395395
} else if (post.node.fields.sourceInstanceName === 'use-cases') {
396396
const { sourceInstanceName, slug } = post.node.fields;
397-
console.log(
398-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
399-
);
400-
console.log('------------------------------');
397+
// console.log(
398+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
399+
// );
400+
// console.log('------------------------------');
401401
createPage({
402402
path: `/${sourceInstanceName}${slug}`,
403403
component: useCasesTemplate,
@@ -411,8 +411,8 @@ exports.createPages = async ({ graphql, actions }) => {
411411
});
412412
const tags = result.data.tagsGroup.group;
413413
tags.forEach((tag) => {
414-
console.log(`Create pages /blog/tag/${tag.fieldValue.toLowerCase()}/`);
415-
console.log('------------------------------');
414+
// console.log(`Create pages /blog/tag/${tag.fieldValue.toLowerCase()}/`);
415+
// console.log('------------------------------');
416416
createPage({
417417
path: `/blog/tag/${tag.fieldValue.toLowerCase()}/`,
418418
component: tagTemplate,
@@ -429,7 +429,7 @@ exports.createPages = async ({ graphql, actions }) => {
429429
exports.onCreatePage = ({ page, actions }) => {
430430
const { deletePage, createPage } = actions;
431431

432-
console.log(`onCreatePage ${page.componentPath}`);
432+
// console.log(`onCreatePage ${page.componentPath}`);
433433
return new Promise((resolve) => {
434434
// if the page component is the index page component
435435
if (page.componentPath.indexOf('/src/pages/Home/index.js') >= 0) {
@@ -450,7 +450,7 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
450450

451451
if (node.internal.type === 'MarkdownRemark') {
452452
const { sourceInstanceName, absolutePath } = getNode(node.parent);
453-
console.log(`==== onCreateNode ${sourceInstanceName} ---- ${absolutePath}`);
453+
// console.log(`==== onCreateNode ${sourceInstanceName} ---- ${absolutePath}`);
454454
const value = createFilePath({ node, getNode });
455455
const date = new Date(node.frontmatter.date);
456456
const year = date.getFullYear();

0 commit comments

Comments
 (0)