Giter Club home page Giter Club logo

website's Introduction

This project contains the main source code for the-guild.dev website and it's sub-components.

Installing Dependencies

Run pnpm i from the root directory to get all the dependencies installed.

Running the Website (Development Mode)

Run cd website && pnpm dev to start the server locally.

Build and Run the Website (Production)

Run pnpm build followed by pnpm export to build and export a static version of the website in production mode.

Contributing to Our Blog

We use MDX (Markdown with JSX) for our blog posts. To add a new blog post:

  • Create a new MDX file in website/pages/blog directory with the same template as other blog posts
  • Update the meta object with all the information regarding the blog post including title, thumbnails, author name, etc.
  • Any assets related to the blog can be placed in website/public/blog-assets directory within its own folder
  • If you are contributing for the first time, make sure that you add your details in ui/authors.ts file with a new entry to the authors object
  • Once you send us a PR, we will review the same, provide the feedback as necessary and merge it if everything looks good

website's People

Contributors

alinsimoc avatar ardatan avatar beerose avatar charlypoly avatar chimame avatar croutonn avatar danielrearden avatar dependabot[bot] avatar dimamachina avatar dotansimha avatar eddeee888 avatar elie222 avatar enisdenjo avatar giladd123 avatar gilgardosh avatar gthau avatar jycouet avatar kamilkisiela avatar maticzav avatar n1ru4l avatar notrab avatar nullswan avatar pabloszx avatar renovate[bot] avatar rxliuli avatar tuvalsimha avatar tvvignesh avatar urigo avatar warrenday avatar yassineldeeb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

website's Issues

SEO/Preview fixes

  • use next-seo instead of custom next/head ➡️ <Page>, <Article>
  • remove logo from defaultSeoProps (_app.tsx)

The Guild Contributor Docs

Hi. As discussed with @Urigo I will be working on a PR to contributor docs for anyone who wants to contribute to the OSS projects from The Guild making them comfortable when they start (like me 😅)

While the process is same for all OSS projects, all of them follow a different set of standards, conventions, processes and also have a set criteria for people to transition from contributors to maintainers (like you guys discussed in graphqljs repo). It is better to have all of them documented in one place and we can link it in all the repos.

While the workflow remains similar for all repos, there might be some differences in the way you contribute to, for different repositories. Those instructions can be added in the repository respectively in addition to referencing the docs.

As @Urigo suggested, I have also created a google doc here: https://docs.google.com/document/d/1KwNOYcc8IdW8l-MBEHd2MPhlT8GAORkJHl7uah_x-g4/edit?usp=sharing to document my thought process as I go ahead.

One question:
Should I update the website to have the contributor docs and then send a PR to the relevant repos adding the link and custom instructions if any? I am going to document and try the instructions with the repos first hand and see if I can generalize them.

PS: Will be taking some inspirations from other OSS repos as well.

CC: @dotansimha @ardatan

"Platform" page

Feedback for “Unleash the power of Fragments with GraphQL Codegen”

Hi, thanks for all the great tools around graphql. I really like them.

Currently, I use the codegen plugins to create the react hooks and use it in my app.

I want to switch to the new approach :"Unleash the power of Fragments with GraphQL Codegen"

Is there a possibility to have both concepts working at the same time ?
I want to create the new queries with the new concept and move the old ones step by step to the new concept.

Thanks in advance.
Regards
Holger

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yaml
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
  • actions/checkout v4
.github/workflows/helper-worker-deploy.yaml
  • actions/checkout v4
  • cloudflare/wrangler-action v3.5.0
.github/workflows/lint.yaml
.github/workflows/website-router-deploy.yaml
  • actions/checkout v4
  • cloudflare/wrangler-action v3.5.0
nodenv
.node-version
  • node 21.7.3
npm
package.json
  • @theguild/eslint-config 0.11.8
  • @theguild/prettier-config 1.2.0
  • @vue/compiler-sfc ^3.3.4
  • eslint 8.57.0
  • eslint-plugin-mdx 3.1.5
  • prettier 2.8.8
  • prettier-plugin-tailwindcss 0.4.1
  • pretty-quick 4.0.0
  • remark-frontmatter 5.0.0
  • remark-lint-no-multiple-toplevel-headings 3.1.2
  • remark-preset-lint-consistent 5.1.2
  • remark-preset-lint-markdown-style-guide 5.1.3
  • remark-preset-lint-recommended 6.1.3
  • remark-preset-prettier 2.0.1
  • typescript 5.4.5
  • node >=21.6
  • pnpm >=9
  • pnpm 9.1.0
  • hast-util-to-estree ^3.0.0
