Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0ba6530
feat: moved docs icons to astro
Oct 28, 2025
c82815a
feat: added index page
Oct 30, 2025
85be69e
feat: added mdsvex
Nov 13, 2025
01b28a8
chore: added remark and katex plugins
Nov 13, 2025
402918c
feat: added custom markdown components
Nov 14, 2025
c119669
feat: added aliases
Nov 14, 2025
3cffee2
feat: get rid of mdsvex to astro mdx
Nov 14, 2025
d02def4
feat: added sharp
Nov 14, 2025
bc13286
feat: added breakcrumbs
Nov 19, 2025
11271a9
feat: added codeblock
Nov 28, 2025
22081fa
chore: added remark-gemoji
Nov 28, 2025
5d150e1
feat: added heading styles
Nov 28, 2025
fc8eaa5
feat: changed all articles to mdx and added headings component
Nov 28, 2025
6639132
feat: removed legacy markdown logic
Nov 28, 2025
ecf479c
fix: fixed index page illuses hover
Nov 29, 2025
bd23876
feat: added article headings
Nov 29, 2025
05f3b8d
chore: added pagefind
Nov 29, 2025
51dcae5
feat: added right imports to mdx files
Nov 30, 2025
7b66529
feaet: get rid of scss modules
Dec 1, 2025
88dbf6d
fix: fixed blank page issue
Dec 3, 2025
9bbfe7d
feat: added 404
Dec 3, 2025
0d5381c
feat: restructured folders
Dec 3, 2025
c6bda2c
chore: renamed guide folder
Dec 3, 2025
207800f
feat: added changelog page
Dec 5, 2025
43ca9db
feat: added pagefinder tooltip
Dec 5, 2025
dde8ac6
feat: added katex css
Dec 5, 2025
e56bb60
feat: sidebar improvements
Dec 5, 2025
b355cc6
feat: added heading copy
Dec 8, 2025
fb2f053
feat: added astro expressive code
Dec 13, 2025
5709a22
fix: styles
Dec 13, 2025
5b7618a
Merge branch 'master' into refactor/astro
Dec 13, 2025
80cc6b3
fix: data anomalies section fixes
Dec 13, 2025
1704079
fix: simplified docs layout
Dec 14, 2025
e8f638f
feat: added mobile navigation
Dec 15, 2025
fc1a5ca
fix: removed details custom component
Dec 15, 2025
6f69018
refactor/file-structure
Dec 16, 2025
95d4cb7
refactor/file-structure
Dec 16, 2025
108df42
fix: file extensions
Dec 17, 2025
2a0408c
fix: file extensions
Dec 17, 2025
45d9d7b
Merge branch 'refactor/astro' into refactor/file-structure
Dec 17, 2025
39a931a
feat: added sidebarOrder property and reordered the list
Dec 17, 2025
e130bc4
feat: added articles orders
Dec 17, 2025
000b974
feat: getting started section links update
Dec 18, 2025
e2b826b
feat: links update
Dec 18, 2025
21a100f
Merge branch 'refactor/astro' into refactor/file-structure
Dec 22, 2025
d2c3ffa
feat: added legacy sections support
Dec 18, 2025
2369a69
feat: sidebar update
Dec 19, 2025
5589d52
feat: moved docs to content (astro way)
Dec 19, 2025
77abaf4
refactor: folder structure
Dec 19, 2025
ff4f50d
feat: get rid of services folder
Dec 20, 2025
c7a069c
feat: updated prettierrc
Dec 20, 2025
0b3b4d2
feat: renamed layout files
Dec 20, 2025
19e58a8
feat: update sidebar schema for docs content
Dec 20, 2025
d9e10ba
fix: relatedProduct
Dec 20, 2025
6b9ad72
feat: connected mobile sidebar
Dec 20, 2025
5c7c541
feat: moved integrations to components
Dec 21, 2025
9591791
feat: covered changelog with types
Dec 21, 2025
6093998
fix: 404 page bg
Dec 21, 2025
4da16ea
feat: updated README.md
Dec 21, 2025
4c2cb77
feat: data anomaly updates
Dec 22, 2025
0aa3718
feat: removed index.mdx rule
Dec 22, 2025
b7fcbc0
feat: updated readme.md
Dec 22, 2025
d29482c
feat: get rid of sections
Dec 22, 2025
83d2b53
feat: flat structure support
Dec 22, 2025
b3f6095
fix: consistency checks
Dec 24, 2025
2618881
feat: added `dateModified` field
Dec 26, 2025
9922108
feat: added `datePublished` field
Dec 26, 2025
2e1231b
chore: enforce LF line endings and normalize content dates
Dec 26, 2025
8fd0db4
feat: added date published to LastUpdated component
Dec 27, 2025
75c292f
fix: brokens links update
Dec 28, 2025
739dc1d
fix: moved absolute links to relative
Dec 28, 2025
e4edbf4
fix: discord cta and seo update
Dec 29, 2025
955bbf0
feat: added sitemap generation
Dec 29, 2025
970c406
feat: updated Jenkinsfile
Jan 12, 2026
d7c3694
fix: tableOfContents
Jan 12, 2026
790f507
Merge pull request #554 from santiment/refactor/file-structure
serafim-san Jan 12, 2026
c35b1ee
feat: ignore yarn.lock
Jan 12, 2026
306514b
Merge branch 'master' into refactor/astro
Jan 12, 2026
8f40f0f
feat: updated docs
Jan 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
110 changes: 110 additions & 0 deletions .docs/GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# How to write Academy articles

