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 Guides Big Doc Update #137

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

tonyboylehub
Copy link
Collaborator

@tonyboylehub tonyboylehub commented Jun 26, 2024

Lots of things changed in this update. From styling to components that I needed to make these new guides look good.

Styling

  • Flattened out all blues to neutral greys since we no longer have the blue background which gives the site a more cohesive look.
  • Widened the intial site content to 1200px which gives the site so much more room to breath in regards to reading code from the site.

Copy Button

I built a copy bottom that is now applied to all code blocks automatically.

Page and Guide Metadata + Flags

Markdown pages have new metadata in the form of created and updated in wonky format (US).

---
title: How to Create an Nft On Solana
metaTitle: How to Create an Nft On Solana
description: Learn how to create an Nft on the Solana blockchain with Metaplex packages.
# remember to update dates also in /components/guides/index.js
created: '06-16-2024'
updated: '06-18-2024'
---

This enables all pages to now support the new and updated flags which will show little badges in the navigation menu.
This is currently set for a 7 day period before the flag will dissappear for both create and update.

The JS product navigation files at the moment also need updating and I've also added created and updated fields to those. This will cover the navigation badges while the mark down pages will cover the created and updated text I've now put at the bottom of every page (if there is a date present).

I'd like to get this resolved so it's in one place rather than syncing and rememeber to update two areas of the site but that's a future Tony problem (or anyone that wants to look at it).

So for now if you are writing a Core page you'll need to sync and update the created/updated times in both the Markdown page and the /products/core/index.js in the navigation links.

New Component - PackagesUsed

This is a new component that I created with the intent of simplying some of the boiler plate for writing guides. At the moment it just generates either npm or crate install badges that link to both npm and crates.io

Heres an npm example where you can use shorthand for all the metaplex packages due to the /helperComponents/packages.js which is an object of Metaplex packages and their respective data. Anything that isn't a Metaplex package can be inserted as a full package string and it will skip the processing.

{% packagesUsed packages=["umi", "umiDefaults" ,"tokenMetadata", "core", "@solana/spl-token"] type="npm" /%}

I will extend this soon to also incorporate all the basic installation boiler plate of the project so I can generate all the npm i and crate add install commands.

Same thing with Umi also. I want to standardise the opening of the guides so we can generate all the umi installation, imports and prep docs with just a simple function like above and just boilerplate it all.

Guides

We now have a new guides area over at /guides. This is for more generic guides that we wish to be ranking for that we can discuss.

  • Removed the hero banner from the guides area as it was uneeded and allows the navigation and content to sit so much higher on the page.

Starting Guides and Areas

Solana Newcomers

Overview of Solana and how it works in a simple easy to understand manner.

Javascript

All generic javascript guides will go here such as

  • Creating an Nft
  • Creating a Token
  • Transfering Sol/Tokens

Rust

All generic rust guides will go here like above

React/NextJs

  • How to connect Wallet Adapter to Nextjs
  • How to setup Umi with NextJS
    etc...

Program Guides

These will link out their respective guides areas

  • Core (/core/guides)
  • Token Metadata (/token/metadata)
    etc...

Copy link

vercel bot commented Jun 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
developer-hub ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2024 8:57am

Copy link
Contributor

Choose a reason for hiding this comment

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

I think in addition to a PDA guide, we might want a CPI guide that discusses both privilege extension for mutability and signatures, and makes way for the concept of PDAs as program signers during a CPI, which we might want to elaborate on more in the PDA section.

CPIs and PDAs are the first "intermediate" type material that's harder to understand than basic program concepts, and I remember looking for better explainers for those concepts multiple times when I was starting out.

---
title: Where Do I Start With Solana?
metaTitle: Where Do I Start With Solana?
description: An overiew of the Solana ecosystem frameworks and where to research.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: typo

Comment on lines +10 to +11
## Roles of an RPC on the Solana Blockchain
Remote Procedure Calls (RPCs) are a crucial part of the Solana blockchain infrastructure. They serve as the bridge between users (or applications) and blockchain, facilitating interactions and data retrieval.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it worth here or somewhere else calling out the role of validators? When I first started out I remember wondering who were validators vs. RPC providers.

PDAs are primarily used to:

- **Manage State**: PDAs allow programs to store data in a determinstic address, making reading that state back easy.
- **Authorize Transactions**: Only the program that owns the PDA can authorize transactions involving it, ensuring controlled access.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why PDAs cannot be controlled by a private key here?

The signing transactions parts also relates to my other comment on CPI.

Comment on lines +9 to +11
The guides in this section are **designed to help new Solana developers start their journey** by providing step-by-step instructions and practical examples. Recognizing the complexity of learning blockchain technology, these guides focus on teaching key concepts with a structured learning path that gradually introduces developers to the Solana ecosystem. They cover everything from the basics of blockchain and Solana's unique features to advanced topics such as smart contract development and optimization techniques.

By incorporating a variety of learning resources, including tutorials and code samples, **the guides are accessible to all levels of expertise**. They emphasize hands-on experience, encouraging developers to build and deploy their own applications since this practical approach not only reinforces theoretical knowledge, but also boosts confidence and competence. Additionally, the guides are regularly updated to reflect the latest developments in the Solana ecosystem, ensuring that new developers have access to current information and best practices.
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this is it much more concise then the last rev.

wdyt about removing "but also boosts confidence and competence."

and possibly "ensuring that new developers have access to current information and best practices."

Those two still seem slightly extra sounding to me, wdyt?

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.

None yet

3 participants