packages/blog-sync/package.json
  • @types/js-yaml 4.0.9
  • @types/node 20.12.11
  • estree-walker 3.0.3
  • globby 14.0.1
  • guild-devto-nodejs-sdk 1.0.6
  • js-yaml 4.1.0
  • remark-frontmatter 5.0.0
  • remark-mdx 2.3.0
  • remark-parse 10.0.2
  • remark-parse-frontmatter 1.0.3
  • remark-stringify 10.0.3
  • to-vfile 7.2.4
  • tsup 8.0.2
  • typescript 5.4.5
  • unified 11.0.4
  • unist-util-remove 4.0.0
  • unist-util-visit 5.0.0
packages/remark-lint-chicago-heading/package.json
  • hast-util-to-string ^3.0.0
  • title ^3.5.3
  • unified ^11.0.0
  • unified-lint-rule ^2.0.0
  • unist-util-generated ^3.0.0
  • unist-util-visit ^5.0.0
  • @types/mdast ^4.0.0
packages/remark-lint-no-dot-at-end-of-heading/package.json
  • hast-util-to-string ^3.0.0
  • unified ^11.0.0
  • unified-lint-rule ^2.0.0
  • unist-util-generated ^3.0.0
  • unist-util-visit ^5.0.0
  • @types/mdast ^4.0.0
packages/remark-lint-no-full-bold-heading/package.json
  • hast-util-to-string ^3.0.0
  • unified ^11.0.0
  • unified-lint-rule ^2.0.0
  • unist-util-generated ^3.0.0
  • unist-util-visit ^5.0.0
  • @types/mdast ^4.0.0
packages/website-helper-worker/package.json
  • @notionhq/client 2.2.15
  • form-data 4.0.0
  • mimetext 3.0.24
  • toucan-js 3.4.0
  • @cloudflare/workers-types 4.20240502.0
  • typescript 5.4.5
  • wrangler 3.53.1
packages/website-router/package.json
  • toucan-js 3.4.0
  • @cloudflare/workers-types 4.20240502.0
  • @types/node 20.12.11
  • typescript 5.4.5
  • wrangler 3.53.1
website/package.json
  • @radix-ui/react-tooltip 1.0.7
  • @stitches/react 1.2.8
  • @theguild/components 6.5.3
  • clsx 2.1.1
  • core-js-pure 3.37.0
  • date-fns 3.6.0
  • formik 2.4.6
  • immer 10.1.1
  • link-preview-node 1.0.7
  • next 14.2.3
  • next-mdx-remote 4.4.1
  • next-seo 6.5.0
  • nprogress 0.2.0
  • react 18.3.1
  • react-avatar 5.0.3
  • react-children-utilities 2.10.0
  • react-confetti 6.1.0
  • react-dom 18.3.1
  • react-hot-toast 2.4.1
  • rss 1.2.2
  • yup 1.4.0
  • @next/bundle-analyzer 13.5.6
  • @theguild/tailwind-config 0.4.1
  • @types/node 20.12.11
  • @types/react 18.3.1
  • @types/rss 0.0.32
  • globby 14.0.1
  • next-sitemap 4.2.3
  • tsx 4.9.3
  • typescript 5.4.5

  • Check this box to trigger a request for Renovate to run again on this repository

Teasers that link to similar blog articles

At the end of an article we shall have a list of teasers that link to related content.

image

We could re-use the existing teaser component for this

image

The logic could be:

  • Priority 1: Choose articles the author explicitly defined in the meta
    export const meta = {
      title: 'How not to learn GraphQL',
      author: 'charlypoly',
      tags: ['graphql'],
      date: '2022-02-14',
      description:
        'A guide to avoid common learning biases and misconceptions around GraphQL',
      thumbnail: '/blog-assets/how-not-to-learn-graphql/preview.png',
      image: '/blog-assets/how-not-to-learn-graphql/cover.png',
      // RELEVANT CONFIG HERE
      relatedArticles: ['article-slug-a', 'article-slug-b']
    }
  • Priority 2: Choose random articles that match the same tag as the article.

readme does not specify that I need non npm dependencies installed before running yarn

