Skip to content

Commit 0607683

Browse files
committed
Added publish page shortcuts to docs
1 parent 4e3b6eb commit 0607683

File tree

6 files changed

+175
-20
lines changed

6 files changed

+175
-20
lines changed

astro.config.mjs

Lines changed: 49 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
// @ts-check
22
import { defineConfig } from "astro/config";
33
import starlight from "@astrojs/starlight";
4+
import starlightThemeBlack from "starlight-theme-black";
45

56
// https://astro.build/config
67
export default defineConfig({
7-
site: 'https://docs.ecency.com',
8+
site: "https://docs.ecency.com",
89
integrations: [
910
starlight({
1011
title: "Ecency",
1112
social: {
1213
github: "https://github.com/ecency",
1314
},
15+
logo: {
16+
src: "./src/assets/logo-circle.svg",
17+
},
1418
sidebar: [
1519
{
1620
label: "Get started",
@@ -81,26 +85,36 @@ export default defineConfig({
8185
],
8286
},
8387
{
84-
label: "Feed",
85-
slug: "feed",
86-
},
87-
{
88-
label: "Decks",
88+
label: "Vision",
8989
items: [
9090
{
91-
label: "What are Decks?",
92-
slug: "decks/about",
91+
label: "Feed",
92+
slug: "feed",
93+
},
94+
{
95+
label: "Publish",
96+
slug: "publish",
97+
},
98+
{
99+
label: "Decks",
100+
items: [
101+
{
102+
label: "What are Decks?",
103+
slug: "decks/about",
104+
},
105+
],
106+
},
107+
{
108+
label: "Market",
109+
slug: "market",
110+
},
111+
{
112+
label: "Witnesses",
113+
slug: "witnesses",
93114
},
94115
],
95116
},
96-
{
97-
label: "Market",
98-
slug: "market",
99-
},
100-
{
101-
label: "Witnesses",
102-
slug: "witnesses",
103-
},
117+
104118
{
105119
label: "Hivesigner",
106120
items: [
@@ -126,6 +140,25 @@ export default defineConfig({
126140
slug: "contribution",
127141
},
128142
],
143+
plugins: [
144+
starlightThemeBlack({
145+
navLinks: [
146+
{
147+
label: "Open Ecency",
148+
link: "https://ecency.com",
149+
attrs: {
150+
target: "_blank",
151+
},
152+
},
153+
{
154+
label: "Docs",
155+
link: "/getting-started/what-is-ecency",
156+
},
157+
],
158+
footerText: "",
159+
}),
160+
],
161+
customCss: ["./src/styles/index.css"],
129162
}),
130163
],
131164
});

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
},
1212
"dependencies": {
1313
"@astrojs/starlight": "^0.32.4",
14+
"@fontsource/geist-mono": "^5.2.5",
15+
"@fontsource/geist-sans": "^5.2.5",
1416
"astro": "^5.5.3",
15-
"sharp": "^0.32.5"
17+
"sharp": "^0.32.5",
18+
"starlight-theme-black": "^0.3.0"
1619
}
17-
}
20+
}

src/content/docs/index.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ description: Explore the world of Web 3.0 with Ecency
44
template: splash
55
hero:
66
tagline: Explore the world of Web 3.0 with Ecency
7-
image:
8-
file: ../../assets/logo-circle.svg
97
actions:
108
- text: Get started
119
link: /get-started/what-is-ecency
@@ -17,3 +15,12 @@ hero:
1715
---
1816

1917
import { Card, CardGrid } from "@astrojs/starlight/components";
18+
19+
<CardGrid>
20+
<Card title="Hive basics" icon="open-book">
21+
Check out how Hive blockchain works.
22+
</Card>
23+
<Card title="Ecency vision" icon="information">
24+
Explore vision features and how to utilize them.
25+
</Card>
26+
</CardGrid>

src/content/docs/publish.mdx

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: Publish page
3+
---
4+
5+
import { Badge } from "@astrojs/starlight/components";
6+
7+
## Keyboard shortcuts
8+
9+
Publish page supports basic keyboard shortcuts. List below.
10+
11+
### Basic actions
12+
13+
| Command | Windows/Linux | macOS | | |
14+
| ------------------------ | ----------------------------- | ------------------------- | --- | --- |
15+
| Copy | Control + C | Cmd + C | | |
16+
| Cut | Control + X | Cmd + X | | |
17+
| Paste | Control + V | Cmd + V | | |
18+
| Paste without formatting | Control + Shift + V | Cmd + Shift + V | | |
19+
| Undo | Control + Z | Cmd + Z | | |
20+
| Redo | Control + Shift + Z | Cmd + Shift + Z | | |
21+
| Add a line break | Shift + Enter Control + Enter | Shift + Enter Cmd + Enter | | |
22+
23+
### Text formatting
24+
25+
| Command | Windows/Linux | macOS | | |
26+
| ---------------- | ----------------------------- | ------------------------- | --- | --- |
27+
| Bold | Control + B | Cmd + B | | |
28+
| Italicize | Control + I | Cmd + I | | |
29+
| Underline | Control + U | Cmd + U | | |
30+
| Strikethrough | Control + Shift + S | Cmd + Shift + S | | |
31+
| Highlight | Control + Shift + H | Cmd + Shift + H | | |
32+
| Code | Control + E | Cmd + E | | |
33+
| Add a line break | Shift + Enter Control + Enter | Shift + Enter Cmd + Enter | | |
34+
35+
### Paragraph formatting
36+
37+
| Command | Windows/Linux | macOS | | |
38+
| ----------------------- | ------------------- | --------------- | --- | --- |
39+
| Apply normal text style | Control + Alt + 0 | Cmd + Alt + 0 | | |
40+
| Apply heading style 1 | Control + Alt + 1 | Cmd + Alt + 1 | | |
41+
| Apply heading style 2 | Control + Alt + 2 | Cmd + Alt + 2 | | |
42+
| Apply heading style 3 | Control + Alt + 3 | Cmd + Alt + 3 | | |
43+
| Apply heading style 4 | Control + Alt + 4 | Cmd + Alt + 4 | | |
44+
| Apply heading style 5 | Control + Alt + 5 | Cmd + Alt + 5 | | |
45+
| Apply heading style 6 | Control + Alt + 6 | Cmd + Alt + 6 | | |
46+
| Ordered list | Control + Shift + 7 | Cmd + Shift + 7 | | |
47+
| Bullet list | Control + Shift + 8 | Cmd + Shift + 8 | | |
48+
| Task list | Control + Shift + 9 | Cmd + Shift + 9 | | |
49+
| Blockquote | Control + Shift + B | Cmd + Shift + B | | |
50+
| Left align | Control + Shift + L | Cmd + Shift + L | | |
51+
| Center align | Control + Shift + E | Cmd + Shift + E | | |
52+
| Right align | Control + Shift + R | Cmd + Shift + R | | |
53+
| Justify | Control + Shift + J | Cmd + Shift + J | | |
54+
| Code block | Control + Alt + C | Cmd + Alt + C | | |
55+
| Subscript | Control + , | Cmd + , | | |
56+
| Superscript | Control + . | Cmd + . | | |
57+
58+
### Text selection
59+
60+
| Command | Windows/Linux | macOS | | |
61+
| --------------------------------------- | ------------------- | --------------- | --- | --- |
62+
| Select all | Control + A | Cmd + A | | |
63+
| Extend selection one character to left | Shift + ← | Shift + ← | | |
64+
| Extend selection one character to right | Shift + → | Shift + → | | |
65+
| Extend selection one line up | Shift + ↑ | Shift + ↑ | | |
66+
| Extend selection one line down | Shift + ↓ | Shift + ↓ | | |
67+
| Apply heading style 5 | Control + Alt + 5 | Cmd + Alt + 5 | | |
68+
| Apply heading style 6 | Control + Alt + 6 | Cmd + Alt + 6 | | |
69+
| Ordered list | Control + Shift + 7 | Cmd + Shift + 7 | | |
70+
| Bullet list | Control + Shift + 8 | Cmd + Shift + 8 | | |
71+
| Task list | Control + Shift + 9 | Cmd + Shift + 9 | | |
72+
| Blockquote | Control + Shift + B | Cmd + Shift + B | | |
73+
| Left align | Control + Shift + L | Cmd + Shift + L | | |
74+
| Center align | Control + Shift + E | Cmd + Shift + E | | |
75+
| Right align | Control + Shift + R | Cmd + Shift + R | | |
76+
| Justify | Control + Shift + J | Cmd + Shift + J | | |
77+
| Code block | Control + Alt + C | Cmd + Alt + C | | |
78+
| Subscript | Control + , | Cmd + , | | |
79+
| Superscript | Control + . | Cmd + . | | |

src/styles/index.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.entry-link {
2+
font-weight: 400 !important;
3+
opacity: 0.5;
4+
}
5+
6+
.container-sidebar-entry {
7+
padding-left: 8px;
8+
}

yarn.lock

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,16 @@
324324
dependencies:
325325
"@expressive-code/core" "^0.40.2"
326326

327+
"@fontsource/geist-mono@^5.1.0", "@fontsource/geist-mono@^5.2.5":
328+
version "5.2.5"
329+
resolved "https://registry.yarnpkg.com/@fontsource/geist-mono/-/geist-mono-5.2.5.tgz#4996a19beb74b64418c6ab33f77b73e7971f0c7c"
330+
integrity sha512-7/r9opukyQ3jkAqfhIRnhodWlAc8yVkHogDUAFqBeBSYNpvlpouLJysYO5cIpqyB/lHrazxChiC73Oj8K3+sZg==
331+
332+
"@fontsource/geist-sans@^5.1.0", "@fontsource/geist-sans@^5.2.5":
333+
version "5.2.5"
334+
resolved "https://registry.yarnpkg.com/@fontsource/geist-sans/-/geist-sans-5.2.5.tgz#025bd279367f7b58c2875d2ef12bd369cbd8602a"
335+
integrity sha512-anllOHyJbElRs9fV15TeDRqAeb1IKm4bSknPl6ZMoyPTx1BBy7logudcUwpNjmQLkzn4Q0JGQLRCUKJYoyST6A==
336+
327337
328338
version "0.33.5"
329339
resolved "https://registry.yarnpkg.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz#ef5b5a07862805f1e8145a377c8ba6e98813ca08"
@@ -1918,6 +1928,11 @@ markdown-table@^3.0.0:
19181928
resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-3.0.4.tgz#fe44d6d410ff9d6f2ea1797a3f60aa4d2b631c2a"
19191929
integrity sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==
19201930

1931+
marked@^15.0.6:
1932+
version "15.0.7"
1933+
resolved "https://registry.yarnpkg.com/marked/-/marked-15.0.7.tgz#f67d7e34d202ce087e6b879107b5efb04e743314"
1934+
integrity sha512-dgLIeKGLx5FwziAnsk4ONoGwHwGPJzselimvlVskE9XLN4Orv9u2VA3GWw/lYUqjfA0rUT/6fqKwfZJapP9BEg==
1935+
19211936
mdast-util-definitions@^6.0.0:
19221937
version "6.0.0"
19231938
resolved "https://registry.yarnpkg.com/mdast-util-definitions/-/mdast-util-definitions-6.0.0.tgz#c1bb706e5e76bb93f9a09dd7af174002ae69ac24"
@@ -3238,6 +3253,16 @@ space-separated-tokens@^2.0.0:
32383253
resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-2.0.2.tgz#1ecd9d2350a3844572c3f4a312bceb018348859f"
32393254
integrity sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==
32403255

3256+
starlight-theme-black@^0.3.0:
3257+
version "0.3.0"
3258+
resolved "https://registry.yarnpkg.com/starlight-theme-black/-/starlight-theme-black-0.3.0.tgz#1a02203f11607813f608ccfbf79e0e43b65dfdb1"
3259+
integrity sha512-q6UWx9H5nMitdwRC40LkAaY5REPvfofNhmqtfd6zHpoQyIAeD2poyZO+Lx4iz+howwhyDTc0gvCN6s/+yx0waw==
3260+
dependencies:
3261+
"@fontsource/geist-mono" "^5.1.0"
3262+
"@fontsource/geist-sans" "^5.1.0"
3263+
"@pagefind/default-ui" "^1.3.0"
3264+
marked "^15.0.6"
3265+
32413266
stream-replace-string@^2.0.0:
32423267
version "2.0.0"
32433268
resolved "https://registry.yarnpkg.com/stream-replace-string/-/stream-replace-string-2.0.0.tgz#e49fd584bd1c633613e010bc73b9db49cb5024ad"

0 commit comments

Comments
 (0)