Merge pull request 'development_docs_inca_basic' (#100) from development_docs_inca_basic into development

Reviewed-on: #100
This commit is contained in:
mik-tf 2024-06-14 16:32:30 +00:00
commit b37e1967c9
18 changed files with 306 additions and 0 deletions

21
docs_projectinca/.gitignore vendored Normal file
View File

@ -0,0 +1,21 @@
# build output
dist/
# generated types
.astro/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store

View File

@ -0,0 +1,3 @@
run:
npm install
npm run dev

103
docs_projectinca/README.md Normal file
View File

@ -0,0 +1,103 @@
<h1> Project INCA Docs </h1>
<h2>Table of Contents</h2>
- [Introduction](#introduction)
- [Prerequisites](#prerequisites)
- [Install the prerequisites on Ubuntu](#install-the-prerequisites-on-ubuntu)
- [Install the prerequisites on MAC or Linux with Brew](#install-the-prerequisites-on-mac-or-linux-with-brew)
- [Check if the Prerequisites Are Installed](#check-if-the-prerequisites-are-installed)
- [Clone the Repository](#clone-the-repository)
- [Preview the Website](#preview-the-website)
- [License](#license)
- [References](#references)
- [Contribute](#contribute)
---
## Introduction
This subrepository contains the code to deploy the Project INCA Docs website, a project by [ThreeFold](https://threefold.io).
## Prerequisites
You need [npm](https://www.npmjs.com/) to run this website.
To clone the repository, you need `git`.
To use the Makefile for quick deployment, you need `make`
### Install the prerequisites on Ubuntu
```
sudo apt update
sudo apt install nodejs
sudo apt install git
sudo apt install make
```
### Install the prerequisites on MAC or Linux with Brew
- [Install Brew](https://brew.sh/)
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
- Install the prerequisites
```
brew install node
brew install git
brew install make
```
### Check if the Prerequisites Are Installed
```
npm --version
git version
make --version
```
## Clone the Repository
```
git clone https://git.ourworld.tf/tfgrid/info_tfgrid
cd info_tfgrid/docs_projectinca
```
For more information, read the original [AstroWind docs](./docs_starlight/starlight_README.md).
## Preview the Website
You can preview the website with those two lines.
```
npm install
npm run dev
```
The equivalent can be achieved using the Makefile:
```
make run
```
## License
**INCA Docs** is licensed under the Apache 2.0 license — see the [LICENSE](../LICENSE.md) file for details.
## References
This Project INCA Docs website is based on the amazing [AstroWind Starlight repo](https://github.com/withastro/starlight).
We changed the license from MIT to Apache 2.0 to suit this specific project.
## Contribute
To contribute to this repository:
- Make a new branch with `development_` as a prefix (e.g. `development_update`)
- Make changes locally on your code editor
- Push changes to the new branch
- Make a pull request to `development` branch
The code owners will merge `development` branch to `main` branch.

View File

@ -0,0 +1,27 @@
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
// https://astro.build/config
export default defineConfig({
integrations: [
starlight({
title: 'Project INCA Docs',
social: {
github: 'https://github.com/threefoldtech',
},
sidebar: [
{
label: 'Start Here',
items: [
// Each item here is one entry in the navigation menu.
{ label: 'Getting Started', link: '/start_here/getting_started/' },
],
},
{
label: 'Reference',
autogenerate: { directory: 'reference' },
},
],
}),
],
});

View File

@ -0,0 +1,54 @@
# Starlight Starter Kit: Basics
[![Built with Starlight](https://astro.badg.es/v2/built-with-starlight/tiny.svg)](https://starlight.astro.build)
```
npm create astro@latest -- --template starlight
```
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics)
[![Open with CodeSandbox](https://assets.codesandbox.io/github/button-edit-lime.svg)](https://codesandbox.io/p/sandbox/github/withastro/starlight/tree/main/examples/basics)
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fwithastro%2Fstarlight%2Ftree%2Fmain%2Fexamples%2Fbasics&project-name=my-starlight-docs&repository-name=my-starlight-docs)
> 🧑‍🚀 **Seasoned astronaut?** Delete this file. Have fun!
## 🚀 Project Structure
Inside of your Astro + Starlight project, you'll see the following folders and files:
```
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ ├── docs/
│ │ └── config.ts
│ └── env.d.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
```
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
Static assets, like favicons, can be placed in the `public/` directory.
## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :------------------------ | :----------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:4321` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI |
## 👀 Want to learn more?
Check out [Starlights docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).

View File

@ -0,0 +1,19 @@
{
"name": "",
"type": "module",
"version": "0.0.1",
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.7.0",
"@astrojs/starlight": "^0.24.2",
"astro": "^4.10.2",
"sharp": "^0.32.5",
"typescript": "^5.4.5"
}
}

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M81 36 64 0 47 36l-1 2-9-10a6 6 0 0 0-9 9l10 10h-2L0 64l36 17h2L28 91a6 6 0 1 0 9 9l9-10 1 2 17 36 17-36v-2l9 10a6 6 0 1 0 9-9l-9-9 2-1 36-17-36-17-2-1 9-9a6 6 0 1 0-9-9l-9 10v-2Zm-17 2-2 5c-4 8-11 15-19 19l-5 2 5 2c8 4 15 11 19 19l2 5 2-5c4-8 11-15 19-19l5-2-5-2c-8-4-15-11-19-19l-2-5Z" clip-rule="evenodd"/><path d="M118 19a6 6 0 0 0-9-9l-3 3a6 6 0 1 0 9 9l3-3Zm-96 4c-2 2-6 2-9 0l-3-3a6 6 0 1 1 9-9l3 3c3 2 3 6 0 9Zm0 82c-2-2-6-2-9 0l-3 3a6 6 0 1 0 9 9l3-3c3-2 3-6 0-9Zm96 4a6 6 0 0 1-9 9l-3-3a6 6 0 1 1 9-9l3 3Z"/><style>path{fill:#000}@media (prefers-color-scheme:dark){path{fill:#fff}}</style></svg>

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

View File

@ -0,0 +1,6 @@
import { defineCollection } from 'astro:content';
import { docsSchema } from '@astrojs/starlight/schema';
export const collections = {
docs: defineCollection({ schema: docsSchema() }),
};

View File

@ -0,0 +1,10 @@
---
title: Get Started
description: Earn INCA rewards by hosting nodes
---
Earn INCA rewards by hosting nodes
## Get a Node
- Visit the official INCA website to [get INCA nodes](https://internetcapacity.org/)

View File

@ -0,0 +1,36 @@
---
title: Welcome to the Project INCA Docs
description: Get started building your docs site with Starlight.
template: splash
hero:
tagline: Learn how to deploy INCA nodes to earn rewards!
image:
file: ../../assets/hero_host3.png
actions:
- text: Get Started
link: /guides/getstarted/
icon: right-arrow
variant: primary
- text: Visit the website
link: https://internetcapacity.org/
icon: external
---
import { Card, CardGrid } from '@astrojs/starlight/components';
## Become a Cloud Service Provider
<CardGrid stagger>
<Card title="Learn about INCA" icon="open-book">
Read the [INCA Docs](/guides/getstarted) to learn about the ecosystem.
</Card>
<Card title="Get INCA Nodes" icon="add-document">
You can get INCA nodes at the [official INCA website](https://internetcapacity.org/farming/).
</Card>
<Card title="Part of a Worldwide Grid" icon="setting">
Project INCA is the fourth version of the [ThreeFold Grid](https://threefold.io/) available in 60+ countries!
</Card>
<Card title="Earn INCA Rewards" icon="open-book">
When you deploy INCA nodes, you contribute to the growth of the grid and earn INCA rewards!
</Card>
</CardGrid>

View File

@ -0,0 +1,11 @@
---
title: Example Reference
description: A reference page in my new Starlight docs site.
---
Reference pages are ideal for outlining how things work in terse and clear terms.
Less concerned with telling a story or addressing a specific use case, they should give a comprehensive outline of what you're documenting.
## Further reading
- Read [about reference](https://diataxis.fr/reference/) in the Diátaxis framework

View File

@ -0,0 +1,10 @@
---
title: Get Started
description: Earn INCA rewards by hosting nodes
---
Earn INCA rewards by hosting nodes
## Get a Node
- Visit the official INCA website to [get INCA nodes](https://internetcapacity.org/)

2
docs_projectinca/src/env.d.ts vendored Normal file
View File

@ -0,0 +1,2 @@
/// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" />

View File

@ -0,0 +1,3 @@
{
"extends": "astro/tsconfigs/strict"
}