laurinquast@Laurins-MBP the-guild-website % yarn
yarn install v1.22.18
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning " > @chakra-ui/[email protected]" has unmet peer dependency "@chakra-ui/system@>=1.0.0".
warning "@chakra-ui/icons > @chakra-ui/[email protected]" has unmet peer dependency "@chakra-ui/system@>=1.0.0".
warning " > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/react@^11.0.0".
warning " > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/styled@^11.0.0".
warning "@chakra-ui/react > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/react@>=10.0.35".
warning "@chakra-ui/react > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/react@^11.0.0".
warning "@chakra-ui/react > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/styled@^11.0.0".
warning "@chakra-ui/react > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/react@^11.0.0".
warning "@chakra-ui/react > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/styled@^11.0.0".
warning "@chakra-ui/react > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/react@^11.0.0".
warning "@chakra-ui/react > @chakra-ui/[email protected]" has unmet peer dependency "@emotion/styled@^11.0.0".
warning " > @guild-docs/[email protected]" has unmet peer dependency "@chakra-ui/utils@*".
warning " > @guild-docs/[email protected]" has unmet peer dependency "@emotion/react@*".
warning "@guild-docs/client > [email protected]" has incorrect peer dependency "unist-util-visit@^2.0.0".
warning "@guild-docs/client > mermaid > @percy/migrate > [email protected]" has unmet peer dependency "@babel/preset-env@^7.1.6".
warning " > @mdx-js/[email protected]" has unmet peer dependency "webpack@>=4".
warning "@theguild/components > @algolia/[email protected]" has unmet peer dependency "@algolia/client-search@^4.5.1".
warning "@theguild/components > @algolia/[email protected]" has unmet peer dependency "@algolia/client-search@^4.9.1".
warning "@theguild/components > [email protected]" has unmet peer dependency "prop-types@^15.8.1".
warning "@theguild/components > @algolia/autocomplete-js > @algolia/[email protected]" has unmet peer dependency "@algolia/client-search@^4.9.1".
warning "@theguild/components > @emotion/react > @emotion/[email protected]" has unmet peer dependency "@babel/core@^7.0.0".
warning "@theguild/components > @emotion/react > @emotion/babel-plugin > @babel/[email protected]" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "next-optimized-images > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning "next-optimized-images > optimized-images-loader > [email protected]" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0".
warning " > [email protected]" has unmet peer dependency "@babel/runtime@>=7".
warning " > [email protected]" has unmet peer dependency "core-js-pure@>=3".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.0.0 || ^16.0.0".
[4/4] 🔨  Building fresh packages...
[-/5] ⡀ waiting...
[2/5] ⡀ sharp
[-/5] ⡀ waiting...
[-/5] ⡀ waiting...
error /Users/laurinquast/Projects/the-guild-website/node_modules/sharp: Command failed.
Exit code: 1
Command: (node install/libvips && node install/dll-copy && prebuild-install --runtime=napi) || (node-gyp rebuild && node install/dll-copy)
Arguments: 
Directory: /Users/laurinquast/Projects/the-guild-website/node_modules/sharp
Output:
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.1/libvips-8.9.1-darwin-arm64v8.tar.gz
ERR! sharp Prebuilt libvips 8.9.1 binaries are not yet available for darwin-arm64v8
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | arm64
gyp info find Python using Python version 3.8.9 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/laurinquast/Library/Application Support/fnm/node-versions/v16.15.0/installation/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/laurinquast/Projects/the-guild-website/node_modules/sharp/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/laurinquast/Library/Application Support/fnm/node-versions/v16.15.0/installation/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/laurinquast/Library/Caches/node-gyp/16.15.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/laurinquast/Library/Caches/node-gyp/16.15.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/laurinquast/Library/Application Support/fnm/node-versions/v16.15.0/installation/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/laurinquast/Library/Caches/node-gyp/16.15.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/laurinquast/Projects/the-guild-website/node_modules/sharp',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CC(target) Release/obj.target/nothing/../node-addon-api/nothing.o
  LIBTOOL-STATIC Release/nothing.a
warning: /Library/Developer/CommandLineTools/usr/bin/libtool: archive library: Release/nothing.a the table of contents is empty (no object file members in the library define global symbols)
  TOUCH Release/obj.target/libvips-cpp.stamp
  CXX(target) Release/obj.target/sharp/src/common.o
../src/common.cc:23:10: fatal error: 'vips/vips8' file not found
#include <vips/vips8>
         ^~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/laurinquast/Library/Application Support/fnm/node-versions/v16.15.0/installation/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 21.3.0
