Hey, thanks for contributing!
Content presentation is controlled by the config file course-structure.json
. All content is in the content
directory sorted by the slug in course-structure.json
. Static assets are in the assets
directory.
If you'd like to add content, please start by creating an issue and tagging @jamesrp13 to discuss your reasoning, plan, and timeline.
Once a plan has been discussed and agreed to, you can start working on content. When you're done, create a PR to the draft
branch.
Create new modules in the same format as the existing modules - see Getting Started
If you want to fix a typo or otherwise improve on existing content, follow a similar process as with adding content:
- Create an issue and/or comment on an existing issue to state you've started working
- Create a PR to the
draft
branch during or when complete
Use language consistent with TERMINOLOGY. In particular:
- Use 'secret key' rather than 'private key'.
- Use 'wallet app' for software. 'wallet' for the address that holds value.
- Use 'SOL' rather than 'Sol' to refer to Solana's native token
- PDAs are not public keys. It is not possible to have a public key without a secret key. A public key is derived from a secret key, and it is not possible to generate a public key without first generating a secret key.
- Use the specific term 'associated token account' if that's what you're referring to, same for 'token mint account'. A 'token account' is any account formatted to hold tokens, and being specific (rather than say swapping between 'associated token account' and 'token account' makes this clearer.
- Use apostrophe of possession, including for inanimate objects. Eg 'the account's balance' is correct.
Code examples should be formatted as follows:
- JS/TS - two spaces per prettier defaults, StandardJS, node style guide, idiomatic JS, AirBnB style guide, MDN, Google Style guide, codepen, jsfiddle, etc.
- Rust: four spaces per rustfmt
Diagrams:
- If you draw Solana elliptic curves, these are Edwards curves
- Use SVG so diagrams look good on different resolutions
- We like Whimsical for diagrams
Note that while prettier
can format Markdown, prettier doesn't support language-specific settings inside Markdown files so you'll need to format the code yourself for now.
We are using conventional commits for this repository.
General flow for making a contribution:
- Fork the repo on GitHub
- Clone the project to your own machine
- Check out the
draft
branch - Make a new branch based on
draft
and add your contributions - Push your work back up to your fork on GitHub
- Submit a Pull request so that we can review your changes
Content is controlled by the config file course-structure.json
. All content is in the content
dir sorted by the slug in course-structure.json
.
Use the terms at https://docs.solana.com/terminology
Static assets are in assets
. This is set in svelte.config.js
to match the older soldev-ui directory.
![Some alt text](../assets/somefile.svg)
Use SVG where possible (they'll look better on different screens). You ca get an SVG export from Whimsical by appending /svg
to the end of a Whimsical URL.
Components are individual Svelte files, in the /src/lib/components
directory.
Routes (pages) are in /src/lib/routes
npm run dev -- --open
Once you've created a project and installed dependencies with npm install
, start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.
In order for the course structure to be maintained, localized files need to adhere to the following rules:
- Localized lesson files should be in a subdirectory of
content
named after the language abbreviation. For example, lessons translated into Spanish should be housed incontent/es
. - Localized asset files should be in a subdirectory of
assets
named after the language abbreviation. For example, assets localized into Spanish should be housed inassets/es
. - File names for localized files must be identical to their English counterpart. To be clear, do not translate file names. The file name is used as the slug for the article and must be identical between languages.