Skip to content

Commit 51070c8

Browse files
committed
Make prettier
1 parent 4b185ae commit 51070c8

File tree

393 files changed

+4006
-2433
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

393 files changed

+4006
-2433
lines changed

.github/dependabot.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: weekly
7-
open-pull-requests-limit: 10
8-
commit-message:
9-
prefix: chore
10-
include: scope
11-
- package-ecosystem: "github-actions"
12-
directory: "/"
13-
schedule:
14-
interval: weekly
15-
commit-message:
16-
prefix: ci
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
open-pull-requests-limit: 10
8+
commit-message:
9+
prefix: chore
10+
include: scope
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
schedule:
14+
interval: weekly
15+
commit-message:
16+
prefix: ci

LICENSE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
The MIT License (MIT)
2-
=====================
1+
# The MIT License (MIT)
32

43
Copyright © 2024 LBRY Foundation
54

docs/.vitepress/config.mts

Lines changed: 129 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,212 +1,259 @@
1-
import {readFileSync, writeFileSync} from "fs";
1+
import { readFileSync, writeFileSync } from "fs";
22
import path from "path";
3-
import {defineConfig, PageData, SiteConfig, TransformContext} from 'vitepress';
3+
import {
4+
defineConfig,
5+
PageData,
6+
SiteConfig,
7+
TransformContext,
8+
} from "vitepress";
49

5-
const metaColor = '#27E4EB';
6-
const metaLogo = '/logo.png';
10+
const metaColor = "#27E4EB";
11+
const metaLogo = "/logo.png";
712