gyp ERR! command "/Users/laurinquast/Library/Application Support/fnm/node-versions/v16.15.0/installation/bin/node" "/Users/laurinquast/Library/Application Support/fnm/node-versions/v16.15.0/installation/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/laurinquast/Projects/the-guild-website/node_modules/sharp

Multi-site search with Algolia

Hi. As discussed with @Urigo , filing this issue to work on multi-site search with Algolia for all the websites maintained by The Guild.

After thinking a bit, I am planning to stick with multiple indexes (as used now) with one index for every project, but still search through them all in search (a.k.a multi-index search)

I did look at references on how to do this, and these are some resources I found:

Will raise a PR after testing it out properly. If my assumption is right, there should be no change to the indexing in algolia, but just a change in the client side. Will confirm.

Steps

No image lazy-loading

After switching from our Image component to css background-image: url(..) all images are loaded (see /blog page). Let's get it lazy-loaded again and add placeholders (?lqip).

Feedback for “Unleash the power of Fragments with GraphQL Codegen”

Can you include examples on how to set up mock properties for unit testing components that rely on fragments? The patterns I'm coming up with are brutally complex, and the graphql-codegen-typescript-mock-data plugin doesn't create mocks for fragments. I may be missing something very straightforward, but I can't find any documentation on how to easily mock out fragments when using the types generated by this tool.

for example, a simple component and a simple fragment:

// component
export const BirthdayNote_User = graphql(`
  fragment BirthdayNote_User on User {
    id
    birthdate
  }
`);

const BirthdayNote: React.FC<{ user: FragmentType<typeof BirthdayNote_User> }> = (props) => { ...etc }

result on this extraordinarily convoluted setup for a mock property:

const baseUser: Pick<User, 'id' | 'birthdate'> = { // because it's fragment data, and other User fields are required for the User type
  id: '1234',
  birthdate: 'Oct 3 2002'
}
const userProp: FragmentType<typeof BirthdayNote_UserFragment> = {
  ...baseUser, // this is the data that will actually be used by the component after running through `useFragment`, which just seems to return the second parameter as is anyways
  ' $fragmentRefs': { // this is necessary to fulfill the `FragmentType` type definition on the property
    BirthdayNote_UserFragment: {
      ...baseUser,
      ' $fragmentName': 'BirthdayNote_UserFragment'
    }
};

it('renders the birthday', () => {
  render(<BirthdayNote user={userProp} />);
  // some assertions here
});

Implement a shared template for all Guild websites

I will be working on a shared template for all the Guild websites as shared by @Urigo

Design mockup as shared with me: https://www.figma.com/file/5pLw6xaeEBWNh7JtsCmn96/TheGuild?node-id=0%3A1

Steps:

  • Move all websites away from Docusaurus to Next.js
  • Prepare a common skeleton template for the websites
    • Header
    • Sub Header
    • Footer
    • Content Area
  • Make sure that the template is responsive
  • Apply styling, theme and color scheme as suggested in the mockup
  • Adapt Docusaurus to fit within this template
  • Apply this template to all Guild websites and update content of every website to fit into the new layout
    • The Guild Website
    • GraphQL Codegen
    • GraphQL Tools
    • GraphQL Config
    • GraphQL Inspector
    • GraphQL Mesh
    • GraphQL Modules

Questions I currently have

  • How would Docusaurus styling work with this template? Redesigning Docusaurus to match this template would be a tedious task due its own set of conventions, components and design schemes. I will try adapting it to this style or embed it within this skeleton if it turns out to be complicated. Will let you know how this goes.
  • Should I start this from scratch or iterate from the existing Guild website? I am not sure, but I feel iterating from the guild website would be better since this is going to be more of a change in template and styling, but not sure so far since the current design and the new mockup looks a lot different. Not sure how much I can reuse.
  • Docusaurus comes with its own set of menu items for the docs which turns into hamburger menu in mobile devices and from this design there will be another menubar on top which will again turn into a hamburger menu thus creating overlapping hamburger icons since both header and subheader has its own menu items which are unrelated. Any idea on how you will want to tackle this in mobile devices? Will know more about this as we go on.

I am pretty sure there might be a lot more questions as I go along. Will update the same issue with the details. Do let me know if I missed something. Will iterate as I go along.

CC: @dotansimha @ardatan @Urigo

Fix logos on dark background

The problem: dark text on dark background in the /open-source page.

Solution? Maybe currentColor to drive the text color in these SVGs. Currently we use <img src="logo.svg" />, we could switch to use SVG directly.

We use these logos on other websites so we should make it in a non-breaking way...

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.