{"id":15413007,"url":"https://github.com/ascorbic/avalon","last_synced_at":"2025-08-04T18:11:34.658Z","repository":{"id":137069409,"uuid":"599234416","full_name":"ascorbic/avalon","owner":"ascorbic","description":"This repository was created by Gatsby Cloud","archived":false,"fork":false,"pushed_at":"2023-02-10T14:27:45.000Z","size":3032,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T16:18:10.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ascorbic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-08T18:18:59.000Z","updated_at":"2023-05-12T05:28:52.000Z","dependencies_parsed_at":"2024-03-14T12:31:14.276Z","dependency_job_id":null,"html_url":"https://github.com/ascorbic/avalon","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":0.1333333333333333,"last_synced_commit":"889b2bfd4746912e31f1762854fab2b0a7e4fa9f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ascorbic/avalon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Favalon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Favalon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Favalon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Favalon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascorbic","download_url":"https://codeload.github.com/ascorbic/avalon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascorbic%2Favalon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268739995,"owners_count":24299793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:55:01.074Z","updated_at":"2025-08-04T18:11:34.569Z","avatar_url":"https://github.com/ascorbic.png","language":"JavaScript","readme":"\u003ca href=\"https://www.gatsbyjs.com\"\u003e\n  \u003cimg alt=\"Gatsby\" src=\"https://www.gatsbyjs.com/Gatsby-Monogram.svg\" width=\"60\" /\u003e\n\u003c/a\u003e\n\n# Gatsby Starter Contentful Homepage\n\nCreate a homepage using Gatsby and Contentful. This starter demonstrates how to use Contentful to build a homepage and can be customized to match your own visual branding.\n\n[View the Demo](https://gatsbycontentfulhomepage.gatsbyjs.io/)\n\n**Note:**\nThis version of the Contentful homepage starter is written in JavaScript. If you want to use Contentful but TypeScript is more your style, there is also a TypeScript version maintained on [GitHub](https://github.com/gatsbyjs/gatsby-starter-contentful-homepage-ts).\n\n## Quick start\n\nYou will need a new or existing [Contentful space][] to use this starter and will be asked for your [Space ID][], [Content Management API Key][] (also referred to as a Personal Access Token) and [Content Delivery API Key][] during installation.\n\n[contentful space]: https://www.contentful.com/help/contentful-101/#step-2-create-a-space\n[space id]: https://www.contentful.com/help/find-space-id/\n[content delivery api key]: https://www.contentful.com/developers/docs/references/authentication/#api-keys-in-the-contentful-web-app\n[content management api key]: https://www.contentful.com/developers/docs/references/authentication/#the-content-management-api\n\n1. **Create a Gatsby site**\n\n   Use the Gatsby CLI to get started locally:\n\n   ```sh repo\n   npx gatsby new my-homepage https://github.com/gatsbyjs/gatsby-starter-contentful-homepage\n   ```\n\n1. **Run the Contentful setup script**\n\n   From your site's root directory, run:\n\n   ```sh\n   cd my-homepage\n   yarn setup\n   ```\n\n   This will run a script to populate your Contentful space's content model and add demo content.\n\n1. **Start developing**\n\n   In your site directory, start the development server:\n\n   ```sh\n   yarn start\n   ```\n\n   Your site should now be running at \u003chttp://localhost:8000\u003e\n\n1. **Open the source code and start editing**\n\n## Deploy your site\n\nOnce your content is available in Contentful, deploy your site to [Gatsby Cloud](https://gatsbyjs.com/products/cloud):\n\n1. Push your local site to a new repo in either GitHub, GitLab, or Bitbucket\n1. Log into your [Gatsby Cloud Dashboard][] and click on **Add a site**\n1. Use the **Import from a Git repository** option to find your site\n1. Add the environment variables from your `.env.production` file to Gatsby Cloud during setup\n1. Click **Build site** and your site should start building\n\nFor a more detailed walkthrough, see the tutorial on how to [build your site with Gatsby Cloud][tutorial].\n\n[gatsby cloud dashboard]: https://gatsbyjs.com/dashboard\n[tutorial]: https://www.gatsbyjs.com/docs/tutorial/part-1/#build-your-site-with-gatsby-cloud\n\n### Deploy without using the CLI\n\nAlternatively, you can deploy this starter directly to Gatsby Cloud.\n\nThis repository uses the `gatsby-provision` convention to allow for automatic CMS content provisioning during the Deploy Now flow in Gatsby Cloud. After you Quick Connect Contentful to your site, you will be given the option to run the `gatsby-provision` script to populate the selected Contentful space with the site's associated content model and content.\n\nOtherwise, you can always set up your content in Contentful manually before deploying to Gatsby Cloud.\n\n[![Deploy to Gatsby](https://www.gatsbyjs.com/deploynow.svg \"Deploy to Gatsby\")](https://www.gatsbyjs.com/dashboard/deploynow?url=https://github.com/gatsbyjs/gatsby-starter-contentful-homepage)\n\n## Setting up Gatsby Cloud Preview\n\nTo use Gatsby Cloud Preview with this site, see the documentation for\n[Installing Content Sync for Contentful][].\n\n[installing content sync for contentful]: https://support.gatsbyjs.com/hc/en-us/articles/4410371995539-Installing-Content-Sync-for-Contentful\n[add the gatsby cloud app to contentful]: https://support.gatsbyjs.com/hc/en-us/articles/360056047134-Add-the-Gatsby-Cloud-App-to-Contentful\n[connecting to contentful manually]: https://support.gatsbyjs.com/hc/en-us/articles/360052076554-Connecting-to-Contentful-Manually\n\n## What's included?\n\n```sh\n├── README.md\n├── gatsby-config.js\n├── gatsby-node.js\n├── src\n│   ├── components\n│   ├── pages\n│   ├── colors.css.ts\n│   ├── styles.css.ts\n│   └── theme.css.ts\n└── .env.EXAMPLE\n```\n\n1. **`gatsby-config.js`**: [Gatsby config][] file that includes plugins required for this starter.\n1. **`gatsby-node.js`**: [Gatsby Node][] config file that creates an abstract data model for the homepage content.\n1. **`src/`**: The source directory for the starter, including pages, components, and [Vanilla Extract][] files for styling.\n\n[gatsby config]: https://www.gatsbyjs.com/docs/reference/config-files/gatsby-config/\n[gatsby node]: https://www.gatsbyjs.com/docs/reference/config-files/gatsby-node/\n[vanilla extract]: https://vanilla-extract.style/\n\n## How to\n\n### Update the color theme\n\nTo update the colors used in this starter, edit the `src/colors.css.ts` file.\n\n```.ts\n// src/colors.css.ts\nexport const colors = {\n  background: \"#ffd500\",\n  text: \"#005bbb\",\n  primary: \"#005bbb\",\n  muted: \"#f5cc00\",\n  active: \"#004287\",\n  black: \"#000\",\n}\n\n```\n\nIf you'd like to add additional colors, add additional keys to this object.\nThis file is imported into `src/theme.css.ts` and creates CSS custom properties, that can be imported and used in other `.css.ts` files.\n\nThe UI components file `src/components/ui.js` imports styles from `src/components/ui.css.ts`. You can see how the theme and color values are being used in this file.\n\n### Add your logo\n\n![Logo](./docs/images/logo.png)\n\nReplace the `src/components/brand-logo.js` component with your own brand logo.\nIf you have an SVG version, it can be rendered inline as a React component, following the example in this file. Note that SVG attributes will need to be camel cased for JSX.\n\nUsing an inline SVG for the logo allows it to pick up the colors used in CSS, which is how the logo colors are inverted for the mobile menu.\n\nIf you prefer to use an image, use the [`StaticImage`](https://www.gatsbyjs.com/docs/reference/built-in-components/gatsby-plugin-image/#staticimage) component from `gatsby-plugin-image` in place of the SVG in this file.\n\n### Customize headings, buttons, and other styles\n\n![Headings \u0026 Buttons](./docs/images/headings-buttons.png)\n\nTo further customize the look and feel of the homepage, edit the UI components in `src/components/ui.js` and styles in `src/components/ui.css.ts`.\n\n### Customize section components\n\nTo customize any of the sections of the homepage, edit the relevant component in `src/components`.\nMost of the styles for these components are handled with shared UI components in `src/components/ui.js`.\n\n### Create custom section components\n\nTo create a new type of section in your homepage, you'll want to create a new section component, using the existing components as an example.\nFor this example, we'll create a new \"Banner\" component.\n\n1. First, update your content model in Contentful\n\n   1. In your Contentful space, create a new content type and call it \"Homepage Banner.\"\n\n      \u003cimg src=\"./docs/images/step-1.png\" alt=\"Step 1\" width=\"300\" /\u003e\n\n   1. For this example, add two fields to your new content type: `heading` and `text` – these can be _Short text_ types.\n\n      \u003cimg src=\"./docs/images/step-2.png\" alt=\"Step 2\" width=\"300\" /\u003e\n      \u003cimg src=\"./docs/images/step-3.png\" alt=\"Step 3\" width=\"300\" /\u003e\n      \u003cimg src=\"./docs/images/step-4.png\" alt=\"Step 4\" width=\"300\" /\u003e\n\n   1. Find the content type for _Homepage_ in Contentful and edit the settings for the _Content_ field. Under _Validation_, ensure that the new _Homepage Banner_ type is checked to make it available as a content type on the Homepage.\n\n      \u003cimg src=\"./docs/images/step-5.png\" alt=\"Step 5\" width=\"500\" /\u003e\n      \u003cimg src=\"./docs/images/step-6.png\" alt=\"Step 6\" width=\"500\" /\u003e\n      \u003cimg src=\"./docs/images/step-7.png\" alt=\"Step 7\" width=\"500\" /\u003e\n\n   1. Navigate to the _Content_ tab to edit the _Homepage_ and add a section with this new _Homepage Banner_ content type.\n\n      \u003cimg src=\"./docs/images/step-8.png\" alt=\"Step 8\" width=\"500\" /\u003e\n      \u003cimg src=\"./docs/images/step-9.png\" alt=\"Step 9\" width=\"500\" /\u003e\n\n1. Update `gatsby-node.js`\n\n   Edit your site's `gatsby-node.js` file, adding an interface for `HomepageBanner` that matches your content model in Contentful.\n   This allows the homepage to query the abstract `HomepageBanner` type.\n\n   ```js\n   // in gatsby-node.js\n   exports.createSchemaCustomization = async ({ actions }) =\u003e {\n     // ...\n     actions.createTypes(`\n       interface HomepageBanner implements Node \u0026 HomepageBlock {\n         id: ID!\n         blocktype: String\n         heading: String\n         text: String\n       }\n     `)\n     // ...\n     actions.createTypes(`\n       type ContentfulHomepageBanner implements Node \u0026 HomepageBanner \u0026 HomepageBlock @dontInfer {\n         id: ID!\n         blocktype: String @blocktype\n         heading: String\n         text: String\n       }\n     `)\n     // ...\n   }\n   ```\n\n1. Next, create the Banner component:\n\n   ```jsx fileExt\n   // src/components/banner.js\n   import * as React from \"react\"\n   import { graphql } from \"gatsby\"\n   import { Section, Container, Heading, Text } from \"./ui\"\n\n   export default function Banner(props) {\n     return (\n       \u003cSection\u003e\n         \u003cContainer\u003e\n           \u003cHeading\u003e{props.heading}\u003c/Heading\u003e\n           \u003cText\u003e{props.text}\u003c/Text\u003e\n         \u003c/Container\u003e\n       \u003c/Section\u003e\n     )\n   }\n\n   export const query = graphql`\n     fragment HomepageBannerContent on HomepageBanner {\n       id\n       heading\n       text\n     }\n   `\n   ```\n\n1. Export the component from `src/components/sections.js`\n\n   ```js fileExt\n   // src/components/sections.js\n   export { default as HomepageHero } from \"./hero\"\n   export { default as HomepageFeature } from \"./feature\"\n   export { default as HomepageFeatureList } from \"./feature-list\"\n   export { default as HomepageLogoList } from \"./logo-list\"\n   export { default as HomepageBenefitList } from \"./benefit-list\"\n   export { default as HomepageTestimonialList } from \"./testimonial-list\"\n   export { default as HomepageStatList } from \"./stat-list\"\n   export { default as HomepageCta } from \"./cta\"\n   export { default as HomepageProductList } from \"./product-list\"\n\n   // add export for new component\n   export { default as HomepageBanner } from \"./banner\"\n   ```\n\n1. Add the GraphQL query fragment to the query in `src/pages/index.js`\n\n   ```js fileExt\n   // in src/pages/index.js\n   export const query = graphql`\n     {\n       homepage {\n         id\n         title\n         description\n         image {\n           id\n           url\n         }\n         blocks: content {\n           id\n           blocktype\n           ...HomepageHeroContent\n           ...HomepageFeatureContent\n           ...HomepageFeatureListContent\n           ...HomepageCtaContent\n           ...HomepageLogoListContent\n           ...HomepageTestimonialListContent\n           ...HomepageBenefitListContent\n           ...HomepageStatListContent\n           ...HomepageProductListContent\n           # New component fragment\n           ...HomepageBannerContent\n         }\n       }\n     }\n   `\n   ```\n\n## Troubleshooting\n\n### Errors after making changes to the schema\n\nIf you've made changes to the `gatsby-node.js` file or changes to the Contentful data model, clear the Gatsby cache before running the develop server:\n\n```sh\nyarn clean \u0026\u0026 yarn start\n```\n\n---\n\n## 🎓 Learning Gatsby\n\nLooking for more guidance? Full documentation for Gatsby lives [on the website](https://www.gatsbyjs.com/). Here are some places to start:\n\n- **For most developers, we recommend starting with our [in-depth tutorial for creating a site with Gatsby](https://www.gatsbyjs.com/tutorial/).** It starts with zero assumptions about your level of ability and walks through every step of the process.\n- **To dive straight into code samples, head [to our documentation](https://www.gatsbyjs.com/docs/).**\n\n## 💫 Deploy\n\n[Build, Deploy, and Host On The Only Cloud Built For Gatsby](https://www.gatsbyjs.com/cloud/)\n\nGatsby Cloud is an end-to-end cloud platform specifically built for the Gatsby framework that combines a modern developer experience with an optimized, global edge network.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascorbic%2Favalon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascorbic%2Favalon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascorbic%2Favalon/lists"}