## High-level file structure

![File Structure](./file_structure.png)

All pages seen on the website are located inside `src/content/docs/`.
For example all metrics articles are located inside src/docs/metrics/, pages about
Sanbase are inside `src/docs/guides/sanbase/`, etc.

This structure is very important for the visualization. It should be created inside the most appropriate directory, or if such directory is missing - create a new directory.

## Article-level file structure

When creating a new article, do the following steps:

- Decide on the article title. For the purpose of the example let's choose 'Trading and Transaction Volume'
- Locate the most appropriate directory where the article
- Create a new folder named `trading-and-transaction-volume` inside it. This directory name is important
and should reflect the name of the article itself. Usually it is the `snake-case` version of the title.
This directory name is important as we'll use it when we create links to that article.
- Create an `index.mdx` file inside that directory. The name is important. This will be the main/index page of
the article.

## Contents of the index.mdx file

### Header

Always start with the header structure, which looks like this.
Fields `title` and `datePublished` are mandatory.
`datePublished` field must not be update after article deploy.
Add field `dateModified` and write any changes thee instead.

```
---
title: Trading and Transaction Volume
author: Santiment Team
datePublished: 2025-05-13
---
```

![Header fields](./title_and_date.jpg)

The `title` and `dateModified` fields are displayed on the article page, as seen in the screenshot.

The `title` field will be transformed to an h1 HTML tag in the final page.
One page should have one h1 tag, holding the title. In Markdown this is usually represented
as a line starting with `#`, like:

`# Trading and Transaction Volume`.

As this is done automatically by us by defining the title, we should **not** use `# title` anywhere in the article thereafter.

Do not define the title second time with markdown!

### Youtube Video

If some video from our channel needs to be added, go to the youtube video and copy the `iframe`
that is produced when you click Share->Embed
![noborder](./embed_youtube_video_1.png)

Paste the copied iframe right after the header definition, if you wish to have the video right after the title on the final page.

### Subsections

As our title is defined in the header, all main subsections are defined as:

```
## Title of subsection 1
```

These subsections are shown as h2 titles in the HTML (smaller titles than the main title).
They are also shown in the right sidebar/map of the article.

![noborder](./subsections.png)

You can use `###`, `####`, etc. to further nest subsections.

You should be consistent -- all top-level subsections should be `##` and the subsections of these subsections should
be `###`, and so on.

### Links and images

#### Links

Markdown link syntax is: `[Link Text](Link URL)`. The link URL can be:

- External (link to sanbase) -- the full URL must be provided. Example: `[Sanbase](https://app.santment.net)`
- Internal -- point to some other page of Academy. These paths are relative. Relative paths allow you to link to stage
pages on stage and to prod pages on prod. Do not use full paths when linking to other Academy pages!

Example: `[NVT article](/metrics/nvt)`. The root of the relative path is the `/src/docs/` directory.

Standard relative path syntax works: `./` points to the current directory and `../` points to the parent directory.

The same rules apply to linking from other pages to your new article page.
If our example `Trading and Transaction Volume` article is located in the `Education and Use Cases` directory, then
the following syntax will create a link to our article: `[Trading and Transaction Volume](/education-and-use-cases/trading-and-transaction-volume/)`

#### Images

Markdown image syntax is `![noborder](Image path)`.

In almost all cases the image file is located in the same directory as the `index.md` file. If the image `img.png` is located
in the same directory, then the following syntax will add it `![noborder](./img.png)`. The `./` is the above-mentioned way to point
to the current directory.

Note: The `noborder` is Academy-specific and it removes borders from images. By default we prefer to not have borders.

Prefer adding the images to the directory of your article instead of using images hosted on some other server.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
96 changes: 23 additions & 73 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,86 +1,36 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
# build output
dist/
public/
public/pagefind/

# nyc test coverage
.nyc_output
# generated types
.astro/

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
# dependencies
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm
#svelte
.svelte-kit

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Output of 'npm pack'
*.tgz
# static
static/webkit
static/vendors
static/~partytown

