Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Guild Blog x Nextra 4 #1783

Open
wants to merge 82 commits into
base: master
Choose a base branch
from
Open

The Guild Blog x Nextra 4 #1783

wants to merge 82 commits into from

Conversation

dimaMachina
Copy link
Collaborator

@dimaMachina dimaMachina commented Oct 30, 2024

The Guild Blog x Nextra 4. The first our website was migrated to the new Nextra

  • App Router
  • Turbopack on dev mode (made compatible guild-components)
  • Next.js Metadata API
  • New blog structure by years aka (2024) (as blogs grow it isn’t very pleasant to have big folders). I split them to years folders (programmatically)
  • Your static assets can be live inside blog folders themselves, no need to put them to /public
    next.config.ts
  • removed RSS generator script and replaced it with route handler feed.xml/route.ts
  • removed stitches (no longer maintained)
  • removed <LinkPreview> (seems broken for a long time, it should do fetch request to /api/link-preview? I replaced by markdown links
  • ESM postcss.config.js
  • removed <OgCard> and replaced by markdown links
  • fixed <Tweet> component to make rounded corners
  • no more theme.config.tsx file
  • removed favicon.ico ’s and replaced it with file-based icon.svg (change primary color to dark/white according to user appearance settings)
  • new 404 page with referrer included in the issue title

TODO:

  • need take a look why search doesn't work (locally work after build)
  • update instructions to create new blog according new structure

Copy link

github-actions bot commented Nov 4, 2024

💻 Website Preview

The latest changes are available as preview in: https://0f67b238.guild-dev-website.pages.dev

Comment on lines +1 to +12
<svg viewBox="0 0 32 34" xmlns="http://www.w3.org/2000/svg">
<style>
@media (prefers-color-scheme: dark) {
svg {
fill: #fff;
}
}
</style>
<path
d="M1.31588 12.7654C1.71365 12.899 2.1379 12.9749 2.58074 12.9749C2.9785 12.9749 3.36216 12.9148 3.72448 12.806V23.1377C3.72448 23.5028 3.92198 23.843 4.24061 24.0256L14.2562 29.7711C14.73 29.2217 15.4316 28.8719 16.2151 28.8719C17.0677 28.8719 17.8223 29.2863 18.2927 29.9211C18.301 29.9328 18.3099 29.9437 18.3182 29.955C18.3512 30.0015 18.3822 30.049 18.4121 30.0979L18.4465 30.1536C18.473 30.1987 18.4974 30.2445 18.5208 30.291C18.5336 30.316 18.5456 30.3413 18.5576 30.3666C18.5776 30.4097 18.5965 30.4534 18.6144 30.4979C18.6271 30.5297 18.6385 30.5615 18.6499 30.5936C18.6643 30.6343 18.6784 30.6753 18.6905 30.7167C18.7022 30.756 18.7114 30.7956 18.7214 30.8353L18.7472 30.9471C18.7572 30.9967 18.7637 31.0469 18.7706 31.0975C18.7744 31.1276 18.7803 31.157 18.783 31.1871C18.7909 31.2691 18.7957 31.3519 18.7957 31.436C18.7957 31.57 18.7823 31.7002 18.762 31.8288L18.7548 31.8766C18.5439 33.0811 17.4865 34 16.2151 34C15.0813 34 14.1183 33.2687 13.7724 32.2568L3.03631 26.0983C1.97137 25.4878 1.31588 24.3589 1.31588 23.1377V12.7654ZM29.4194 6.47938C30.8425 6.47938 32 7.62943 32 9.04341C32 9.81262 31.6559 10.5018 31.1143 10.9722V23.1377C31.1143 24.3589 30.4588 25.4878 29.3939 26.0983L20.1697 31.3895C20.1594 30.5239 19.8648 29.727 19.3762 29.0812L28.1896 24.0256C28.5082 23.843 28.7057 23.5028 28.7057 23.1377V11.5056C27.6291 11.1972 26.8387 10.2112 26.8387 9.04341C26.8387 8.47488 27.0283 7.95079 27.3449 7.52516C27.3497 7.51833 27.3549 7.51183 27.3597 7.50499C27.4195 7.42636 27.4835 7.35047 27.5517 7.27902L27.561 7.2691C27.7024 7.12278 27.8607 6.9939 28.0334 6.88415C28.0513 6.87253 28.0702 6.86193 28.0884 6.85065C28.1569 6.80997 28.2268 6.77168 28.299 6.73715C28.32 6.72724 28.341 6.7163 28.3623 6.70672C28.4528 6.66638 28.545 6.62912 28.6407 6.59938C28.641 6.59938 28.641 6.59938 28.641 6.59903L28.8283 6.54774C29.0183 6.50323 29.216 6.47938 29.4194 6.47938ZM25.8925 12.0075V20.4873C25.8925 21.4917 25.3485 22.4277 24.4732 22.9299V22.9303L17.5753 26.8827L16.9388 27.2293L16.9463 26.5039V23.4974L22.6237 20.2408V17.2583L17.7911 15.8918L25.8925 12.0075ZM6.53772 12.0024L9.80652 13.5956V20.2405L15.3979 23.4479V27.1983L7.95707 22.9304C7.08172 22.4278 6.53772 21.4918 6.53772 20.4873V12.0024ZM14.7957 6.27607C15.6576 5.78207 16.7725 5.78207 17.6344 6.27607L25.2018 10.638L24.4827 10.9761L21.6753 12.3446L16.215 9.2124L10.7548 12.3446L7.23958 10.6308L7.91502 10.2267C7.92121 10.2213 7.93876 10.2096 7.95769 10.199L14.7957 6.27607ZM16.215 0C16.8092 0 17.4031 0.152474 17.9354 0.457765L27.2144 5.7807C26.5314 6.23812 26.0028 6.90306 25.7121 7.68184L16.7311 2.53053C16.5746 2.44028 16.396 2.3931 16.215 2.3931C16.034 2.3931 15.8558 2.44028 15.6989 2.53053L5.11998 8.59908C5.14545 8.74369 5.16127 8.89138 5.16127 9.04352C5.16127 10.1467 4.45521 11.0865 3.46941 11.4476C3.46184 11.4503 3.45392 11.4534 3.44635 11.4558C3.36825 11.4834 3.28911 11.5074 3.2079 11.5276L3.15939 11.5399C3.08507 11.557 3.00902 11.5703 2.93264 11.5809L2.87036 11.5901C2.77505 11.6007 2.6787 11.6075 2.58064 11.6075C2.47569 11.6075 2.37247 11.5993 2.27027 11.587C2.24275 11.5836 2.21591 11.5788 2.18872 11.5747C2.11027 11.5628 2.0332 11.5474 1.95716 11.5286C1.93376 11.5228 1.91036 11.5173 1.88696 11.5108C1.68567 11.4544 1.49436 11.3761 1.31578 11.2759L1.1624 11.1827C0.463092 10.7237 0 9.93694 0 9.04352C0 7.62954 1.15785 6.47948 2.58064 6.47948C2.94984 6.47948 3.30012 6.55811 3.61771 6.69725L14.4946 0.457765C15.0269 0.152474 15.6211 0 16.215 0Z"
/>
</svg>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this favicon is dark on light appearance settings and light on dark!

Comment on lines -1 to -11
declare module '.next/static/chunks/nextra-page-map-.mjs' {
// eslint-disable-next-line @typescript-eslint/no-explicit-any -- reexport PageMapItem from nextra in components
let pageMap: any[];
export { pageMap };
}

declare module '*/[tag].mdx' {
let getStaticPaths: () => Promise<{ paths: { params: { tag: string } }[] }>;

export { getStaticPaths };
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

legacy, from nextra 3

@dimaMachina dimaMachina changed the title update blog to nextra 4 The Guild Blog x Nextra 4 Nov 4, 2024
@dimaMachina dimaMachina marked this pull request as ready for review November 4, 2024 01:47
@dimaMachina dimaMachina requested a review from saihaj November 4, 2024 02:12
readme.md Outdated Show resolved Hide resolved
readme.md Outdated Show resolved Hide resolved
Comment on lines +20 to +50
.flatMap(blog => {
if (blog.name === 'index') {
return [];
}
const { title, description, tags, authors, image, date, updateDate, thumbnail, canonical } =
blog.frontMatter;
const { route } = blog;

if (title.length > 70) {
throw new Error(
`SEO issue: The title "${title}" is too long, should be less than 70 characters - route ${route}`,
);
}

if (title.length < 20) {
throw new Error(
`SEO issue: The title "${title}" is too short, should be more than 20 characters - route ${route}`,
);
}

if (description.length > 160) {
throw new Error(
`SEO issue: The description "${description}" is too long, should be less than 160 characters, not ${description.length}, route "${route}"`,
);
}

if (description.length < 50) {
throw new Error(
`SEO issue: The description "${description}" is too short, should be more than 50 characters, not ${description.length}, route "${route}"`,
);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can refactor it to use zod, since it's validated on server

website/app/layout.tsx Outdated Show resolved Hide resolved
Copy link
Member

@saihaj saihaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for landing page something changed the title of the landing page. We should improve the title for our landing page

CleanShot 2024-11-04 at 12 58 56@2x

Some ideas

  • Build. Integrate. Succeed: Expert Guidance for Your API Journey
  • Harness the Power of GraphQL API
  • Unlock Success in GraphQL: Tailored Support and Solutions

I prefer the first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants