Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
catalinred committed Jul 9, 2024
0 parents commit a23ce71
Show file tree
Hide file tree
Showing 1,153 changed files with 81,046 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# EditorConfig

# This is the top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
indent_size = 4

# All shell scripts are Bash scripts.
[*.sh]
shell_variant = bash
switch_case_indent = true
16 changes: 16 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# YouTube keys for getting videos & info from channel
YOUTUBE_CHANNEL_ID=
YOUTUBE_API_KEY=
# Simplecast
SIMPLECAST_PODCAST_ID=
SIMPLECAST_API_KEY=
# Developer Content API
DEVELOPER_CONTENT_GH_ORG=
DEVELOPER_CONTENT_GH_REPO=
DEVELOPER_CONTENT_API_KEY=
NEXT_PUBLIC_DEVELOPER_CONTENT_API_URL=
# LUMA
LUMA_PRIVATE_API_KEY=
# Builder
NEXT_PUBLIC_BUILDER_API_KEY=
NEXT_PUBLIC_BUILDER_NEWS_SETTINGS_ID=
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public
packages
coverage
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extends": "next/core-web-vitals",
"env": {
"browser": true,
"node": true,
"es6": true
},
"rules": {
"@next/next/no-img-element": 0,
"@next/next/no-sync-scripts": 0,
"jsx-a11y/alt-text": 0,
"strict": 0,
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"react/display-name": 0,
"react-hooks/exhaustive-deps": 1,
"react/prop-types": 0,
"react/react-in-jsx-scope": 0
},
"settings": {
"react": {
"version": "detect"
}
}
}
12 changes: 12 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: "🐛 Bug Report"
about: Report a reproducible bug or regression.
title: "Bug: "
labels: "Status: Unconfirmed"
---

## Steps To Reproduce

## The current behavior

## The expected behavior
40 changes: 40 additions & 0 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: node_js
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
Format:
name: Test formatting...
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js node
uses: actions/setup-node@v2
with:
node-version: "18"
- name: before_install
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: installing_yarn
run: yarn install
- name: formatting
run: yarn format
stage:
name: Test linting...
needs: Format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js node
uses: actions/setup-node@v2
with:
node-version: "18"
- name: before_install
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: installing_yarn & lint
run: |
yarn install
yarn run lint
42 changes: 42 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Dependency directories
node_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# dotenv environment variables file
.env
!.env.example

# Next.js build output
.next

# Mac
.DS_Store

# Vercel configurations
.vercel

# Template outputs
templates/*.html

# Sitemap (generated on postbuild)
public/sitemap*

coverage
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
yarn format
yarn lint
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
public
packages
.vercel
.next
coverage
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all"
}
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Contributing to solana.com

We really appreciate your input, and that's why we've made solana.com an open-source project! We're all about keeping things easy and transparent when it comes to contributing to the site, whether it's:

- Reporting a bug
- Submitting a fix
- Discussing the current state of this repo
- Proposing new features

## Avoid official recommendations

Avoid any language around making "official recommendations" such as "I recommend
product X" or "Product Y is the best". The content within this repo will be
publicly published on solana.com which is maintained by the
[Solana Foundation](https://solana.org). As such, any "product recommendations"
may appear as if coming directly from the Solana Foundation. The Solana
Foundation does not make official recommendations for products but rather helps
share what options are available in the broader Solana ecosystem.

## Avoid "picking favorites"

Avoid language similar to "service X is my favorite". When talking about or
naming specific products within the Solana ecosystem, writers and maintainers
should make their best attempt to list multiple options that meet similar use
cases. As a general rule of thumb, try to share at least 3-4 options of similar
products or services, not just a single named one. For example, when talking
about wallet providers, a writer could list Phantom, Solflare, Backpack, and
Ultimate. When talking about RPC providers, a writer should link to
[solana.com/rpc](https://solana.com/rpc) instead of listing specific names.

## Use up-to-date code snippets

Write content that uses up-to-date code. Code bases change, functions get
deprecated, and methods get removed. When submitting code snippets within the
content here, use the most up-to-date code available for the given functionality
being used. Especially net new content, like adding a new guide.

## Style guidelines

To aid in keeping both consistent content and a high-quality experience, all
code/content maintained within this repo shall use the style guidelines set
forth here.

Failure to adhere to these style guidelines will slow down the review process
and block approval/merging.

## Crowdin localization

Translations are handled via the Crowdin platform. The content within this repo is in the default/base language of English. When the content is uploaded to the Crowdin platform, it will be broken into small strings where people that have access can perform translations.

## Developer Content API

The majority of the content within the developer specific sections of solana.com (e.g. `/developers` and `/docs`) are driven from the [`developer-content`](https://github.com/solana-foundation/developer-content) repo which deploys an API for `solana-com` to consume via the [`ContentApi` class](/src/utils/contentApi.ts).

This class defaults to the public API endpoint of `https://solana-developer-content.vercel.app`.

For local development and testing of developer content changes, you can run the `developer-content` API locally and set the `NEXT_PUBLIC_DEVELOPER_CONTENT_API_URL` env variable to use your local instance to view your changes within the UI of `solana-com`:

```conf
NEXT_PUBLIC_DEVELOPER_CONTENT_API_URL="http://localhost:3001"
```

> Note: This assumes the `developer-content` API is running on port `3001` (which it is configured to do so by default)
## Builder API

The blog content located at `/news` and most of the landing pages under `/solutions` utilize Builder.io, a headless CMS integrated with our current Next.js project.

```conf
NEXT_PUBLIC_BUILDER_API_KEY=""
NEXT_PUBLIC_BUILDER_NEWS_SETTINGS_ID=""
```

> Note from Builder [docs](https://www.builder.io/c/docs/using-your-api-key): The Builder Public API Key is public, meaning that you don't have to keep it private.
Loading

0 comments on commit a23ce71

Please sign in to comment.