Skip to content

Commit

Permalink
feat: Add Fuel Book (#457)
Browse files Browse the repository at this point in the history
* preview

* fixed images and order

* updates

* bump images

* docs: Add verified assets (#453)

* ready for review

* fix

* ready for review

* update submodules
  • Loading branch information
calldelegation authored Oct 16, 2024
1 parent 22d0516 commit dc4500d
Show file tree
Hide file tree
Showing 14 changed files with 112 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,15 @@
[submodule "docs/nightly/integration-docs"]
path = docs/nightly/integration-docs
url = https://github.com/FuelLabs/integration-docs
[submodule "docs/verified-addresses"]
path = docs/verified-addresses
url = https://github.com/FuelLabs/verified-addresses
[submodule "docs/nightly/verified-addresses"]
path = docs/nightly/verified-addresses
url = https://github.com/FuelLabs/verified-addresses
[submodule "docs/fuel-book"]
path = docs/fuel-book
url = https://github.com/FuelLabs/fuel-book
[submodule "docs/nightly/fuel-book"]
path = docs/nightly/fuel-book
url = https://github.com/FuelLabs/fuel-book
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
"**/fuelup": true,
"**/guides/examples": true,
"**/sway-by-example-lib": true,
"**/migrations-and-disclosures": true
"**/migrations-and-disclosures": true,
"**/fuel-book": true,
"**/verified-addresses": true
},
"git.ignoreLimitWarning": true,
"[typescriptreact]": {
Expand Down
8 changes: 8 additions & 0 deletions contentlayer.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const includeDirs = [
'docs/sway-standards/docs/src',
'docs/sway-by-example-lib/docs/src',
'docs/migrations-and-disclosures/docs/src',
'docs/fuel-book/docs/src',
'docs/verified-addresses/docs/src',
'docs/integration-docs/docs/src',
// NIGHTLY DOCS
'docs/nightly/sway/docs/book/src',
Expand All @@ -77,6 +79,8 @@ const includeDirs = [
'docs/nightly/sway-standards/docs/src',
'docs/nightly/sway-by-example-lib/docs/src',
'docs/nightly/migrations-and-disclosures/docs/src',
'docs/nightly/fuel-book/docs/src',
'docs/nightly/verified-addresses/docs/src',
'docs/nightly/integration-docs/docs/src',
];

Expand All @@ -93,6 +97,8 @@ const excludeDirs = [
'docs/sway-standards/docs/src/SUMMARY.md',
'docs/sway-by-example-lib/docs/src/SUMMARY.md',
'docs/migrations-and-disclosures/docs/src/SUMMARY.md',
'docs/fuel-book/docs/src/SUMMARY.md',
'docs/verified-addresses/docs/src/SUMMARY.md',
'docs/integration-docs/docs/src/SUMMARY.md',
// NIGHTLY DOCS
'docs/nightly/sway/docs/book/src/SUMMARY.md',
Expand All @@ -102,6 +108,8 @@ const excludeDirs = [
'docs/nightly/sway-standards/docs/src/SUMMARY.md',
'docs/nightly/sway-by-example-lib/docs/src/SUMMARY.md',
'docs/nightly/migrations-and-disclosures/docs/src/SUMMARY.md',
'docs/nightly/fuel-book/docs/src/SUMMARY.md',
'docs/nightly/verified-addresses/docs/src/SUMMARY.md',
'docs/nightly/integration-docs/docs/src/SUMMARY.md',
];

Expand Down
1 change: 1 addition & 0 deletions docs/fuel-book
Submodule fuel-book added at 57d4a4
1 change: 1 addition & 0 deletions docs/nightly/fuel-book
Submodule fuel-book added at 57d4a4
1 change: 1 addition & 0 deletions docs/nightly/verified-addresses
Submodule verified-addresses added at 32d038
1 change: 1 addition & 0 deletions docs/verified-addresses
Submodule verified-addresses added at 32d038
6 changes: 6 additions & 0 deletions scripts/clean-build-files.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ const targetDirs = [
'./docs/nightly/sway-by-example-lib',
'./docs/migrations-and-disclosures',
'./docs/nightly/migrations-and-disclosures',
'./docs/fuel-book',
'./docs/nightly/fuel-book',
'./docs/verified-addresses',
'./docs/nightly/verified-addresses',
'./docs/integration-docs',
'./docs/nightly/integration-docs',
];
Expand Down Expand Up @@ -71,6 +75,8 @@ const exclusions = {
'fuel-graphql-docs/src',
],
migrations_and_disclosures: ['migrations-and-disclosures/docs'],
fuel_book: ['fuel-book/docs'],
verified_addresses: ['verified-addresses/docs'],
integration_docs: ['integration-docs/docs'],
};

Expand Down
36 changes: 36 additions & 0 deletions scripts/generate-links/getDocs.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,42 @@ export async function getDocs(key, order) {
'!**/SUMMARY.md',
];
break;
case 'verified-addresses':
paths = [
// BREAKING CHANGE LOG DOCS
'./verified-addresses/docs/src/*.md',
'./verified-addresses/docs/src/**/*.md',
// IGNORE ALL SUMMARY PAGES
'!**/SUMMARY.md',
];
break;
case 'fuel-book':
paths = [
// BREAKING CHANGE LOG DOCS
'./fuel-book/docs/src/*.md',
'./fuel-book/docs/src/**/*.md',
// IGNORE ALL SUMMARY PAGES
'!**/SUMMARY.md',
];
break;
case 'nightly-verified-addresses':
paths = [
// BREAKING CHANGE LOG DOCS
'./nightly/verified-addresses/docs/src/*.md',
'./nightly/verified-addresses/docs/src/**/*.md',
// IGNORE ALL SUMMARY PAGES
'!**/SUMMARY.md',
];
break;
case 'nightly-fuel-book':
paths = [
// BREAKING CHANGE LOG DOCS
'./nightly/fuel-book/docs/src/*.md',
'./nightly/fuel-book/docs/src/**/*.md',
// IGNORE ALL SUMMARY PAGES
'!**/SUMMARY.md',
];
break;
case 'integration-docs':
paths = [
// INTEGRATION DOCS
Expand Down
8 changes: 8 additions & 0 deletions scripts/generate-links/getOrders.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ const CONFIG = {
type: 'mdbook',
path: './migrations-and-disclosures/docs/src/SUMMARY.md',
},
'fuel-book': {
type: 'mdbook',
path: './fuel-book/docs/src/SUMMARY.md',
},
'integration-docs': {
type: 'mdbook',
path: './integration-docs/docs/src/SUMMARY.md',
},
'verified-addresses': {
type: 'mdbook',
path: './verified-addresses/docs/src/SUMMARY.md',
},
sway: {
type: 'mdbook',
path: './sway/docs/book/src/SUMMARY.md',
Expand Down
8 changes: 8 additions & 0 deletions scripts/generate-links/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ function getSidebarName(key) {
case 'migrations-and-disclosures':
newKey = 'Migrations & Disclosures';
break;
case 'fuel-book':
newKey = 'Fuel Book';
break;
case 'verified-addresses':
newKey = 'Verified Addresses';
break;
case 'guides':
newKey = 'Guides';
break;
Expand All @@ -116,6 +122,8 @@ function handleAllOrders(allOrders, folderPath, filename) {
const correctOrder = [
'migrations-and-disclosures',
'intro',
'fuel-book',
'verified-addresses',
'guides',
'sway',
'sway-libs',
Expand Down
6 changes: 6 additions & 0 deletions src/components/SidebarSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ export function SidebarSection({
case 'Migrations-and-disclosures':
githubLink = 'https://github.com/FuelLabs/migrations-and-disclosures';
break;
case 'Fuel-book':
githubLink = 'https://github.com/FuelLabs/fuel-book';
break;
case 'Verified-addresses':
githubLink = 'https://github.com/FuelLabs/verified-addresses';
break;
case 'Guides':
githubLink = 'https://github.com/FuelLabs/docs-hub';
break;
Expand Down
20 changes: 19 additions & 1 deletion src/config/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
"image": ""
}
},
"fuel-book": {
"title": "Fuel Book",
"slug": "fuel-book",
"repository": "https://github.com/FuelLabs/fuel-book",
"ogTags": {
"description": "Fuel Book",
"image": ""
}
},
"integration-docs": {
"title": "Integrations",
"slug": "integration-docs",
Expand Down Expand Up @@ -35,6 +44,15 @@
"image": ""
}
},
"verified-addresses": {
"title": "Verified Addresses",
"slug": "verified-addresses",
"repository": "https://github.com/FuelLabs/verified-addresses",
"ogTags": {
"description": "Verified asset and contract addresses",
"image": ""
}
},
"guides": {
"title": "Guides",
"slug": "guides",
Expand Down Expand Up @@ -143,4 +161,4 @@
"image": ""
}
}
}
}
2 changes: 2 additions & 0 deletions src/lib/md-doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ export class Doc {
.replace('docs/sway/', '')
.replace('docs/sway-standards/', '')
.replace('docs/sway-by-example-lib/', '')
.replace('docs/fuel-book/', '')
.replace('docs/verified-addresses/', '')
.replace('docs/guides/', '')
.replace('docs/fuel-specs/', '')}`;

Expand Down

0 comments on commit dc4500d

Please sign in to comment.