Skip to content

Commit 2b447a1

Browse files
Merge pull request #2448 from hpe-dev-incubator/testing
upgrade Gatsby to V5
2 parents d843280 + bac3b9f commit 2b447a1

File tree

41 files changed

+9205
-14267
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+9205
-14267
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
},
@@ -286,7 +291,47 @@ module.exports = {
286291
// },
287292
// },
288293
// },
289-
'gatsby-plugin-feed',
294+
{
295+
resolve: 'gatsby-plugin-feed',
296+
options:{
297+
feeds: [
298+
{
299+
serialize: ({ query: { site, allMarkdownRemark } }) => {
300+
return allMarkdownRemark.nodes.map(node => {
301+
return Object.assign({}, node.frontmatter, {
302+
description: node.excerpt,
303+
date: node.frontmatter.date,
304+
url: site.siteMetadata.siteUrl + node.fields.slug,
305+
guid: site.siteMetadata.siteUrl + node.fields.slug,
306+
custom_elements: [{ "content:encoded": node.html }],
307+
})
308+
})
309+
},
310+
query: `
311+
{
312+
allMarkdownRemark(
313+
sort: {frontmatter: {date: DESC}}
314+
) {
315+
nodes {
316+
excerpt
317+
html
318+
fields {
319+
slug
320+
}
321+
frontmatter {
322+
title
323+
date
324+
}
325+
}
326+
}
327+
}
328+
`,
329+
output: "/rss.xml",
330+
title: "Your Site's RSS Feed",
331+
},
332+
],
333+
}
334+
},
290335
{
291336
resolve: 'gatsby-plugin-manifest',
292337
options: {
@@ -316,7 +361,7 @@ module.exports = {
316361
{
317362
allMarkdownRemark(filter: {fields: {sourceInstanceName: {eq: "blog"}
318363
}, frontmatter: {disable:{ne: true},featuredBlog: {ne: true}}},
319-
sort: {fields: [frontmatter___date], order: DESC}) {
364+
sort: {frontmatter: {date: DESC}}) {
320365
nodes {
321366
id
322367
fields {
@@ -388,7 +433,7 @@ module.exports = {
388433
"cray",
389434
"swarm-learning",
390435
"hpe-nonstop"
391-
]}}}, sort: {fields: [frontmatter___date], order: DESC}) {
436+
]}}}, sort: {frontmatter: {date: DESC}}) {
392437
nodes {
393438
id
394439
fields {
@@ -467,7 +512,7 @@ module.exports = {
467512
"ilorest",
468513
"iLOrest",
469514
"ilo-restful-api"
470-
]}}}, sort: {fields: [frontmatter___date], order: DESC}) {
515+
]}}}, sort: {frontmatter: {date: DESC}}) {
471516
nodes {
472517
id
473518
fields {

0 commit comments

Comments
 (0)