813
/** @type {import('vitepress').DefaultTheme.Config} */
914
export default defineConfig({
10-
vite:{
11-
build:{
15+
vite: {
16+
build: {
1217
chunkSizeWarningLimit: 5000,
1318
},
1419
},
15-
appearance: 'force-dark',
16-
lang: 'en-US',
17-
title: 'LBRY Foundation',
20+
appearance: "force-dark",
21+
lang: "en-US",
22+
title: "LBRY Foundation",
1823
lastUpdated: true,
19-
description: 'The LBRY community invites everyone to join us in building a more free and open way to share content and information online.',
24+
description:
25+
"The LBRY community invites everyone to join us in building a more free and open way to share content and information online.",
2026
transformHtml: (code: string): string => {
21-
return code.replace( /<head>/,`<head prefix="og: https://ogp.me/ns#">`);
27+
return code.replace(/<head>/, `<head prefix="og: https://ogp.me/ns#">`);
2228
},
2329
head: [
2430
// Manifest
25-
['link', { rel: 'icon', href: metaLogo }],
26-
['link', { rel: 'manifest', href: '/manifest.json' }],
27-
['meta', { name: 'viewport', content: 'initial-scale=1,width=device-width' }],
31+
["link", { rel: "icon", href: metaLogo }],
32+
["link", { rel: "manifest", href: "/manifest.json" }],
33+
[
34+
"meta",
35+
{ name: "viewport", content: "initial-scale=1,width=device-width" },
36+
],
2837

2938
// Icons
30-
['link', { rel: 'mask-icon', href: '/logo/safari-pinned-tab.svg', color: metaColor }],
31-
['link', { rel: 'apple-touch-icon', sizes: '180x180', href: '/logo/apple-touch-icon.png' }],
32-
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
33-
['link', { rel: 'icon', sizes: '16x16', href: '/logo/favicon-16x16.png' }],
34-
['link', { rel: 'icon', sizes: '32x32', href: '/logo/favicon-32x32.png' }],
35-
['link', { rel: 'icon', sizes: '192x192', href: '/logo/android-chrome-192x192.png' }],
36-
['link', { rel: 'icon', sizes: '512x512', href: '/logo/android-chrome-512x512.png' }],
39+
[
40+
"link",
41+
{
42+
rel: "mask-icon",
43+
href: "/logo/safari-pinned-tab.svg",
44+
color: metaColor,
45+
},
46+
],
47+
[
48+
"link",
49+
{
50+
rel: "apple-touch-icon",
51+
sizes: "180x180",
52+
href: "/logo/apple-touch-icon.png",
53+
},
54+
],
55+
["link", { rel: "icon", type: "image/svg+xml", href: "/logo.svg" }],
56+
["link", { rel: "icon", sizes: "16x16", href: "/logo/favicon-16x16.png" }],
57+
["link", { rel: "icon", sizes: "32x32", href: "/logo/favicon-32x32.png" }],
58+
[
59+
"link",
60+
{
61+
rel: "icon",
62+
sizes: "192x192",
63+
href: "/logo/android-chrome-192x192.png",
64+
},
65+
],
66+
[
67+
"link",
68+
{
69+
rel: "icon",
70+
sizes: "512x512",
71+
href: "/logo/android-chrome-512x512.png",
72+
},
73+
],
3774

3875
// Theme Color
39-
['meta', { name: 'theme-color', content: metaColor }],
40-
['meta', { name: 'msapplication-TileColor', content: metaColor }],
76+
["meta", { name: "theme-color", content: metaColor }],
77+
["meta", { name: "msapplication-TileColor", content: metaColor }],
4178

4279
// Twitter Card
43-
['meta', { name: 'twitter:card', content: 'summary' }],
44-
['meta', { name: 'twitter:image', content: metaLogo }],
80+
["meta", { name: "twitter:card", content: "summary" }],
81+
["meta", { name: "twitter:image", content: metaLogo }],
4582

4683
// OpenGraph
47-
['meta', { property: 'og:type', content: 'website' }],
48-
['meta', { property: 'og:locale', content: 'en_US' }],
49-
['meta', { property: 'og:image', content: metaLogo }],
84+
["meta", { property: "og:type", content: "website" }],
85+
["meta", { property: "og:locale", content: "en_US" }],
86+
["meta", { property: "og:image", content: metaLogo }],
5087
],
5188
transformHead: (context: TransformContext): void => {
52-
let path = '/'+context.pageData.relativePath
53-
.replace(/index\.md$/,'')
54-
.replace(/\.md$/,'.html');
89+
let path =
90+
"/" +
91+
context.pageData.relativePath
92+
.replace(/index\.md$/, "")
93+
.replace(/\.md$/, ".html");
5594

5695
// OpenGraph
5796
context.head.push([
58-
'meta',
97+
"meta",
5998
{
6099
content: context.description,
61-
property: 'og:description',
100+
property: "og:description",
62101
},
63102
]);
64103
context.head.push([
65-
'meta',
104+
"meta",
66105
{
67106
content: context.title,
68-
property: 'og:title',
107+
property: "og:title",
69108
},
70109
]);
71-
if(!context.pageData.isNotFound){
110+
if (!context.pageData.isNotFound) {
72111
context.head.push([
73-
'meta',
112+
"meta",
74113
{
75114
content: path,
76-
property: 'og:url',
115+
property: "og:url",
77116
},
78117
]);
79118
}
80119

81120
// Twitter Card
82121
context.head.push([
83-
'meta',
122+
"meta",
84123
{
85124
content: context.description,
86-
name: 'twitter:description',
125+
name: "twitter:description",
87126
},
88127
]);
89128
context.head.push([
90-
'meta',
129+
"meta",
91130
{
92131
content: context.title,
93-
name: 'twitter:title',
132+
name: "twitter:title",
94133
},
95134
]);
96-
if(!context.pageData.isNotFound){
135+
if (!context.pageData.isNotFound) {
97136
context.head.push([
98-
'meta',
137+
"meta",
99138
{
100139
content: path,
101-
name: 'twitter:url',
140+
name: "twitter:url",
102141
},
103142
]);
104143
}
105144
},
106145
sitemap: {
107-
hostname: 'https://lbry.org',
146+
hostname: "https://lbry.org",
108147
},
109148
buildEnd: async (siteConfig: SiteConfig): void => {
110-
const sitemapFile: string = path.join(siteConfig.outDir,'sitemap.xml');
149+
const sitemapFile: string = path.join(siteConfig.outDir, "sitemap.xml");
111150

112151
// Wait for sitemap.xml to be made
113-
await new Promise(resolve => setTimeout(resolve, 1000));
152+
await new Promise((resolve) => setTimeout(resolve, 1000));
114153

115154
// Modify sitemap.xml
116-
writeFileSync(sitemapFile,readFileSync(sitemapFile).toString().replace('<?xml version="1.0" encoding="UTF-8"?>','<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="sitemap.xsl" type="text/xsl"?>'));
155+
writeFileSync(
156+
sitemapFile,
157+
readFileSync(sitemapFile)
158+
.toString()
159+
.replace(
160+
'<?xml version="1.0" encoding="UTF-8"?>',
161+
'<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="sitemap.xsl" type="text/xsl"?>',
162+
),
163+
);
117164
},
118165
themeConfig: {
119166
editLink: {
120167
pattern: (payload: PageData): string => {
121-
if(payload.filePath==='projects/index.md'){
168+
if (payload.filePath === "projects/index.md") {
122169
return `https://github.com/LBRYFoundation/Awesome-LBRY/edit/main/README.md`;
123170
}
124171
return `https://github.com/LBRYFoundation/lbry.org/edit/master/docs/${payload.filePath}`;
125172
},
126-
text: 'Improve this page on GitHub!',
173+
text: "Improve this page on GitHub!",
127174
},
128175
footer: {
129-
message: 'With love for community',
130-
copyright: '© '+(new Date().getFullYear())+' LBRY Foundation',
176+
message: "With love for community",
177+
copyright: "© " + new Date().getFullYear() + " LBRY Foundation",
131178
},
132-
logo: '/logo-horizontal.svg',
179+
logo: "/logo-horizontal.svg",
133180
nav: [
134181
// {
135182
// text: 'About us',
136183
// link: '/about-us/'
137184
// },
138185
{
139-
text: 'Roadmap',
140-
link: '/roadmap/'
186+
text: "Roadmap",
187+
link: "/roadmap/",
141188
},
142189
{
143-
text: 'Downloads',
144-
link: '/downloads/'
190+
text: "Downloads",
191+
link: "/downloads/",
145192
},
146193
{
147-
text: 'Board',
148-
link: '/board/'
194+
text: "Board",
195+
link: "/board/",
149196
},
150197
// {
151198
// text: 'FAQ',
152199
// link: '/faq/'
153200
// },
154201
{
155-
text: 'Archive',
202+
text: "Archive",
156203
items: [
157204
{
158-
text: 'FAQ',
159-
link: '/faq/'
205+
text: "FAQ",
206+
link: "/faq/",
160207
},
161208
],
162209
},
163210
{
164-
text: 'Contact',
165-
link: '/contact/'
211+
text: "Contact",
212+
link: "/contact/",
166213
},
167214
{
168-
component: 'TechButton',
215+
component: "TechButton",
169216
props: {
170-
text: 'LBRY.tech',
171-
link: 'https://lbry.tech',
217+
text: "LBRY.tech",
218+
link: "https://lbry.tech",
172219
},
173220
},
174221
{
175-
component: 'FundButton',
222+
component: "FundButton",
176223
props: {
177-
text: 'LBRY.fund',
178-
link: 'https://lbry.fund',
224+
text: "LBRY.fund",
225+
link: "https://lbry.fund",
179226
},
180227
},
181228
],
182229
search: {
183-
provider: 'local',
230+
provider: "local",
184231
},
185232
outline: false,
186233
siteTitle: false,
187234
socialLinks: [
188235
{
189-
icon: 'discord',
190-
link: 'https://chat.lbry.org',
236+
icon: "discord",
237+
link: "https://chat.lbry.org",
191238
},
192239
{
193-
icon: 'github',
194-
link: 'https://github.com/LBRYFoundation',
240+
icon: "github",
241+
link: "https://github.com/LBRYFoundation",
195242
},
196243
{
197-
icon: 'reddit',
198-
link: 'https://reddit.com/r/lbry',
244+
icon: "reddit",
245+
link: "https://reddit.com/r/lbry",
199246
},
200247
{
201-
icon: 'x', // or "twitter"
202-
link: 'https://x.com/LBRYFoundation',
248+
icon: "x", // or "twitter"
249+
link: "https://x.com/LBRYFoundation",
203250
},
204251
],
205252
},
206253
cleanUrls: true,
207254
rewrites(id: string): string {
208-
if(id.startsWith('news/')){
209-
return id.replace(/news\/\d+-/,'news/');
255+
if (id.startsWith("news/")) {
256+
return id.replace(/news\/\d+-/, "news/");
210257
}
211258
return id;
212259
},

0 commit comments

Comments
 (0)