-
+
aragonPM
diff --git a/website/scripts/sync-aragonjs-docs.js b/website/scripts/sync-aragonjs-docs.js
index 55b1a8c8..26ea43ad 100644
--- a/website/scripts/sync-aragonjs-docs.js
+++ b/website/scripts/sync-aragonjs-docs.js
@@ -1,67 +1,74 @@
const { syncPages } = require('./sync-util')
const GIT_REF = 'master'
-const REPO = 'aragon.js'
-const BASE_CONTENT_URL = `https://raw.githubusercontent.com/aragon/${REPO}/${GIT_REF}/docs`
+const REPO = 'aragon/aragon.js'
const pages = [
{
- fileLocation: '/docs/js-ref-app.md',
- id: 'aragonjs-ref-app',
+ destination: '/docs/js-ref-quick-start.md',
+ id: 'api-js-quick-start',
+ title: 'Quick Start',
+ sidebarLabel: 'Quick Start',
+ hideTitle: true,
+ contentLocation: 'docs/QUICK_START.md',
+ },
+ {
+ destination: '/docs/js-ref-app.md',
+ id: 'api-js-ref-app',
title: 'aragonAPI for Javascript',
sidebarLabel: 'App API',
hideTitle: true,
- contentURL: `${BASE_CONTENT_URL}/APP.md`,
+ contentLocation: 'docs/APP.md',
},
{
- fileLocation: '/docs/js-ref-providers.md',
- id: 'aragonjs-ref-providers',
+ destination: '/docs/js-ref-providers.md',
+ id: 'api-js-ref-providers',
title: 'aragonAPI for providers',
sidebarLabel: 'Providers',
hideTitle: true,
- contentURL: `${BASE_CONTENT_URL}/PROVIDERS.md`,
+ contentLocation: 'docs/PROVIDERS.md',
},
{
- fileLocation: '/docs/js-ref-wrapper.md',
- id: 'aragonjs-ref-wrapper',
+ destination: '/docs/js-ref-wrapper.md',
+ id: 'api-js-ref-wrapper',
title: 'aragonAPI for wrapper',
sidebarLabel: 'Wrapper',
hideTitle: true,
- contentURL: `${BASE_CONTENT_URL}/WRAPPER.md`,
+ contentLocation: 'docs/WRAPPER.md',
},
{
- fileLocation: '/docs/js-ref-architecture.md',
- id: 'aragonjs-ref-architecture',
+ destination: '/docs/js-ref-architecture.md',
+ id: 'api-js-ref-architecture',
title: 'aragonAPI for architecture',
sidebarLabel: 'Architecture of apps',
hideTitle: true,
- contentURL: `${BASE_CONTENT_URL}/ARCHITECTURE.md`,
+ contentLocation: 'docs/ARCHITECTURE.md',
},
{
- fileLocation: '/docs/js-guide-bg-scripts.md',
- id: 'aragonjs-guide-bg-scripts',
+ destination: '/docs/js-guide-bg-scripts.md',
+ id: 'api-js-guide-bg-scripts',
title: 'Background Scripts',
sidebarLabel: 'Background Scripts',
hideTitle: true,
- contentURL: `${BASE_CONTENT_URL}/BACKGROUND_SCRIPTS.md`,
+ contentLocation: 'docs/BACKGROUND_SCRIPTS.md',
},
{
- fileLocation: '/docs/js-ref-react.md',
- id: 'aragonjs-ref-react',
+ destination: '/docs/js-ref-react.md',
+ id: 'api-js-ref-react',
title: 'aragonAPI for React',
sidebarLabel: 'React API',
hideTitle: true,
- contentURL: `${BASE_CONTENT_URL}/../packages/aragon-api-react/README.md`,
+ contentLocation: 'packages/aragon-api-react/README.md',
},
]
const locationReferenceMap = {
- '/docs/APP.md': '/docs/aragonjs-ref-app.html',
- '/docs/WRAPPER.md': '/docs/aragonjs-ref-wrapper.html',
- '/docs/PROVIDERS.md': '/docs/aragonjs-ref-providers.html',
- '/docs/ARCHITECTURE.md': '/docs/aragonjs-ref-architecture.html',
- '/docs/BACKGROUND_SCRIPTS.md': '/docs/aragonjs-guide-bg-scripts.html',
- '/packages/aragon-api-react/README.md': '/docs/aragonjs-ref-react.html',
+ '/docs/APP.md': '/docs/api-js-ref-app.html',
+ '/docs/WRAPPER.md': '/docs/api-js-ref-wrapper.html',
+ '/docs/PROVIDERS.md': '/docs/api-js-ref-providers.html',
+ '/docs/ARCHITECTURE.md': '/docs/api-js-ref-architecture.html',
+ '/docs/BACKGROUND_SCRIPTS.md': '/docs/api-js-guide-bg-scripts.html',
+ '/packages/aragon-api-react/README.md': '/docs/api-js-ref-react.html',
}
-syncPages(pages, locationReferenceMap)
+syncPages(pages, locationReferenceMap, GIT_REF, REPO)
diff --git a/website/scripts/sync-cli-docs.js b/website/scripts/sync-cli-docs.js
index 5fe16111..bfc27821 100644
--- a/website/scripts/sync-cli-docs.js
+++ b/website/scripts/sync-cli-docs.js
@@ -1,48 +1,54 @@
const { syncPages } = require('./sync-util')
const GIT_REF = 'master'
-const REPO = 'aragon-cli'
-const BASE_CONTENT_URL = `https://raw.githubusercontent.com/aragon/${REPO}/${GIT_REF}/docs`
+const REPO = 'aragon/aragon-cli'
const pages = [
{
- fileLocation: '/docs/cli-intro.md',
+ destination: '/docs/cli-intro.md',
id: 'cli-intro',
title: 'Using the aragonCLI',
sidebarLabel: 'Introduction',
hideTitle: true,
- contentURL: `${BASE_CONTENT_URL}/Intro.md`
+ contentLocation: 'docs/Intro.md'
},
{
- fileLocation: '/docs/cli-main-commands.md',
+ destination: '/docs/cli-main-commands.md',
id: 'cli-main-commands',
title: 'Main commands',
sidebarLabel: 'Main commands',
- contentURL: `${BASE_CONTENT_URL}/Main-commands.md`
+ contentLocation: 'docs/Main-commands.md'
},
{
- fileLocation: '/docs/cli-apm-commands.md',
+ destination: '/docs/cli-apm-commands.md',
id: 'cli-apm-commands',
title: 'aragonPM commands',
- sidebarLabel: 'aragonPM commands',
- contentURL: `${BASE_CONTENT_URL}/Apm-commands.md`
+ sidebarLabel: 'APM commands',
+ contentLocation: 'docs/Apm-commands.md'
},
{
- fileLocation: '/docs/cli-dao-commands.md',
+ destination: '/docs/cli-dao-commands.md',
id: 'cli-dao-commands',
title: 'DAO commands',
sidebarLabel: 'DAO commands',
- contentURL: `${BASE_CONTENT_URL}/Dao-commands.md`
+ contentLocation: 'docs/Dao-commands.md'
},
{
- fileLocation: '/docs/cli-global-confg.md',
+ destination: '/docs/cli-ipfs-commands.md',
+ id: 'cli-ipfs-commands',
+ title: 'IPFS commands',
+ sidebarLabel: 'IPFS commands',
+ contentLocation: 'docs/Ipfs-commands.md',
+ },
+ {
+ destination: '/docs/cli-global-confg.md',
id: 'cli-global-confg',
title: 'Global configuration',
sidebarLabel: 'Global configuration',
- contentURL: `${BASE_CONTENT_URL}/Global-confg.md`
+ contentLocation: 'docs/Global-confg.md'
}
]
const locationReferenceMap = {}
-syncPages(pages, locationReferenceMap)
+syncPages(pages, locationReferenceMap, GIT_REF, REPO)
diff --git a/website/scripts/sync-util.js b/website/scripts/sync-util.js
index 75902298..ea16a49c 100644
--- a/website/scripts/sync-util.js
+++ b/website/scripts/sync-util.js
@@ -1,14 +1,25 @@
const fetch = require('node-fetch')
const fs = require('fs')
-async function syncPages(pages, locationReferenceMap) {
- Promise.all(pages.map(page => syncPage(page, locationReferenceMap)))
+async function syncPages(pages, locationReferenceMap, gitRef, repo) {
+ Promise.all(
+ pages.map(page => syncPage(page, locationReferenceMap, gitRef, repo))
+ )
}
-async function syncPage(
- { id, title, hideTitle, sidebarLabel, contentURL, fileLocation },
- locationReferenceMap
-) {
+async function syncPage(page, locationReferenceMap, gitRef, repo) {
+ const {
+ id,
+ title,
+ hideTitle,
+ sidebarLabel,
+ contentLocation,
+ destination,
+ } = page
+
+ const contentURL = `https://raw.githubusercontent.com/${repo}/${gitRef}/${contentLocation}`
+ const editURL = `https://github.com/${repo}/blob/${gitRef}/${contentLocation}`
+
const response = await fetch(contentURL)
let remoteText = await response.text()
// Fix the links
@@ -23,6 +34,7 @@ async function syncPage(
const header = `---
id: ${id}
title: ${title}
+custom_edit_url: ${editURL}
sidebar_label: ${sidebarLabel}
hide_title: ${hideTitle || false}
---
@@ -30,7 +42,7 @@ hide_title: ${hideTitle || false}
`
const result = header.concat('\n').concat(remoteText)
// this script will be run from the website directory => we need to go up one level
- fs.writeFileSync(`../${fileLocation}`, result)
+ fs.writeFileSync(`../${destination}`, result)
}
function replaceAll(string, mapObject) {
diff --git a/website/sidebars.json b/website/sidebars.json
index 2d837736..ee07780b 100644
--- a/website/sidebars.json
+++ b/website/sidebars.json
@@ -16,6 +16,11 @@
"tutorial",
"guides-publish",
"guides-custom-deploy",
+ {
+ "type": "subcategory",
+ "label": "Signers",
+ "ids": ["guides-use-frame", "guides-use-metamask"]
+ },
"guides-faq"
],
"aragonCLI": [
@@ -23,9 +28,10 @@
"cli-main-commands",
"cli-dao-commands",
"cli-apm-commands",
+ "cli-ipfs-commands",
"cli-global-confg"
],
- "aragonPM": ["apm", "apm-ref"],
+ "aragonPM": ["apm-intro", "apm-architecture", "apm-ref"],
"aragonOS": [
"aragonos-intro",
"aragonos-motivation",
@@ -40,17 +46,92 @@
"type": "subcategory",
"label": "JavaScript",
"ids": [
- "aragonjs-quick-start",
- "aragonjs-ref-app",
- "aragonjs-ref-react",
- "aragonjs-ref-wrapper",
- "aragonjs-ref-providers",
- "aragonjs-ref-architecture",
- "aragonjs-guide-bg-scripts"
+ "api-js-quick-start",
+ "api-js-ref-app",
+ "api-js-ref-react",
+ "api-js-ref-wrapper",
+ "api-js-ref-providers",
+ "api-js-ref-architecture",
+ "api-js-guide-bg-scripts"
]
}
],
"aragonUI": ["aragonui-intro"],
- "App Center": ["app-center-preparing-assets"]
+ "App Center": [
+ "app-center-intro",
+ "app-center-preparing-assets",
+ "app-center-submission"
+ ]
+ },
+ "docs-api": {
+ "ACL": [
+ "acl_ACL",
+ "acl_ACLSyntaxSugar",
+ "acl_ACLSyntaxSugar_ACLHelpers",
+ "acl_IACL",
+ "acl_IACLOracle"
+ ],
+ "APM": [
+ "apm_APMNamehash",
+ "apm_APMRegistry",
+ "apm_APMRegistry_APMInternalAppNames",
+ "apm_Repo"
+ ],
+ "APPS": [
+ "apps_AppProxyBase",
+ "apps_AppProxyPinned",
+ "apps_AppProxyUpgradeable",
+ "apps_AppStorage",
+ "apps_AragonApp",
+ "apps_UnsafeAragonApp"
+ ],
+ "COMMON": [
+ "common_Autopetrified",
+ "common_ConversionHelpers",
+ "common_DelegateProxy",
+ "common_DepositableDelegateProxy",
+ "common_DepositableStorage",
+ "common_EtherTokenConstant",
+ "common_IForwarder",
+ "common_IVaultRecoverable",
+ "common_Initializable",
+ "common_IsContract",
+ "common_Petrifiable",
+ "common_ReentrancyGuard",
+ "common_SafeERC20",
+ "common_TimeHelpers",
+ "common_Uint256Helpers",
+ "common_UnstructuredStorage",
+ "common_VaultRecoverable"
+ ],
+ "ENS": ["ens_ENSConstants", "ens_ENSSubdomainRegistrar"],
+ "EVMSCRIPT": [
+ "evmscript_EVMScriptRegistry",
+ "evmscript_EVMScriptRunner",
+ "evmscript_IEVMScriptExecutor",
+ "evmscript_IEVMScriptRegistry",
+ "evmscript_IEVMScriptRegistry_EVMScriptRegistryConstants",
+ "evmscript_ScriptHelpers"
+ ],
+ "EVMSCRIPT / EXECUTORS": [
+ "evmscript_executors_BaseEVMScriptExecutor",
+ "evmscript_executors_CallsScript"
+ ],
+ "FACTORY": [
+ "factory_APMRegistryFactory",
+ "factory_AppProxyFactory",
+ "factory_DAOFactory",
+ "factory_ENSFactory",
+ "factory_EVMScriptRegistryFactory"
+ ],
+ "KERNEL": [
+ "kernel_IKernel",
+ "kernel_IKernel_IKernelEvents",
+ "kernel_Kernel",
+ "kernel_KernelConstants_KernelAppIds",
+ "kernel_KernelConstants_KernelNamespaceConstants",
+ "kernel_KernelProxy",
+ "kernel_KernelStorage"
+ ]
}
}
diff --git a/website/siteConfig.js b/website/siteConfig.js
index 26e476db..22284e44 100644
--- a/website/siteConfig.js
+++ b/website/siteConfig.js
@@ -60,17 +60,10 @@ const siteConfig = {
// url: 'https://facebook.github.io',
// baseUrl: '/test-site/',
- projectName: 'hack-docs',
+ projectName: 'hack',
organizationName: 'aragon',
- headerLinks: [
- { doc: 'getting-started', label: 'Get started' },
- { doc: 'tutorial', label: 'Tutorial' },
- { doc: 'aragonos-intro', label: 'aragonOS' },
- { doc: 'api-intro', label: 'aragonAPI' },
- { doc: 'aragonui-intro', label: 'aragonUI' },
- { page: 'help', label: 'Help' },
- ],
+ headerLinks: [],
cleanUrl: true,
@@ -145,8 +138,6 @@ const siteConfig = {
const insertStylesAt = html.lastIndexOf('