Allow to send in custom serializer for graph data, so that your graph data will work with plugin.
"gatsby-plugin-advanced-sitemap" threw an error while running the onPostBuild lifecycle:
Any other info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
{
"data": {
"allSanityAuthor": {
"edges": [
{
"node": {
"id": "cdc8ffaa-d817-5f39-aa78-18c01339243b",
"slug": {
"current": "alex-patterson"
},
"_updatedAt": "2019-09-30T14:05:08Z",
"image": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/5eadf06f02778c3b1dec1ed67c504241fd4d1f9a-432x432.png"
}
}
}
}
]
},
"allSanityBlogPost": {
"edges": [
{
"node": {
"id": "e7757105-5d16-5ef1-87fc-bbb2dd5a7e38",
"title": "Cloud Function GitHub Update",
"publishedAt": "2018-12-26T01:25:37.000-05:00",
"slug": {
"current": "cloud-function-github-update"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/eeef21dd96e8a299ccb2dfbcad5156781d0d7d0d-1280x720.png"
}
}
}
},
{
"node": {
"id": "cf0dbba3-9b32-5eda-9f4c-bf751148eb7d",
"title": "Slack Workspace Theme Customization",
"publishedAt": "2019-08-14T21:33:41.000-04:00",
"slug": {
"current": "slack-workspace-theme-customization"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/66c060eacf95f2940dae42d7edf4d131cd52a2b0-1920x1080.png"
}
}
}
},
{
"node": {
"id": "ae721962-ecf1-5566-acf1-17096974e285",
"title": "Better Performance through analysis.",
"publishedAt": "2019-08-17T11:33:41.000-04:00",
"slug": {
"current": "better-performance-through-analysis"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/edeed56fbd77dd393cca2604368c6e06c5b58491-3641x2048.png"
}
}
}
},
{
"node": {
"id": "7318b24a-074d-505c-a2c1-6be0123db083",
"title": "Adding Angular Reactive Form Web Component to Static Site",
"publishedAt": "2019-09-11T03:33:41.000-04:00",
"slug": {
"current": "adding-angular-reactive-form-web-component-to-static-site"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/a7c61440d3c5bd915a0deb54eeeb364dd72d59c9-1920x1080.png"
}
}
}
},
{
"node": {
"id": "b20e628e-98da-5467-b1ea-b62bf18ada36",
"title": "Firebase Hosting Version Settings",
"publishedAt": "2019-08-22T03:33:41.000-04:00",
"slug": {
"current": "firebase-hosting-version-settings"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/08db7925429fe741fd36e6d1e4b8b2d34972c9fc-1920x1080.png"
}
}
}
},
{
"node": {
"id": "dbc00c00-128e-585c-809e-e0dbd2038742",
"title": "Ionic Icons",
"publishedAt": "2019-01-20T01:25:38.000-05:00",
"slug": {
"current": "ionic-icons"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/445684b29a1c2cc31ea87faa014e73ce8c6183f2-1280x720.png"
}
}
}
},
{
"node": {
"id": "b909f183-0bef-5c4f-8e54-712252b1f5c4",
"title": "Adding Web Component for Ionic Modals",
"publishedAt": "2019-09-10T03:33:41.000-04:00",
"slug": {
"current": "adding-web-component-for-ionic-modals"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/a7c61440d3c5bd915a0deb54eeeb364dd72d59c9-1920x1080.png"
}
}
}
},
{
"node": {
"id": "a61d0a97-6c38-5fa5-8c54-63273de53331",
"title": "Front End Web Development Podcasts",
"publishedAt": "2019-08-18T01:33:41.000-04:00",
"slug": {
"current": "front-end-web-development-podcasts"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/395b7d00fc00bfe619dc7add36a9d282376e17c0-1920x1080.png"
}
}
}
},
{
"node": {
"id": "b71c7dd3-5f58-591d-81b4-93c3b175d52b",
"title": "Adding Angular Components to your static site",
"publishedAt": "2019-09-09T03:33:41.000-04:00",
"slug": {
"current": "adding-angular-components-to-your-static-site"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/a7c61440d3c5bd915a0deb54eeeb364dd72d59c9-1920x1080.png"
}
}
}
},
{
"node": {
"id": "d9a3fe81-bd8d-5e23-958c-d68b59065ae8",
"title": "VSCode Extension Peacock",
"publishedAt": "2019-05-10T21:33:41.000-04:00",
"slug": {
"current": "vscode-extension-peacock"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/e60649dbd7fbbb3c2e2116259a6179610a9d305f-1920x1080.png"
}
}
}
},
{
"node": {
"id": "31f85f1b-8088-5b6d-9b10-d51c15ff5146",
"title": "AJonP - Rebranded",
"publishedAt": "2018-11-04T21:56:55.000-05:00",
"slug": {
"current": "ajonp-rebranded"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/69d43ff4c5f4fbfbc8dec13b78cacca4c0c94d55-1429x467.png"
}
}
}
},
{
"node": {
"id": "e5ee1e8d-31af-5a28-a99d-1b7bd6ebb187",
"title": "JAMStack GR started",
"publishedAt": null,
"slug": {
"current": "jamstack-gr-started"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/504480f2239993b84024627cc62f5c22567f31d9-1920x1080.png"
}
}
}
},
{
"node": {
"id": "d6fb921b-e118-5f50-adae-197085713e81",
"title": "Cloudinary in Jamstacks using Webp",
"publishedAt": "2019-07-31T03:33:41.000-04:00",
"slug": {
"current": "cloudinary-in-jamstacks-using-webp"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/e6c0a2a51ca46b3ac3fcb5ba94d1a10c8161ce94-1920x1080.png"
}
}
}
},
{
"node": {
"id": "a873de03-3feb-5432-8e0f-997203ebc634",
"title": "Building a Fun App With Ionic Studio and Cloudinary",
"publishedAt": "2019-08-12T03:33:41.000-04:00",
"slug": {
"current": "building-a-fun-app-with-ionic-studio-and-cloudinary"
},
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/57375227ebd1ec6dd48ef678e76f36bc7ea2cfd2-1920x1080.png"
}
}
}
}
]
},
"allSanityCourse": {
"edges": [
{
"node": {
"id": "5f2d0397-4e1e-5f09-952c-ef71a15def6a",
"slug": {
"current": "javascript-for-a-10-year-old"
},
"_updatedAt": "2019-09-30T13:41:37Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/11842fc4d94b50f6b69c6697b195bd3248ccfa27-1920x1080.png"
}
}
}
},
{
"node": {
"id": "d6eb446c-e986-555b-bd57-729668735e67",
"slug": {
"current": "html-for-a-10-year-old"
},
"_updatedAt": "2019-09-30T13:39:44Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/6b4aa53c73d409a03b8c0b6791e1cc51440309fe-1920x1080.png"
}
}
}
},
{
"node": {
"id": "8de5eb5b-4fbb-5600-915f-5c236b8bb98d",
"slug": {
"current": "css-for-a-10-year-old"
},
"_updatedAt": "2019-09-30T13:41:31Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/7f2d8c36efe6a72611f22bf5b0f5df069e056c36-1920x1080.png"
}
}
}
},
{
"node": {
"id": "a6d122dc-58e7-5596-8d5d-329ec4c8b9ec",
"slug": {
"current": "nextjs9"
},
"_updatedAt": "2019-09-30T13:42:14Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/89b755e1e96e24eb7c8e60fb66bcf484923830f5-1920x1080.png"
}
}
}
},
{
"node": {
"id": "36b1ed30-8705-5e05-b3b7-744c92622ed6",
"slug": {
"current": "svelte3"
},
"_updatedAt": "2019-09-30T13:46:26Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/88885ba1659b5d80361e05caa8800cb8240dfdfc-1920x1080.png"
}
}
}
},
{
"node": {
"id": "b0546b55-d560-54b6-bd16-ca24a564c55a",
"slug": {
"current": "angularmaterial"
},
"_updatedAt": "2019-09-30T13:36:58Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/75346ad2ae21a468aa2c2933847030d639cc62c2-1920x1080.png"
}
}
}
}
]
},
"allSanityLesson": {
"edges": [
{
"node": {
"id": "db70542f-f163-529d-9ad5-3fc22ee2e833",
"slug": {
"current": "slap-someone-with-slack-commands"
},
"_updatedAt": "2019-09-30T13:47:54Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/e7c793bc5d7899e620c1ffd373719f80c56648ab-1920x1080.png"
}
}
}
},
{
"node": {
"id": "da1b225c-aae8-591a-9a73-0ce5fa068a3a",
"slug": {
"current": "rxfire-in-svelte-3-using-firebase-firestore-and-authentication"
},
"_updatedAt": "2019-09-30T13:58:36Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/f5208d3c8684baddcf4ea2cf18853c0389989bd9-1920x1080.png"
}
}
}
},
{
"node": {
"id": "2b95110d-d9c8-5c81-ad5a-2b02ea080f5c",
"slug": {
"current": "npm-tips-and-tricks"
},
"_updatedAt": "2019-09-30T14:02:40Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/04cefdc0178a79f90c98259fa016bf0366dee925-1280x720.png"
}
}
}
},
{
"node": {
"id": "2c99800e-374a-536d-943c-8db193ae686c",
"slug": {
"current": "design-systems-with-web-components"
},
"_updatedAt": "2019-09-30T13:58:11Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/53ef63ca6835fa560f94ab0aa5732576954124be-1920x1080.png"
}
}
}
},
{
"node": {
"id": "c772dfad-348a-50f7-8ded-8d850dd47b4b",
"slug": {
"current": "ajonp-hugo-ionic-template"
},
"_updatedAt": "2019-09-30T14:02:09Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/2579b41582b734e4cd1e176409e514ef62f7b24f-1280x720.png"
}
}
}
},
{
"node": {
"id": "ce47beb0-36b2-5998-a50f-1a137601932e",
"slug": {
"current": "google-cloud-repositories-ci-cd"
},
"_updatedAt": "2019-09-30T14:03:22Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/758c501ff499c843b3ff43739c33169f94f0ed4a-1280x720.png"
}
}
}
},
{
"node": {
"id": "6d32cfe7-c2bc-5543-9924-6226f3064b41",
"slug": {
"current": "use-firestore-to-build-hugo-content"
},
"_updatedAt": "2019-09-30T13:59:45Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/47168182bfed85ad05b2a27ec12ac30e9532d86c-1280x720.png"
}
}
}
},
{
"node": {
"id": "6ede9650-1ebd-5281-aeac-2ed1adf44489",
"slug": {
"current": "firebase-multisite-hosting"
},
"_updatedAt": "2019-09-30T14:01:30Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/860cb0888f9282b5ed524bb15fc94fa7ef173e35-1280x720.png"
}
}
}
},
{
"node": {
"id": "7cd50c02-061f-51cc-b0e8-df3efca3f5cd",
"slug": {
"current": "abap-hello-world"
},
"_updatedAt": "2019-09-30T14:04:15Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/d328f8a9f139f35463c46a30e78d71c89964c403-1280x720.png"
}
}
}
},
{
"node": {
"id": "26665fae-cebf-554e-937d-9c32103ac80b",
"slug": {
"current": "rxfire-in-reactjs-using-firebase-firestore-and-authentication"
},
"_updatedAt": "2019-09-30T13:58:51Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/40f14bbf8155990e227aad46e07b92b7d1a1e473-1920x1080.png"
}
}
}
},
{
"node": {
"id": "75103431-f381-57dc-8fbc-1ef3d2b4e48b",
"slug": {
"current": "hugo-ionic-template"
},
"_updatedAt": "2019-09-30T14:01:48Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/3a922db4147436103ef858d84ed0c5a7c401495d-1280x720.png"
}
}
}
},
{
"node": {
"id": "d746b372-3924-5900-a63b-1c7d4c8549b2",
"slug": {
"current": "abap-types-and-subroutines"
},
"_updatedAt": "2019-09-30T14:03:51Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/1e05b2bbdd0197071ffd07f534d643bf08113204-1280x720.png"
}
}
}
},
{
"node": {
"id": "c7b6cb2c-acb1-59cc-a3e5-a0dadd828746",
"slug": {
"current": "angular-pwa-to-google-play-store-using-trusted-web-activity"
},
"_updatedAt": "2019-09-30T13:59:11Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/3477c87dff2cdc6defc4066cb5d99b3418d5eab6-1920x1080.png"
}
}
}
}
]
},
"allSanityNote": {
"edges": []
},
"allSanityModule": {
"edges": [
{
"node": {
"id": "021955bb-59c6-5e83-ae3f-e6966767eaae",
"slug": {
"current": "firebase-project-hosting"
},
"_updatedAt": "2019-09-30T13:56:41Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/2cb3d51ebf7963430a989330767e3c4df4531dc1-1280x720.png"
}
}
}
},
{
"node": {
"id": "85afc721-6220-50db-9591-85834cce45f3",
"slug": {
"current": "nextjs-using-materialui-and-firebase-firestore-modeling"
},
"_updatedAt": "2019-09-30T13:50:23Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/8ceea98ff881233e453dd3f43ba34494b0b49981-1920x1080.png"
}
}
}
},
{
"node": {
"id": "66db828a-8764-5c38-a95f-f8434161e04c",
"slug": {
"current": "nextjs-using-materialui-and-firebase-ssr-part-1"
},
"_updatedAt": "2019-09-30T13:49:40Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/40a0f3710e767823c0bbeb6add2ae248ec9a3ea7-1920x1080.png"
}
}
}
},
{
"node": {
"id": "c475f636-e339-51b0-9b59-feac440191f1",
"slug": {
"current": "nextjs-using-materialui-and-firebase-navigation"
},
"_updatedAt": "2019-09-30T13:50:40Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/6ae61ccf928c784178a3e7504abe62f8a95c3443-1920x1080.png"
}
}
}
},
{
"node": {
"id": "5f27f62b-0054-5765-9aa9-a04a638f7c53",
"slug": {
"current": "angular-material-router-awareness"
},
"_updatedAt": "2019-09-30T13:52:59Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/09545e8792e7311286180abadd5ce893513bd6ea-1920x1080.png"
}
}
}
},
{
"node": {
"id": "fef61dfd-85f6-5b44-a23a-bb793e254cf7",
"slug": {
"current": "angular-material-forms-from-firestore"
},
"_updatedAt": "2019-09-30T13:53:50Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/64dd7a57833bfd87840ab3efb644ea53579ea619-1920x1080.png"
}
}
}
},
{
"node": {
"id": "95e7dc30-d3aa-5e70-b362-279499662e3f",
"slug": {
"current": "angular-material-dynamic-navigation-using-firestore"
},
"_updatedAt": "2019-09-30T13:54:21Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/448a2fe373938ea71135f1c5c4b0b1325fb903df-1280x720.png"
}
}
}
},
{
"node": {
"id": "81baed0d-ace9-5517-94ae-211625a4349d",
"slug": {
"current": "nextjs-using-materialui-and-firebase-intro"
},
"_updatedAt": "2019-09-30T13:51:56Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/1ebc3daea2703595366742baa0330dc36b3a72c5-1920x1080.png"
}
}
}
},
{
"node": {
"id": "cee70cda-5c9e-5f85-90d8-699802eb213e",
"slug": {
"current": "firebase-authentication-and-authorization"
},
"_updatedAt": "2019-09-30T13:52:37Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/0d3805af61a7c420469580a8c13716d7afeaaa27-1920x1080.png"
}
}
}
},
{
"node": {
"id": "d8e3a82d-0c1a-581a-b6f8-6bfebb5fbd19",
"slug": {
"current": "nextjs-using-materialui-and-firebase-materialui"
},
"_updatedAt": "2019-09-30T13:51:09Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/2e132d3ffb6f9b5965e85c0226aae8f739724c35-1920x1080.png"
}
}
}
},
{
"node": {
"id": "12049f04-e2c6-5fd0-802c-d87475508d33",
"slug": {
"current": "nextjs-using-materialui-and-firebase-project-hosting"
},
"_updatedAt": "2019-09-30T13:50:07Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/91d18c280666aee445553e6ded0177cf831bd41f-1920x1080.png"
}
}
}
},
{
"node": {
"id": "144adeb8-cd70-568f-88e3-ce298d9586e1",
"slug": {
"current": "nextjs-using-materialui-and-firebase-ssr-part-2"
},
"_updatedAt": "2019-09-30T13:49:25Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/a4ee60d89bc3dc7432cefe07dfaac939b8455e62-1920x1080.png"
}
}
}
},
{
"node": {
"id": "327516ec-f506-5fc6-8551-7f91f38c5404",
"slug": {
"current": "nextjs-using-materialui-and-firebase-setup"
},
"_updatedAt": "2019-09-30T13:51:19Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/d82892bd005455cc08a1b078b20b32dfc0d8e988-1920x1080.png"
}
}
}
},
{
"node": {
"id": "c3b9cc7b-602b-518f-8b58-31fe25010c61",
"slug": {
"current": "angular-material-router-outlet"
},
"_updatedAt": "2019-09-30T13:55:05Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/5887cad9cdc8718e4a64e696165d73e95ad2d0c8-1280x720.png"
}
}
}
},
{
"node": {
"id": "cae02c29-18a8-5d2a-a594-c2446339709e",
"slug": {
"current": "angular-material-theming"
},
"_updatedAt": "2019-09-30T13:54:46Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/e9452fd9e48c34078bb59d30f9e252f1ec7136d9-1280x720.png"
}
}
}
},
{
"node": {
"id": "fe4621a2-6e06-5895-8a41-a088e7928ea4",
"slug": {
"current": "angular-material-reactive-forms-update-firestore"
},
"_updatedAt": "2019-09-30T13:53:28Z",
"mainImage": {
"asset": {
"url": "https://cdn.sanity.io/images/hfh83o0w/production/2ef0e4b0834094083b65b576dcd1af64e27ae076-1920x1080.png"
}
}
}
}
]
}
}
}
// Load variables from `.env` as soon as possible
require("dotenv").config({
path: `.env.${process.env.NODE_ENV || "development"}`
});
const PortableText = require('@sanity/block-content-to-html')
const h = PortableText.h
const clientConfig = require("./client-config");
const imageUrlFor = source => imageUrlBuilder(clientConfig.sanity).image(source)
const isProd = process.env.NODE_ENV === "production";
module.exports = {
siteMetadata: {
title: `AJ on Purr-fect Solutions`,
//siteUrl: `https://ajonp.com`,
siteUrl: `https://beta.ajonp.com`,
description: `A Community of developers, creating resources for all to use!`,
},
plugins: [
`gatsby-plugin-typescript`,
"gatsby-plugin-postcss",
"gatsby-plugin-react-helmet",
{
resolve: "gatsby-source-sanity",
options: {
...clientConfig.sanity,
token: process.env.SANITY_READ_TOKEN,
watchMode: !isProd,
overlayDrafts: !isProd
}
},
{
resolve: `gatsby-plugin-advanced-sitemap`,
options: {
query: `
{
allSanityAuthor {
edges {
node {
id
slug {
current
}
_updatedAt
image {
asset {
url
}
}
}
}
}
allSanityBlogPost(filter: {slug: {current: {ne: "null"}}, publishedAt: {ne: "null"}}) {
edges {
node {
id
title
publishedAt
slug {
current
}
_rawExcerpt(resolveReferences: {maxDepth: 50})
_rawBody(resolveReferences: {maxDepth: 10})
}
}
}
allSanityCourse {
edges {
node {
id
slug {
current
}
_updatedAt
mainImage {
asset {
url
}
}
}
}
}
allSanityLesson(filter: {slug: {current: {ne: "null"}}, publishedAt: {ne: "null"}}) {
edges {
node {
id
slug {
current
}
_updatedAt
mainImage {
asset {
url
}
}
}
}
}
allSanityNote(filter: {slug: {current: {ne: "null"}}, publishedAt: {ne: "null"}}) {
edges {
node {
id
slug {
current
}
_updatedAt
mainImage {
asset {
url
}
}
}
}
}
allSanityModule(filter: {slug: {current: {ne: "null"}}, publishedAt: {ne: "null"}}) {
edges {
node {
id
slug {
current
}
_updatedAt
mainImage {
asset {
url
}
}
}
}
}
}
`,
// mapping: {
// // Each data type can be mapped to a predefined sitemap
// // Routes can be grouped in one of: posts, tags, authors, pages, or a custom name
// // The default sitemap - if none is passed - will be pages
// allSanityAuthor: {
// sitemap: `authors`,
// },
// allSanityBlogPost: {
// sitemap: `blog`,
// },
// allSanityCourse: {
// sitemap: `courses`,
// },
// allSanityLesson: {
// sitemap: `lessons`,
// },
// allSanityNote: {
// sitemap: `notes`,
// },
// allSanityModule: {
// sitemap: `coursemodules`,
// },
// },
exclude: [
`/dev-404-page`,
`/404`,
`/404.html`,
`/offline-plugin-app-shell-fallback`,
`/my-excluded-page`,
/(\/)?hash-\S*/, // you can also pass valid RegExp to exclude internal tags for example
],
createLinkInHead: true, // optional: create a link in the `<head>` of your site
addUncaughtPages: true, // optional: will fill up pages that are not caught by queries and mapping and list them under `sitemap-pages.xml`
}
},
{
resolve: `gatsby-plugin-feed`,
options: {
query: `
{
site {
siteMetadata {
title
description
siteUrl
site_url: siteUrl
}
}
}
`,
feeds: [
{
serialize: ({ query: { site, allSanityBlogPost, allSanityLesson, allSanityModule } }) => {
const blog = allSanityBlogPost.edges.map(edge => {
const { slug, title, publishedAt, _rawBody, _rawExcerpt } = edge.node;
let path = `/blog/${slug.current}`;
return Object.assign({}, {
title: title,
description: [
{
'content:encoded': PortableText({
blocks: _rawExcerpt,
})
}
],
date: publishedAt,
url: site.siteMetadata.siteUrl + path,
guid: site.siteMetadata.siteUrl + path,
custom_elements: [
{
'content:encoded': PortableText({
blocks: _rawBody,
serializers: {
types: {
code: ({ node }) =>
h(
'pre',
h('code', { lang: node.language }, node.code)
),
mainImage: ({ node }) =>
h('img', {
src: imageUrlFor(node.asset).url()
}),
img: ({ node }) => {
const { asset } = node;
h('img', {
src:asset.img
})
}
}
}
})
}
]
})
});
const lessons = allSanityLesson.edges.map(edge => {
const { slug, title, publishedAt, _rawBody, _rawExcerpt } = edge.node;
let path = `/lessons/${slug.current}`;
return Object.assign({}, {
title: title,
description: [
{
'content:encoded': PortableText({
blocks: _rawExcerpt,
})
}
],
date: publishedAt,
url: site.siteMetadata.siteUrl + path,
guid: site.siteMetadata.siteUrl + path,
custom_elements: [
{
'content:encoded': PortableText({
blocks: _rawBody,
serializers: {
types: {
code: ({ node }) =>
h(
'pre',
h('code', { lang: node.language }, node.code)
),
mainImage: ({ node }) =>
h('img', {
src: imageUrlFor(node.asset).url()
}),
img: ({ node }) => {
const { asset } = node;
h('img', {
src:asset.img
})
}
}
}
})
}
]
})
});
const courseModules = allSanityModule.edges.map(edge => {
const { slug, course, title, publishedAt, _rawBody, _rawExcerpt } = edge.node;
let path = `/courses/${course.slug.current}/${slug.current}`;
return Object.assign({}, {
title: title,
description: [
{
'content:encoded': PortableText({
blocks: _rawExcerpt,
})
}
],
date: publishedAt,
url: site.siteMetadata.siteUrl + path,
guid: site.siteMetadata.siteUrl + path,
custom_elements: [
{
'content:encoded': PortableText({
blocks: _rawBody,
serializers: {
types: {
code: ({ node }) =>
h(
'pre',
h('code', { lang: node.language }, node.code)
),
mainImage: ({ node }) =>
h('img', {
src: imageUrlFor(node.asset).url()
}),
img: ({ node }) => {
const { asset } = node;
h('img', {
src:asset.img
})
}
}
}
})
}
]
})
});
return [...blog, ...lessons, ...courseModules];
},
query: `
{
allSanityBlogPost(filter: {slug: {current: {ne: "null"}}, publishedAt: {ne: "null"}}) {
edges {
node {
id
title
publishedAt
slug {
current
}
_rawExcerpt(resolveReferences: {maxDepth: 50})
_rawBody(resolveReferences: {maxDepth: 10})
}
}
}
allSanityLesson(filter: {slug: {current: {ne: "null"}}, publishedAt: {ne: "null"}}) {
edges {
node {
id
title
publishedAt
slug {
current
}
_rawExcerpt(resolveReferences: {maxDepth: 50})
_rawBody(resolveReferences: {maxDepth: 10})
}
}
}
allSanityModule(filter: {slug: {current: {ne: "null"}}, publishedAt: {ne: "null"}}) {
edges {
node {
id
title
publishedAt
slug {
current
}
course {
slug {
current
}
}
_rawExcerpt(resolveReferences: {maxDepth: 50})
_rawBody(resolveReferences: {maxDepth: 10})
}
}
}
}
`,
output: "/index.xml",
title: "AJonP's RSS Feed",
},
],
},
},
{
resolve: `gatsby-plugin-manifest`,
options: {
name: `AJ on Purr-fect Solutions`,
short_name: `AJonP`,
start_url: `/`,
background_color: `#5E1286`,
theme_color: `#5E1286`,
display: `standalone`,
icon: `src/images/aj_logo_512x512.png`
}
},
`gatsby-plugin-offline`,
]
};