# dotenv environment variables file
# environment variables
.env
.env.production

# gatsby files
.cache/
public

# Mac files
# macOS-specific files
.DS_Store

# Yarn
yarn-error.log
package-lock.json
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity

# jetbrains setting folder
.idea/

.tool-versions
.aider*


# web components

svelte-widgets/.svelte-kit
svelte-widgets/static/webkit

# mkcert

local.santiment.net.pem
local.santiment.net-key.pem
mkcert
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./src/content/docs/**/*.md
./src/content/docs/**/*.mdx
34 changes: 33 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,37 @@
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
"trailingComma": "all",
"plugins": [
"prettier-plugin-astro",
"prettier-plugin-svelte",
"@trivago/prettier-plugin-sort-imports",
"prettier-plugin-tailwindcss"
],
"importOrder": [
"^astro",
"^svelte",
"^san-webkit-next/(.*)$",
"^\\$layouts/(.*)$",
"^\\$components/(.*)$",
"^\\$modules/(.*)$",
"^\\$config/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"overrides": [
{
"files": "*.astro",
"options": {
"parser": "astro"
}
},
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
25 changes: 11 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
FROM debian:bullseye
FROM node:20-alpine AS base

RUN apt-get update && \
apt-get install -y \
python3 \
python3-dev \
python3-pip \
build-essential \
curl git
RUN apk add git
RUN npm install -g pnpm@8

RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs
ENV NODE_ENV production

WORKDIR /app

COPY ./ /app
COPY package.json pnpm-lock.yaml /app

ENV BACKEND_URL="globalThis.env?.BACKEND_URL"
RUN pnpm i --ignore-scripts --frozen-lockfile --prod --force

RUN npm install -g yarn --force && yarn install --production
FROM base AS builder
ARG BACKEND_URL

RUN yarn build
COPY . /app

RUN pnpm build
42 changes: 32 additions & 10 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
podTemplate(label: 'academy-builder', containers: [
containerTemplate(name: 'docker', image: 'docker', ttyEnabled: true, command: 'cat', envVars: [
envVar(key: 'DOCKER_HOST', value: 'tcp://docker-host-docker-host:2375')
])
]) {
node('academy-builder') {
@Library('podTemplateLib')
import net.santiment.utils.podTemplates

properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '30', artifactNumToKeepStr: '', daysToKeepStr: '30', numToKeepStr: ''))])

slaveTemplates = new podTemplates()

slaveTemplates.dockerTemplate { label ->
node(label) {
stage('Build') {
container('docker') {
def scmVars = checkout scm
def gitHead = scmVars.GIT_COMMIT.substring(0,7)

if (env.BRANCH_NAME == "master") {
if (env.BRANCH_NAME == "main") {
withCredentials([
string(
credentialsId: 'SECRET_KEY_BASE',
variable: 'SECRET_KEY_BASE'
),
string(
credentialsId: 'aws_account_id',
variable: 'aws_account_id'
)
]) {
def awsRegistry = "${env.aws_account_id}.dkr.ecr.eu-central-1.amazonaws.com"
docker.withRegistry("https://${awsRegistry}", "ecr:eu-central-1:ecr-credentials") {
sh "docker build --build-arg BACKEND_URL=https://api-stage.santiment.net -t ${awsRegistry}/academy:stage -t ${awsRegistry}/academy:${scmVars.GIT_COMMIT} ."
sh "docker push ${awsRegistry}/academy:stage"
sh "docker push ${awsRegistry}/academy:${scmVars.GIT_COMMIT}"
}
}
}

if (env.BRANCH_NAME == "production") {
withCredentials([
string(
credentialsId: 'SECRET_KEY_BASE',
Expand All @@ -22,8 +44,8 @@ podTemplate(label: 'academy-builder', containers: [
]) {
def awsRegistry = "${env.aws_account_id}.dkr.ecr.eu-central-1.amazonaws.com"
docker.withRegistry("https://${awsRegistry}", "ecr:eu-central-1:ecr-credentials") {
sh "docker build -t ${awsRegistry}/academy:${env.BRANCH_NAME} -t ${awsRegistry}/academy:${scmVars.GIT_COMMIT} ."
sh "docker push ${awsRegistry}/academy:${env.BRANCH_NAME}"
sh "docker build --build-arg BACKEND_URL=https://api.santiment.net -t ${awsRegistry}/academy:production -t ${awsRegistry}/academy:${scmVars.GIT_COMMIT} ."
sh "docker push ${awsRegistry}/academy:production"
sh "docker push ${awsRegistry}/academy:${scmVars.GIT_COMMIT}"
}
}
Expand Down
Loading