From 580eb00a664fe1626872617356eab2c5388b80fd Mon Sep 17 00:00:00 2001 From: "Clay W." <53538953+Dealstitch@users.noreply.github.com> Date: Thu, 3 Oct 2024 10:54:12 -0600 Subject: [PATCH] updates to index file and for custom layout --- .github/FUNDING.yml | 1 - content/index.md | 40 +++++---------- layouts/OnlyLayout.ts | 29 +++++++++++ quartz.config.ts | 2 + quartz.layout.ts | 7 +-- quartz/plugins/emitters/OnlyContentPage.tsx | 55 +++++++++++++++++++++ 6 files changed, 100 insertions(+), 34 deletions(-) delete mode 100644 .github/FUNDING.yml create mode 100644 layouts/OnlyLayout.ts create mode 100644 quartz/plugins/emitters/OnlyContentPage.tsx diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 40b2d4a3a..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [jackyzha0] diff --git a/content/index.md b/content/index.md index e90a044d5..50eca4e3a 100644 --- a/content/index.md +++ b/content/index.md @@ -1,29 +1,15 @@ + --- + layout: OnlyContentPage + --- -- #TEAM finalizes repo roles and [list of content]([[Backend Files for Migration]]) for migration to `dealstitch-infra repo`. -- #MO deletes agreed content in `dealstitch-backend` and merges to `main` . -- #MR updates agreed content in `dealstitch-infra`, #MO reviews/merges to `main`. -- #MR restructures `dealstitch-infra` folders based on this [directory structure]([[Revised Infra Directory]]). -- #MR works through [[AWS Clean-Up List]], keeping #CW in the loop. -- #MO deletes any unneeded `print_loggers` in both repos (displaced by DynamoDB). -- #MO Implements WorkOS AuthKit to `dealstitch-backend` - - https://workos.com/docs/user-management/authkit - - https://github.com/workos/workos-python - - [[WorkOS Secrets]] <-- Python keys !!! -- #MR implements WorkOS AuthKit in `dealstitch-frontend - - https://workos.com/docs/user-management/authkit - - https://github.com/workos/authkit-nextjs - - https://github.com/workos/next-authkit-example - - [[WorkOS Secrets]] <-- Next.js keys !!! - - Decision Point: Create custom login component or skip? -- #MO implements IP white list API token with Bright Data, delete IP checks in codebase. - - https://docs.brightdata.com/api-reference/proxy-manager/whitelist_implements - - https://docs.brightdata.com/proxy-networks/proxy-manager/security -- #MR begins rollout of `shad-cn`components to `dealstitch-frontend` with #CW - - Ensure consistent/full use of Tailwind CSS props. - - Ensure consistent/full use of `shad-cn` default components and file names/locations. - - Setup `tailwind.config.js` or `.ts` and `components.json` to support [shad-cn CLI](https://ui.shadcn.com/docs/cli). - - Review repo structure/files, advise #CW on clean-up of the directory. - - **GOAL:** Removal of all Material UI dependencies, replaced by `shad-cn` 'New York' theme. -- #MO creates plan for Pinecone rollout of `entity-matcher` service to prod with #CW -- #MR refactors `web_scraper/` based on [this plan](Refactored Web-Scrapers Directory) ahead of agentic `url_originators` development. +- **Weekly Work Commitments:** Due by Mon 12pm MDT / Mon 9pm TRT / Tues 3am PHT. Simply send a note on Teams with the GitHub issue numbers you're working on. Include which issues you expect to submit a PR for during the week. This helps us gauge pacing and identify unclear issues before the weekly call. If an issue is listed without a PR expectation, it could be because 1. the issue is unclear (we can discuss), 2. the scope/complexity is unclear (we can discuss), or 3. the effort required exceeds your available time for the week. +- **Weekly Progress Call:** Tues 10-11am MDT / Tues 7-8pm TRT / Wed 12-1am PHT. + +- **Mark "@" Mentions Availability (Teams / GitHub):** 1-2 hour response time from 12-5am PHT unless explained. + +- **Weekly PRs (Reviewed):** Complete within 48 business hours (Mon-Fri) unless explained via "@" in GitHub. + +- **Blackout Dates (Unavailable):** Communicate any planned unavailability (vacation, holidays, etc.) at least 2 weeks in advance. + +--- \ No newline at end of file diff --git a/layouts/OnlyLayout.ts b/layouts/OnlyLayout.ts new file mode 100644 index 000000000..d72f5dee9 --- /dev/null +++ b/layouts/OnlyLayout.ts @@ -0,0 +1,29 @@ +import { PageLayout, SharedLayout } from "../quartz/cfg" +import * as Component from "../quartz/components" + +// Shared components remain the same +export const sharedPageComponents: SharedLayout = { + head: Component.Head(), + header: [], + afterBody: [], + footer: Component.Footer({ + links: { + Home: "/", + "About Us": "/about", + Contact: "/contact", + // Add more links as needed + }, + }), +} + +// Custom layout without left and right sections +export const OnlyContentPageLayout: PageLayout = { + beforeBody: [ + Component.Breadcrumbs(), + Component.ArticleTitle(), + Component.ContentMeta(), + Component.TagList(), + ], + left: [], // Remove left-hand navigation + right: [], // Remove right-hand content +} diff --git a/quartz.config.ts b/quartz.config.ts index b6abbb2d3..091dd39eb 100644 --- a/quartz.config.ts +++ b/quartz.config.ts @@ -1,5 +1,6 @@ import { QuartzConfig } from "./quartz/cfg" import * as Plugin from "./quartz/plugins" +import { OnlyContentPage } from "./quartz/plugins/emitters/OnlyContentPage" /** * Quartz 4.0 Configuration @@ -77,6 +78,7 @@ const config: QuartzConfig = { Plugin.AliasRedirects(), Plugin.ComponentResources(), Plugin.ContentPage(), + OnlyContentPage(), // Register the custom emitter Plugin.FolderPage(), Plugin.TagPage(), Plugin.ContentIndex({ diff --git a/quartz.layout.ts b/quartz.layout.ts index 4a78256aa..30186c37c 100644 --- a/quartz.layout.ts +++ b/quartz.layout.ts @@ -6,12 +6,7 @@ export const sharedPageComponents: SharedLayout = { head: Component.Head(), header: [], afterBody: [], - footer: Component.Footer({ - links: { - GitHub: "https://github.com/jackyzha0/quartz", - "Discord Community": "https://discord.gg/cRFFHYye7t", - }, - }), + footer: Component.Footer(), } // components for pages that display a single page (e.g. a single note) diff --git a/quartz/plugins/emitters/OnlyContentPage.tsx b/quartz/plugins/emitters/OnlyContentPage.tsx new file mode 100644 index 000000000..c8a40574c --- /dev/null +++ b/quartz/plugins/emitters/OnlyContentPage.tsx @@ -0,0 +1,55 @@ +import { OnlyContentPageLayout, sharedPageComponents } from "../../../layouts/OnlyLayout" +import Content from "../../components/pages/Content" +import { pageResources, renderPage } from "../../components/renderPage" // Update this line +import { QuartzComponentProps } from "../../components/types" +import { FilePath, pathToRoot } from "../../util/path" +import { QuartzEmitterPlugin } from "../types" +import { write } from "./helpers" + +export const OnlyContentPage: QuartzEmitterPlugin = () => { + const layout = { + ...sharedPageComponents, + ...OnlyContentPageLayout, + pageBody: Content(), + } + + const { head, header, beforeBody, pageBody, afterBody, footer } = layout + + return { + name: "OnlyContentPage", + getQuartzComponents() { + return [head, ...header, ...beforeBody, pageBody, ...afterBody, footer] + }, + async emit(ctx, content, resources) { + const cfg = ctx.cfg.configuration + const fps: FilePath[] = [] + const allFiles = content.map((c) => c[1].data) + + for (const [tree, file] of content) { + const slug = file.data.slug! + const externalResources = pageResources(pathToRoot(slug), resources) + const componentData: QuartzComponentProps = { + ctx, + fileData: file.data, + externalResources, + cfg, + children: [], + tree, + allFiles, + } + + const htmlContent = renderPage(cfg, slug, componentData, layout, externalResources) + const fp = (await write({ + ctx, + content: htmlContent, + slug, + ext: ".html", + })) as FilePath + + fps.push(fp) + } + + return fps + }, + } +}