{
    "componentChunkName": "component---src-components-blog-post-jsx",
    "path": "/blog/greys-anatomy-lorem-ipsum-generator/",
    "result": {"data":{"site":{"siteMetadata":{"author":"Monica Powell","siteUrl":"https://www.aboutmonica.com"}},"mdx":{"id":"8e0c1df6-cce2-5ffa-9bfc-31490ec3c746","timeToRead":8,"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"title\": \"Grey's Anatomy Lorem Ipsum Generator Tutorial\",\n  \"date\": \"2019-06-02T11:43:13.595Z\",\n  \"template\": \"post\",\n  \"category\": [\"tutorial\"],\n  \"draft\": false,\n  \"slug\": \"greys-anatomy-lorem-ipsum-generator\",\n  \"tags\": [\"Tutorial\", \"JavaScript\", \"React\", \"Netlify\", \"Linguistics\"],\n  \"description\": \"This tutorial is going to walk through how to create a Grey’s Anatomy or other-themed Lorem Ipsum generator with React and Netlify Functions\",\n  \"header\": \"/media/lorem-ipsum-generator-screenshot.png\",\n  \"redirects\": [\"/blog/2019/06/02/greys-anatomy-lorem-ipsum-generator\"]\n};\n\nvar makeShortcode = function makeShortcode(name) {\n  return function MDXDefaultShortcode(props) {\n    console.warn(\"Component \" + name + \" was not imported, exported, or provided by MDXProvider as global scope\");\n    return mdx(\"div\", props);\n  };\n};\n\nvar TableOfContents = makeShortcode(\"TableOfContents\");\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/lorem-ipsum-generator-screenshot.png\",\n    \"alt\": \"screenshot of grey's anatomy lorem ipsum generator\"\n  })), mdx(\"p\", null, \"This tutorial is going to walk through how to create a Grey\\u2019s Anatomy or other-themed Lorem Ipsum generator. I\\u2019m a huge fan of the show, Grey\\u2019s Anatomy (and Shonda Rhimes in general) for a while so I was overdue for creating a Grey\\u2019s Anatomy-themed Lorem Ipsum generator. Lorem Ipsum is generated, nonsense text that is used in design and publishing as placeholder text. Traditionally, Lorem Ipsum is written with Latin words but there are variations that involve non-Latin words as well.\"), mdx(\"p\", null, mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/shonda-rhimes-enthusiast.png\",\n    \"alt\": \"This tweet thread about being a Shonda Rhimes enthusiast https://twitter.com/waterproofheart/status/408430997517393920\"\n  })), mdx(\"p\", null, \"The live version of the Grey's Anatomy Lorem Ipsum Generator website can be viewed \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://greysanatomyloremipsum.netlify.com/\"\n  }, \"here\"), \" and the code for this tutorial can be viewed\\n\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/M0nica/greys-anatomy-lorem-ipsum-generator/tree/loremIpsumTutorial\"\n  }, \"on Github\"), \".\"), mdx(\"p\", null, \"Here\\u2019s an example of the type of text that is generated by the Grey's Anatomy Lorem Ipsum generator:\"), mdx(\"p\", null, \"\\u201Creal hospital Dr. Cristina Yang well a trauma surgical fellow badly chief of pediatric surgery George Ellis orthopedic surgeon Dr. Shane Ross approximately Dr. Callie Torres exactly Dr. Izzie Stevens Izzie chief of plastic surgery an anesthesiologist Meredith\\u2019s father Zola Seattle Erica certainly Meredith Dr. Shane Ross basically basically Tucker maybe Dr. Virginia Dixon whoever Chief Richard Sadie significantly nicely Arizona real very Dr. Colin Marlowe Zola mostly things Dr. Teddy Altman rather Arizona Dr. Teddy Altman Seattle Dr. Izzie Stevens my person\\u201D\"), mdx(\"p\", null, \"The above paragraph makes absolutely no sense but if you\\u2019re familiar with Grey\\u2019s Anatomy there are some familiar terms baked in there.\"), mdx(TableOfContents, {\n    headings: props.tableOfContents,\n    mdxType: \"TableOfContents\"\n  }), mdx(\"h2\", {\n    \"id\": \"requirements\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#requirements\",\n    \"aria-label\": \"requirements permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Requirements\"), mdx(\"p\", null, \"To get the most out of this tutorial you should:\"), mdx(\"ul\", null, mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Have familiarity with git and JavaScript\"), mdx(\"li\", {\n    parentName: \"ul\"\n  }, \"Have a GitHub or GitLab account (in order to use Netlify functions).\")), mdx(\"h2\", {\n    \"id\": \"set-up\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#set-up\",\n    \"aria-label\": \"set up permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Set Up\"), mdx(\"p\", null, \"In order to jump-start this project, I used Netlify\\u2019s \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/netlify/create-react-app-lambda\"\n  }, \"GitHub - netlify/create-react-app-lambda\"), \" starter. Netlify is a hosting service that specializes in hosting JAMstack websites, as of writing this tutorial, has a pretty comprehensive free tier(\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.netlify.com/pricing/\"\n  }, \"Plans and Pricing | Netlify\"), \") that integrates well with deploying GitHub projects to the world wide web. JAMstack is used to describe static websites that are compromised of JavaScript, APIs, and Markup. You can learn more about what is or isn\\u2019t considered JAMstack here \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://jamstack.org\"\n  }, \"JAMstack | JavaScript, APIs, and Markup\"), \" ,\"), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"create-react-app-lambda\"), \" repository integrates Netlify\\u2019s functions with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"create-react-app\"), \" which means out of the box you can deploy a React application that calls, Serverless functions, which you may know as Amazon Web Services (AWS) Lambdas. These functions can make asynchronous calls and process data but they must be stateless, meaning that given the same inputs the output will be the same. With Netlify you can deploy and manage AWS Lambda\\u2019s technology without an AWS account. You can read more about Serverless Lambda Functions on Netlify here: \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.netlify.com/docs/functions/\"\n  }, \"Functions | Netlify\"), \".\"), mdx(\"p\", null, \"Let\\u2019s get started by copying over \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"create-react-app-lambda\"), \" . Click on the \\u201CDeploy to Netlify\\u201D button in the README.\\n\", mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/deploy-to-netlify.png\",\n    \"alt\": null\n  })), mdx(\"p\", null, \"This one-click button allows us to set up React + Netlify Functions without having to do heavy lifting. Essentially when you click the button you are creating a new site in Netlify and a connected GitHub repository. It takes a few minutes for the GitHub repository to populate with the files but once it is done populating you should be able to visit Netlify and view your site. If you\\u2019d like a better understanding of why things were set up the way they were in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"create-react-lambda-app\"), \" then check out \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.youtube.com/watch?v=3ldSM98nCHI\"\n  }, \"this video\"), \" by Shawn Wang (swyx) for more context.\"), mdx(\"p\", null, \"After clicking the \\\"Deploy to Netlify\\\" button you should see something like this:\\n\", mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/welcome-to-netlify.png\",\n    \"alt\": null\n  })), mdx(\"p\", null, \"Note: Comprehensive instructions for interacting with the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"create-react-lambda-app\"), \" project live in the README. I will highlight the most important pieces to interact with the app but encourage exploring the README for more information and to further enhance the application.\"), mdx(\"p\", null, \"So once the repository that you created in Netlify is populated with files from \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"create-react-app-lambda\"), \" you should \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git clone\"), \" the repo. The repository that you are cloning should be named after the repo that you created, i.e., \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"git clone git@github.com:your_username/app-just-created\"), \". You may have to refresh the repository page before the files are populated.\\n\", mdx(\"img\", {\n    parentName: \"p\",\n    \"src\": \"/media/git-clone-screenshot.png\",\n    \"alt\": null\n  })), mdx(\"p\", null, \"Once the project is set up you should \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"cd\"), \" into the project directory and run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn\"), \" to install all of the dependencies. You can run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn test\"), \" to ensure that all of the tests are passing and the project was set up properly.\"), mdx(\"p\", null, \"The Netlify functions should be created in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"src/lambda\"), \". If you look in that folder there are two sample functions \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"async-dadjoke.js\"), \" and \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hello.js\"), \". For our use case we don\\u2019t need an \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"async\"), \" function so let\\u2019s look at the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hello.js example\")), mdx(\"p\", null, \"In \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hello.js\"), \" we are getting the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"queryStringParameters\"), \" from the event in order to log them. \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"queryStringParameters\"), \" can be accessed from the event like \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"event.queryStringParameters\"), \" or by destructuring the event object like \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"const {queryStringParameters} = event\"), \".\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"export function handler(event, context, callback) {\\n\\n  console.log(\\u201CqueryStringParameters\\u201D, event.queryStringParameters)\\n\\n  callback(null, {\\n\\n    statusCode: 200,\\n\\n    body: JSON.stringify({ msg: \\u201CHello, World!\\u201D })\\n\\n  })\\n\\n}\\n\")), mdx(\"p\", null, \"Every Lambda function has a handler function. This handler function can take event, context, and callback. The event is based on what the endpoint received when the request was made it can include things like cookie information, headers, queryStringParameters, etc. The context object provides additional insight regarding a Lambda\\u2019s execution. You can learn more in the AWS docs here:\\n\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html\"\n  }, \"AWS Lambda Function Handler in Node.js - AWS Lambda\")), mdx(\"h2\", {\n    \"id\": \"verify-set-up\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#verify-set-up\",\n    \"aria-label\": \"verify set up permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Verify Set Up\"), mdx(\"p\", null, \"In order to tests the functionality of the endpoint we should run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn start:lambda\"), \", in the directory we just clone, which will run all of your Lambda functions. And then you can visit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"http://localhost:9000/hello\"), \" or \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/\"), \" whatever the name of your function is. On this page, you should see: \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{\\u201Cmsg\\u201D:\\u201DHello, World!\\u201D}\"), \" since that is the body of the endpoint\\u2019s response.\"), mdx(\"h2\", {\n    \"id\": \"calling-the-netlify-function-from-react\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#calling-the-netlify-function-from-react\",\n    \"aria-label\": \"calling the netlify function from react permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Calling the Netlify function from React\"), mdx(\"p\", null, \"Next, I would recommend customizing the naming conventions in the project to better fit your needs. I renamed \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hello\"), \" to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generate-lorem-ipsum\"), \", so first I rename the\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hello.js\"), \" file to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generate-lorem-ipsum\"), \" and then in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"LambdaDemo\"), \" component in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"app.js\"), \" , I replaced the call to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"hello\"), \" on button click to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generate-lorem-ipsum\"), \" . While I was there I also deleted the button related to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"async-dadjoke\"), \" and removed the associated file. So I went from\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-jsx\"\n  }, \"<button onClick={this.handleClick(\\\"hello\\\")}>{loading ? \\\"Loading...\\\" : \\\"Call Lambda\\\"}\\n</button>\\n\\n<button onClick={this.handleClick(\\\"async-dadjoke\\\")}>{loading ? \\\"Loading...\\\" : \\\"Call Async Lambda\\\"}\\n</button>\\n\")), mdx(\"p\", null, \"to:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-jsx\"\n  }, \"<button onClick={this.handleClick(\\\"generate-lorem-ipsum\\\")} className=\\u201Cbutton\\u201D>\\n            {loading ? \\u201CLoading\\u2026\\u201D : \\u201CGenerate Lorem Ipsum\\u201D}\\n</button>\\n\")), mdx(\"p\", null, \"The button is calling the Netlify function on click, you can look at the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"handleClick for more information\"), \" about what happens when you click on the button, initially It returns loading as the state and then eventually the response.msg.\"), mdx(\"p\", null, \"Note: I updated references to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"LambdaDemo()\"), \" to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"LambdaCall()\"), \"in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"App.js\"), \" because it\\u2019s show time!\"), mdx(\"p\", null, \"In order to check the lambda is still being called and returning a response you should run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn start\"), \" (while \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn start:lambda\"), \" is running in another terminal window). You should be able to visit http://localhost:3000 and see the React app with a \\u201CGenerate Lorem Ipsum\\u201D button. If you click then the words \\u201Chello world\\u201D should appear on the site below the button.\"), mdx(\"h2\", {\n    \"id\": \"adding-lorem-ipsum-logic\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#adding-lorem-ipsum-logic\",\n    \"aria-label\": \"adding lorem ipsum logic permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Adding Lorem Ipsum Logic\"), mdx(\"p\", null, \"So now we need to edit the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generate-lorem-ipsum.js\"), \" file so that it returns Lorem Ipsum and not \\u201CHello World\\u201D. We will achieve this by creating a word bank of terms in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"words.js\"), \" and the following functions in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generate-lorem-ipsum.js\"), \" file:\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"handler()\"), \"\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateLoremIpsum()\"), \"\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateWords()\"), \"\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateParagraphs()\"), \"\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"getRandomInt()\")), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"handler()\"), \" is the entry point into the file, therefore any functions that need to execute should either be called in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"handler()\"), \" or called by the functions that the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"handler()\"), \" calls. First, we destructure the event to get the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"queryStringParameters\"), \".\"), mdx(\"p\", null, \"For example, if someone calls our endpoint with the following query string parameter\\n\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"/generate-lorem-ipsum?paragraphs=4&words=0\")), mdx(\"p\", null, \"Then we would de-structure the event object to determine that the endpoint was requested to return 4 paragraphs and 0 words.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"const event = {\\nqueryStringParameters: {\\nparagraphs: \\u201C4\\u201D,\\nwords: \\u201C0\\u201D\\n}\\n};\\n\")), mdx(\"p\", null, \"The handler will call a function \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateLoremIpsum\"), \" to actually handle generating the text, it takes in whether or not multiple paragraphs or just words should be returned. By default if there are no \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"queryStringParameters\"), \" it will return 4 generated paragraphs.\"), mdx(\"p\", null, \"The \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"handler()\"), \" could end up looking something like this:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"export function handler(event, context, callback) {\\n  const { queryStringParameters } = event\\n  const { paragraphs = 0, words = 0 } = queryStringParameters\\n\\n  let isParagraph = Boolean(paragraphs)\\n  let count\\n\\n  if (paragraphs > 1) {\\n    count = paragraphs\\n  } else if (words > 0) {\\n    count = words\\n  } else {\\n    isParagraph = true\\n    count = 4\\n  }\\n\\n  let response\\n  try {\\n    response = isParagraph\\n      ? generateLoremIpsum(isParagraph, count).join(\\\" \\\")\\n      : generateLoremIpsum(isParagraph, count)\\n  } catch (error) {\\n    console.log(error)\\n  }\\n\\n  callback(null, {\\n    statusCode: 200,\\n    body: JSON.stringify({ msg: response }),\\n  })\\n}\\n\")), mdx(\"p\", null, \"In this example \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateLoremIpsum()\"), \" is a function called by the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"handler()\"), \" and used as a fork in the road to determine if multiple paragraphs should be generated or just one based on if \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"isParagraph\"), \" is true or false.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"export function generateLoremIpsum(isParagraph, count) {\\n  if (isParagraph) {\\n    console.log(`Trying to construct ${count} paragraphs`)\\n    return generateParagraphs(count)\\n  } else {\\n    console.log(`Trying to return ${count} words`)\\n    return generateWords(count)\\n  }\\n}\\n\")), mdx(\"p\", null, \"If we are generating a single paragraph the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateWords()\"), \" will be called directly. This function creates an array of random words (based on getting a randomInt and adding the word at that index to the array until we reach the desired \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"wordCount\"), \". In order to format the words once we have all of the words the words are formatted like \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"const formattedWords = <p>${words.join(\\\" \\\")}</p>\"), \";` in order to easily be able to transform the function\\u2019s response into an HTML paragraph later.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"export function generateWords(wordCount) {\\n  let words = []\\n  console.log(wordCount)\\n\\n  for (var i = 0; i < wordCount; i++) {\\n    words.push(WORDS[getRandomInt()])\\n  }\\n  const formattedWords = `<p>${words.join(\\\" \\\")}</p>`\\n\\n  return formattedWords\\n}\\n\")), mdx(\"p\", null, \"The random int in the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateWords()\"), \" function is calculated with the following function:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"export function getRandomInt() {\\n  return Math.floor(Math.random() * Math.floor(WORDS.length))\\n}\\n\")), mdx(\"p\", null, \"In the case where we are generating paragraphs we need the function \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateParagraphs()\"), \". This function will generate X paragraphs with 50 words until it reaches the paragraphCount. It does this by calling the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generateWords()\"), \" function X times where X equals the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"paragraphCount\"), \" that was passed in.\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"export function generateParagraphs(paragraphCount) {\\n  let paragraphs = []\\n  for (var I = 0; I < paragraphCount; I++) {\\n    paragraphs.push(generateWords(50))\\n  }\\n  return paragraphs\\n}\\n\")), mdx(\"p\", null, \"In order for any of the above to work we need a word bank to draw from. At the top of \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"generate-lorem-ipsum.js\"), \" we should \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"import { WORDS } from \\\"./words\\\";\"), \" and then in the same directory create a file called \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"words.js\"), \". In \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"words.js\"), \" we are going to create an array called \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"WORDS\"), \" and export it so that other functions can read it.\"), mdx(\"p\", null, \"I created an array with just filler words( \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"fillerWords\"), \") and another with Grey\\u2019s Anatomy and medical terms (\", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"greysAnatomyWords\"), \").\\nUsed ES6 spread operator to combine the arrays into one. \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"export const WORDS = [\\u2026greysAntomyWords, \\u2026fillerWords];\")), mdx(\"p\", null, \"The full file should look something like:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\",\n    \"className\": \"language-javascript\"\n  }, \"const greysAnatomyWords = [\\\"Meredith Grey\\\", \\\"Shonda Rhimes\\\", \\\"Epi\\\", \\\"Cardio\\\"]\\n\\nconst fillerWords = [\\n  \\\"actual\\\",\\n  \\\"actually\\\",\\n  \\\"amazing\\\",\\n]`export const WORDS = [\\u2026greysAntomyWords, \\u2026fillerWords];`\\n\")), mdx(\"h2\", {\n    \"id\": \"methodology\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#methodology\",\n    \"aria-label\": \"methodology permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Methodology\"), mdx(\"p\", null, \"In a full blown project we would need a lot of words or else it will be too repetitive. If you want to create another type of themed Lorem Ipsum then you would replace the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"greysAnatomyWords\"), \" with words from a theme of your choice.\"), mdx(\"p\", null, \"For the grey\\u2019s anatomy words I brainstormed and also found some lists like this \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.sheknows.com/parenting/articles/1008783/greys-anatomy-baby-names/\"\n  }, \"Grey\\u2019s Anatomy Baby Names article\"), \" that I was able to re-purpose. The process of cleaning up the data and formatting into valid JSON can be a bit tedious, I did find and replace for formatting where I could and some manually updating as needed. This allowed me to get as much data as possible with minimal effort (I.e., automating the scraping of terms). I ended up with about 140 terms for my generator but if I needed a larger data set then it may have made sense to consider exploring a tool like BeautifulSoup or Selenium to automate scraping a data source and saving that data into a valid JS file.\"), mdx(\"p\", null, \"Note: Depending on how repetitive data is can create Map or filter to make sure that the array of words only has unique values.\"), mdx(\"p\", null, \"I decided to add in filler words so that the generated Lorem Ipsum text would have a healthy mix of verbs and adverbs in addition to the themed. I Google\\u2019d filler text and found the following repository, I copied the filler words from there: fillers_data.txt at master \\xB7 words_fillers \\xB7 GitHub\", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/words/fillers/blob/master/data.txt\"\n  })), mdx(\"p\", null, \"Now if you run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn start:lambda\"), \" and visit \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"http://localhost:9000/generate-lorem-ipsum/\"), \"you should see 4 generated paragraphs of lorem ipsum returned. It should look something like:\"), mdx(\"pre\", null, mdx(\"code\", {\n    parentName: \"pre\"\n  }, \"\\u201Cmsg\\u201D:\\u201D<p>especially surgicial mostly try hospital anyway Seattle Dr. Lucy Fields Alex a trauma surgical fellow Dr. Mark Sloan my person heavily wherever Theodora Duquette Dr. Virginia Dixon cried a nurse a neurosurgeon really Margaret Dr. Mark Sloan Dr. April Kepner Meredith\\xE2\\u20AC\\u2122s father literally Dr. Alex Karev Dr. Izzie Stevens an anesthesiologist Denny much necessarily Surgery a trauma surgical fellow surely hardly Owen rather Shepherd totally cried chief of pediatric surgery Theodora Dr. Robert Stark Olivia an anesthesiologist get her up to CT actually Cristina Dr. Finn Dandridge</p> <p>Tucker Virginia Callie Torres mostly hardly Maggie Maggie get her up to CT hardly get him up to CT quite stuff Dr. Mark Sloan whenever Dr. Richard Webber try George amazing Dr. Sydney Heron Dr. Jackson Avery actual quite nicely Richard stuff might Dr. Owen Hunt get her up to CT orthopedics Yang obviously mostly intubate her wherever orthopedic surgeon typically Margaret Karev effectively Alex Dr. Mark Sloan Seattle Dr. Alex Karev push one of epi try practically Dr. Alex Karev intubate him so</p> <p>start significantly start fairly get him up to CT slightly Dr. Alex Karev chief of plastic surgery slightly Dr. Robert Stark Meredith\\xE2\\u20AC\\u2122s mother Norman actually completely Izzie Dr. Mark Sloan particularly Alex basically Adele clearly like usually Seattle Dr. Alex Karev typically chief of plastic surgery get him up to CT essentially ultimately my person exactly Norman specifically Virginia effectively O\\u2019Malley intubate her Virginia Tucker my person a surgery resident largely most a veterinarian basically she\\u2019s in V-Fib try simply Seattle</p> <p>heavily Dr. Callie Torres essentially Dr. Jackson Avery whoever a nurse Dr. Mark Sloan definitely my person Olivia Harper Dr. Alex Karev essentially approximately generally my person exactly Dr. Miranda Bailey Dr. Preston Burke right a plastic surgeon Norman Theodora basically a cardiac surgeon chief of plastic surgery chief of plastic surgery essentially Dr. Jackson Avery Tyler Christian much seriously Meredith\\xE2\\u20AC\\u2122s mother slightly easily Mark my person maybe Mercy West Alex Erica Derek certainly badly rather hospital Denny Dr. Norman Shales Dr. Lexie Grey significantly Dr. Jackson Avery</p>\\u201D\\n\")), mdx(\"h2\", {\n    \"id\": \"formatting-response\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h2\",\n    \"href\": \"#formatting-response\",\n    \"aria-label\": \"formatting response permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Formatting Response\"), mdx(\"p\", null, \"This blob of text is not formatted yet but we will worry about that in the React app. So let\\u2019s switch back to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"app.js\"), \" . We are already printing the messages if you run \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn start\"), \" and go to \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"localhost:3000\"), \" you will see the same body text we just saw. Let\\u2019s use a library to format the response as actual HTML.\"), mdx(\"p\", null, \"We will use the \\u201Chtml-react-parser\\u201D package. It can be installed by running \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"yarn add html-react-parser\"), \" and then add this \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"import parse from \\u201Chtml-react-parser\\u201D;\"), \" to the top of your \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"app.js\"), \" file in order to import it. Instead of just returning the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"msg\"), \" in \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"LambdaCall\"), \" let\\u2019s replace \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"msg\"), \" with \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"{msg && parse(msg)}\"), \". This says to parse the HTML of the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"msg\"), \" and return it whenever there is a \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"msg\"), \".\"), mdx(\"p\", null, \"This part of the tutorial is choose-your-own-adventure. After setting up the Lorem Ipsum text generation logic. I went on to prettify the site to make it look more customized than the standard \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"create-react-app\"), \" boilerplate. One of the tools I used was this \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"http://buttonoptimizer.com/\"\n  }, \"fancy button generator\"), \". I recommend playing around with the CSS until it matches the aesthetic that you want.\"), mdx(\"h3\", {\n    \"id\": \"deploy\",\n    \"style\": {\n      \"position\": \"relative\"\n    }\n  }, mdx(\"a\", {\n    parentName: \"h3\",\n    \"href\": \"#deploy\",\n    \"aria-label\": \"deploy permalink\",\n    \"className\": \"anchor before\"\n  }, mdx(\"svg\", {\n    parentName: \"a\",\n    \"aria-hidden\": \"true\",\n    \"focusable\": \"false\",\n    \"height\": \"16\",\n    \"version\": \"1.1\",\n    \"viewBox\": \"0 0 16 16\",\n    \"width\": \"16\"\n  }, mdx(\"path\", {\n    parentName: \"svg\",\n    \"fillRule\": \"evenodd\",\n    \"d\": \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n  }))), \"Deploy\"), mdx(\"p\", null, \"Thanks to Netlify\\u2019s continuous deployment, if you clicked the \\u201CDeploy to Netlify\\u201D button on the first step then your website will be deployed to once you merge your changes into the master branch of your project\\u2019s repository. Also, if you open a pull request Netlify will generate a preview. This should mirror what you see when running the site locally.\"), mdx(\"p\", null, \"The final code can be viewed on the \", mdx(\"inlineCode\", {\n    parentName: \"p\"\n  }, \"loremIpsumTutorial\"), \" branch of the \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://github.com/M0nica/greys-anatomy-lorem-ipsum-generator/tree/loremIpsumTutorial\"\n  }, \"greys-anatomy-lorem-ipsum-generator\"), \" repository.\"), mdx(\"p\", null, \"Please share with me on Twitter, \", mdx(\"a\", {\n    parentName: \"p\",\n    \"href\": \"https://www.twitter.com/indigitalcolor\"\n  }, \"@indigitalcolor\"), \" if you end up creating a Lorem Ipsum generator or another app with the Netlify functions after reading through this tutorial.\"));\n}\n;\nMDXContent.isMDXComponent = true;","tableOfContents":{"items":[{"url":"#requirements","title":"Requirements"},{"url":"#set-up","title":"Set Up"},{"url":"#verify-set-up","title":"Verify Set Up"},{"url":"#calling-the-netlify-function-from-react","title":"Calling the Netlify function from React"},{"url":"#adding-lorem-ipsum-logic","title":"Adding Lorem Ipsum Logic"},{"url":"#methodology","title":"Methodology"},{"url":"#formatting-response","title":"Formatting Response","items":[{"url":"#deploy","title":"Deploy"}]}]},"frontmatter":{"title":"Grey's Anatomy Lorem Ipsum Generator Tutorial","date":"June 02, 2019","description":"This tutorial is going to walk through how to create a Grey’s Anatomy or other-themed Lorem Ipsum generator with React and Netlify Functions","tags":["Tutorial","JavaScript","React","Netlify","Linguistics"]}},"allWebMentionEntry":{"edges":[{"node":{"wmTarget":"https://www.aboutmonica.com/blog/greys-anatomy-lorem-ipsum-generator/","wmSource":"https://brid.gy/post/twitter/waterproofheart/1362150496346193923","wmProperty":"mention-of","wmId":1035650,"type":"entry","url":"https://twitter.com/Gerard_K_Hynes/status/1362150496346193923","likeOf":null,"author":{"url":"https://twitter.com/Gerard_K_Hynes","type":"card","photo":"https://webmention.io/avatar/pbs.twimg.com/92a79c4a1b6fa1cc79f8807c234435805672ef77da4370bad47fcd775d36e009.png","name":"Gerard Hynes"},"published":"February 17, 2021","content":{"text":"Ok, didn't finish this one in time for #100DaysOfCode but built a little #Serverless #LegendOfZelda lorem ipsum generator following @indigitalcolor's tutorial.\n\n@Netlify functions are ✨\n\nSite sharp-fermi-5dc2a8.netlify.app\nTutorial aboutmonica.com/blog/greys-ana…"}}}]}},"pageContext":{"permalink":"https://www.aboutmonica.com/blog/greys-anatomy-lorem-ipsum-generator/","slug":"/blog/greys-anatomy-lorem-ipsum-generator/","prev":{"id":"51df8cc1-ce76-56d3-8806-f2df179ab4ae","frontmatter":{"title":"Less JavaScript Makes Font Awesome More Awesome","category":["resources"],"date":"2019-11-09T02:43:13.595Z","slug":"less-javascript-is-more","tags":["React","JavaScript","Font Awesome","Performance"],"redirects":["/blog/2019/11/09/less-javascript-is-more"]},"fields":{"slug":"/blog/less-javascript-is-more/"}},"next":{"id":"11e37adb-b7f4-542c-935b-f0fca3c2df96","frontmatter":{"title":"git is hard, but time travel in git is easy.","category":["git"],"date":"2019-03-24T02:43:13.595Z","slug":"git-time-travel","tags":["Git","GitHub"],"redirects":["/blog/2019/03/24/greys-anatomy-lorem-ipsum-generator"]},"fields":{"slug":"/blog/git-time-travel/"}}}},
    "staticQueryHashes": ["1977783444","764694655"]}