1"use strict";(self.webpackChunkjohnnyreilly_com=self.webpackChunkjohnnyreilly_com||[]).push([["12656"],{28236(e,t,a){a.r(t),a.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>m,frontMatter:()=>o,metadata:()=>i,toc:()=>l});var i=a(41845),r=a(74848),n=a(28453);let o={slug:"azure-open-ai-generate-article-metadata-with-typescript",title:"Azure Open AI: generate article metadata with TypeScript",authors:"johnnyreilly",date:new Date("2023-09-25T00:00:00.000Z"),image:"./title-image.png",tags:["azure","typescript","ai"],description:"Use the TypeScript Azure Open AI SDK to generate article metadata.",hide_table_of_contents:!1,atUri:"at://did:plc:yy3apqjlms24kso7ahn7lbmb/site.standard.document/3mr5bsfwmlv2g"},s,p={image:a(57565).A,authorsImageUrls:[void 0]},l=[];function c(e){let t={a:"a",code:"code",em:"em",img:"img",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.p,{children:"This post grew out of my desire to improve the metadata for my blog posts. I have been blogging for more than ten years, and the majority of my posts lack descriptions. A description is meta tag that sits in a page and describes the contents of the page. This is what this posts description meta tag looks like in HTML:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-html",children:'<meta\n name="description"\n content="Use the TypeScript Azure Open AI SDK to generate article metadata."\n/>\n'})}),"\n",(0,r.jsxs)(t.p,{children:["Descriptions are important for search engine optimisation (SEO) and for accessibility. You can ",(0,r.jsx)(t.a,{href:"https://developers.google.com/search/docs/appearance/snippet",children:"read up more on the topic here"}),". I wanted to have descriptions for ",(0,r.jsx)(t.em,{children:"all"})," my blog posts. But writing around 230 descriptions for my existing posts was not something I wanted to do manually. I wanted to automate it."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"title image reading "Azure Open AI: generate article metadata with TypeScript" with the Azure Open AI / TypeScript logos",src:`https://res.cloudinary.com/priou/image/fetch/f_auto,q_auto,w_auto,dpr_auto/https://johnnyreilly.com${a(60775).A}`,width:"800",height:"450",loading:"eager",fetchpriority:"high"})})]})}function m(e={}){let{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},57565(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/title-image-8073436bce980c6c577b07d612072b84.png"},60775(e,t,a){a.d(t,{A:()=>i});let i=a.p+"assets/images/title-image-8073436bce980c6c577b07d612072b84.png"},28453(e,t,a){a.d(t,{R:()=>o,x:()=>s});var i=a(96540);let r={},n=i.createContext(r);function o(e){let t=i.useContext(n);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(n.Provider,{value:t},e.children)}},41845(e){e.exports=JSON.parse('{"permalink":"/azure-open-ai-generate-article-metadata-with-typescript","editUrl":"https://github.com/johnnyreilly/blog.johnnyreilly.com/edit/main/blog-website/blog/2023-09-25-azure-open-ai-generate-article-metadata-with-typescript/index.md","source":"@site/blog/2023-09-25-azure-open-ai-generate-article-metadata-with-typescript/index.md","title":"Azure Open AI: generate article metadata with TypeScript","description":"Use the TypeScript Azure Open AI SDK to generate article metadata.","date":"2023-09-25T00:00:00.000Z","tags":[{"inline":false,"label":"Azure","permalink":"/tags/azure","description":"The Microsoft cloud platform."},{"inline":false,"label":"TypeScript","permalink":"/tags/typescript","description":"The TypeScript programming language."},{"inline":false,"label":"AI","permalink":"/tags/ai","description":"All things AI - Artificial Intelligence, Large Language Models and the like."}],"readingTime":9.26,"hasTruncateMarker":true,"authors":[{"name":"John Reilly","title":"OSS Engineer - TypeScript, Azure, React, Node.js, .NET","url":"https://johnnyreilly.com/about","imageURL":"https://johnnyreilly.com/img/profile-2025.jpg","key":"johnnyreilly","page":null}],"frontMatter":{"slug":"azure-open-ai-generate-article-metadata-with-typescript","title":"Azure Open AI: generate article metadata with TypeScript","authors":"johnnyreilly","date":"2023-09-25T00:00:00.000Z","image":"./title-image.png","tags":["azure","typescript","ai"],"description":"Use the TypeScript Azure Open AI SDK to generate article metadata.","hide_table_of_contents":false,"atUri":"at://did:plc:yy3apqjlms24kso7ahn7lbmb/site.standard.document/3mr5bsfwmlv2g"},"unlisted":false,"prevItem":{"title":"Docusaurus 3: how to migrate rehype plugins","permalink":"/docusaurus-3-how-to-migrate-rehype-plugins"},"nextItem":{"title":"TypeScript: The Movie","permalink":"/typescript-documentary"}}')}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.