diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 59e1fbdd0..fa892b053 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -16,6 +16,7 @@ jobs: env: NEXT_PUBLIC_CONTENTFUL_SPACE_ID: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_SPACE_ID }} NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN: ${{ secrets.NEXT_PUBLIC_CONTENTFUL_ACCESS_TOKEN }} + NEXT_PUBLIC_GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.NEXT_PUBLIC_GITHUB_PERSONAL_ACCESS_TOKEN }} steps: - name: Get files diff --git a/components/home/Layout.jsx b/components/home/Layout.jsx index 780c1f3ce..464a9dae6 100644 --- a/components/home/Layout.jsx +++ b/components/home/Layout.jsx @@ -1,9 +1,8 @@ -import BannerContact from "components/BannerContact"; import BannerLicense from "components/BannerLicense"; import BannerPartners from "components/BannerPartners"; import Footer from "components/layout/Footer"; import Head from "next/head"; -import HeaderNew from "components/layout/HeaderNew"; +import Header from "components/layout/Header"; import React from "react"; import { prefix } from "prefix"; @@ -20,7 +19,7 @@ export default function HomeLayout({ children }) { {title} - +
{children} diff --git a/components/layout/HeaderNew.jsx b/components/layout/Header.jsx similarity index 97% rename from components/layout/HeaderNew.jsx rename to components/layout/Header.jsx index 73dd05d12..55b258d7d 100644 --- a/components/layout/HeaderNew.jsx +++ b/components/layout/Header.jsx @@ -16,8 +16,9 @@ const newsNavigation = [ slug: "news-and-events", items: [ { - label: "News and events", - href: "/news-and-events", + label: "Samvera Virtual Connect 2024", + href: "https://samvera.atlassian.net/wiki/spaces/samvera/pages/2420015105/Samvera+Virtual+Connect+2024+Program", + isExternal: true, }, { label: "Samvera calendar", diff --git a/components/layout/Layout.jsx b/components/layout/Layout.jsx index e442a51f4..07a766792 100644 --- a/components/layout/Layout.jsx +++ b/components/layout/Layout.jsx @@ -3,11 +3,11 @@ import BannerLicense from "../BannerLicense"; import BannerPartners from "../BannerPartners"; import Footer from "./Footer"; import Head from "next/head"; +import Header from "./Header"; import OuterWrapper from "./OuterWrapper"; import React from "react"; import SidebarLinks from "../sidebar/Links"; import { prefix } from "prefix"; -import HeaderNew from "./HeaderNew"; const description = "Samvera™ is a vibrant and welcoming community of information and technology professionals who share challenges, build expertise, and create sustainable, best-in-class solutions, making the world’s digital collections accessible now and into the future. Samvera’s suite of repository software tools offers flexible and rich user interfaces tailored to distinct content types on top of a robust back end – giving adopters the best of both worlds."; @@ -21,7 +21,7 @@ export default function Layout({ children, title }) { - +
{children} diff --git a/lib/github.js b/lib/github.js index efb287dcd..ea7487083 100644 --- a/lib/github.js +++ b/lib/github.js @@ -1,8 +1,10 @@ export async function getGithubRepoData(featuredApps) { const apiRootUrl = "https://api.github.com/repos/"; - // Set up the URLs we need to fetch + // URLs of the GitHub repo const urls = featuredApps.map((app) => `${apiRootUrl}${app.githubHandle}`); + + // URLs of the latest release const releaseUrls = featuredApps.map( (app) => `${apiRootUrl}${app.githubHandle}/releases/latest` ); @@ -14,9 +16,12 @@ export async function getGithubRepoData(featuredApps) { fetch(url, { headers: { Accept: "application/vnd.github.v3+json", - "User-Agent": "samvera/samvera.org", + // "User-Agent": "samvera/samvera.org", + Authorization: `token ${process.env.NEXT_PUBLIC_GITHUB_PERSONAL_ACCESS_TOKEN}`, }, - }).then((res) => res.json()) + }).then((res) => { + return res.json(); + }) ) );