Giter Club home page Giter Club logo

docs's Introduction

Alephium Docs

Built using Docusaurus 2.

Development

Install dependencies:

npm i

Start dev server:

npm start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

npm run build

This command generates static content into the build directory and can be served using any static contents hosting service.

Internationalization (i18n)

You are welcome to submit translations of the docs pages. So far we only have a small portion of the docs translated to French. We currently only have capacity to review the following languages:

  • French
  • German
  • Swedish
  • Turkish

If your translation is a mere Google translation without any correction, the Pull Request will likely not be accepted.

Before you begin translating, please consider your submission as commitment to maintain the pages in sync with any changes happening in the English version

Enable a new language for translation

  1. Find the ISO 689-1 two-letter code for your language here
  2. Create a folder for the documents inside the i18n folder. For example german: mkdir -p i18n/<ISO639-1>/docusaurus-plugin-content-docs/current (note that you will need to replace <ISO639-1> with the actual two-letter international code).
  3. Copy all the content from /docs into the new folder: cp -r docs/ i18n/<ISO639-1>/docusaurus-plugin-content-docs/current/ (again, note that you will need to replace <ISO639-1> with the actual two-letter international code).
  4. Remove all the _category_.json files from the subfolders inside i18n/<ISO639-1>/docusaurus-plugin-content-docs/current: find i18n/<ISO639-1>/docusaurus-plugin-content-docs/current -type f -name "_category_.json" -exec rm {} \;
  5. Build the translation files for the navbar and the footer: npm run write-translations -- --locale <ISO639-1>.

Now you can start translating any and all files in i18n/<ISO639-1>/docusaurus-plugin-content-docs/current

To test your content, run the following command: npm run start -- --locale <ISO639-1>

This will only load the wiki in the language you are translating. To locally test the whole site, you can do npm run build && npm run serve)

docs's People

Contributors

blackmennewstyle avatar captainralph42 avatar cloudiko avatar diomark avatar emanuelones avatar fugashu avatar h0ngcha0 avatar jimmyhoffa avatar jktranslator avatar killerwhile avatar lbqds avatar leealephium avatar lf94 avatar maudsimon avatar montaill avatar mvaivre avatar nop33 avatar not-reed avatar oheka avatar omahs avatar polarker avatar sakrecoer avatar suyanlong avatar sven-hash avatar tdroxler avatar vdaodao avatar wrocketdev avatar xbabyx avatar ykris45 avatar yodovan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Test Compilation

Validation Error:

Module ts-jest in the transform option was not found.
is: /Users/benjaminlarkey/Desktop/Alephium/alephium-tutorial

Configuration Documentation:
https://jestjs.io/docs/configuration

node:child_process:946
throw err;
^

Error: Command failed: npx --yes ts-node --transpile-only /Users/benjaminlarkey/.npm/_npx/f1b120e1b513c04c/node_modules/@alephium/cli/cli_internal.ts test
at checkExecSyncError (node:child_process:871:11)
at execSync (node:child_process:943:15)
at Object. (/Users/benjaminlarkey/.npm/_npx/f1b120e1b513c04c/node_modules/@alephium/cli/cli.js:34:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 72789,
stdout: null,
stderr: null
}

Node.js v18.12.1

Error was near line 104 or "describe" the following command fixes it but is not mentioned in the guide. I had to do my own digging.

Command: npm i --save-dev @types/mocha

Document API

We should be able to generate the doc from openapi.json.

Host at docs.alephium.org

Following a discussion on Slack, it seems that hosting our "wiki" (ie. documentation) at docs.alephium.org would make more sense.

Let's create an alias and a redirect from wiki.alephium.org to docs.alephium.org?

cc/ @killerwhile @polarker

React JS contract compile error

Loading alephium config file: /Users/benjaminlarkey/Desktop/Ergollamas-Alphpacas/alphpacas/alephium.config.ts
(node:1875) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)
devnet is not live
node:child_process:946
throw err;
^

Error: Command failed: npx --yes ts-node --transpile-only /Users/benjaminlarkey/.npm/_npx/f1b120e1b513c04c/node_modules/@alephium/cli/cli_internal.ts compile
at checkExecSyncError (node:child_process:871:11)
at execSync (node:child_process:943:15)
at Object. (/Users/benjaminlarkey/.npm/_npx/f1b120e1b513c04c/node_modules/@alephium/cli/cli.js:34:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 1870,
stdout: null,
stderr: null
}

Node.js v18.12.1

to reaffirm that the devnet is live I tried starting one and it said it was already live and it does not work. tried with and without --yes tags

Update contents to i18n

Hi,

I am trying to translate alephium docs to Vietnamese version and regularly update my branches, but currently I have an issue that the folder i18n/vi is not updated since new pushed changes. What should I do to sync new change from docs to my local i18n/vi?

I wish you could recommend a hint.

Thank you so much!

Migrate all content before publishing to production

I noticed a few differences between the new and old wikis:

  • 1. New wiki does not include changes in Full Node More page
  • 2. New wiki does not include FAQ page
  • 3. There's a desktop wallet page PR on the old wiki, which needs to be moved in the new wiki, before Wednesday
  • 4. There's another PR open whose changes probably need to be reflected in the new wiki as well
  • 5. In the new wiki, the order of the articles in each section is not the same as in the old one

@Sakrecoer I'll take care of points 1 and 3

Deploy to production

  • Proof read. Make sure content is clean and ready.
  • Craft a little announcement and warn about potential broken links.

301 redirects

We need to redirect the endpoints of the old wiki to the new wiki.

Here CSV file with this pattern oldURL,newURL

⚠️ note that line 15 contains a #deeplink wich might cause trouble depending on how the list is parsed:
https://wiki.alephium.org/Roadmap.html, https://wiki.alephium.org/5min-overview#roadmap

If this doesnt work, please use https://wiki.alephium.org/Roadmap.html, https://wiki.alephium.org/5min-overview

https://wiki.alephium.org/Introduction.html,https://wiki.alephium.org/
https://wiki.alephium.org/Frequently-Asked-Questions.html,https://wiki.alephium.org/frequently-asked-questions
https://wiki.alephium.org/Full-Node-Starter-Guide.html,https://wiki.alephium.org/full-node/Full-Node-Starter-Guide
https://wiki.alephium.org/Docker-Guide.html,https://wiki.alephium.org/full-node/Docker-Guide
https://wiki.alephium.org/Full-Node-More.html,https://wiki.alephium.org/full-node/Full-Node-More
https://wiki.alephium.org/Full-node-on-raspberry-pi.html,https://wiki.alephium.org/full-node/Full-node-on-raspberry-pi
https://wiki.alephium.org/Solo-Mining-Guide.html,https://wiki.alephium.org/mining/Solo-Mining-Guide
https://wiki.alephium.org/Pool-Mining-Guide.html,https://wiki.alephium.org/mining/Pool-Mining-Guide
https://wiki.alephium.org/Miner-Troubleshooting.html,https://wiki.alephium.org/mining/Miner-Troubleshooting
https://wiki.alephium.org/Alephium-Stratum.html,https://wiki.alephium.org/mining/Alephium-Stratum
https://wiki.alephium.org/Wallet-Guide.html,https://wiki.alephium.org/wallet/Wallet-Guide
https://wiki.alephium.org/Multisig-Guide.html,https://wiki.alephium.org/wallet/Multisig-Guide
https://wiki.alephium.org/Smart-Contract-Guide.html,https://wiki.alephium.org/smart-contract/Smart-Contract-Guide
https://wiki.alephium.org/Smart-Contract-More.html,https://wiki.alephium.org/smart-contract/Smart-Contract-More
https://wiki.alephium.org/Roadmap.html,https://wiki.alephium.org/5min-overview#roadmap
https://wiki.alephium.org/Testnet-Guide.html,https://wiki.alephium.org/testnet-and-devnet/Testnet-Guide
https://wiki.alephium.org/Devnet-Guide.html,https://wiki.alephium.org/testnet-and-devnet/Devnet-Guide
https://wiki.alephium.org/CPU-Miner-Guide.html,https://wiki.alephium.org/testnet-and-devnet/CPU-Miner-Guide
https://wiki.alephium.org/On-dust-outputs-and-state-explosion.html,https://wiki.alephium.org/misc/On-dust-outputs-and-state-explosion
https://wiki.alephium.org/Internationalization-and-Localization.html,https://wiki.alephium.org/misc/Internationalization-and-Localization

Rename/reorganize some pages

To keep track of @nop33 proposal i put it here:

It is true that we are lacking a proper smart contracts guide. What we have is:

  • A blank wiki page called Developing that leads to @lf94 s gist with very little info
  • A wiki page called Technical guide with a fullnode that serves as a tutorial on creating and deploying a smart contract (for exchanging ALPH for tokens) on Alephium using the terminal
  • A GitHub repo called voting-tutorial that serves as a tutorial on creating and deploying a dApp on Alephium using a frontend app (not terminal)

So, all we have is tutorials, no reference guides.Maybe we should:

If/when this goes through, we need to remember to:

  • update URLs on website.

Remove (French) Translation for now

After discussing with @nop33 to understand how translations are managed by Docusaurus, I would like to suggest that we remove the French translation for now (it is very outdated) and until the documentation is more stable.

For reminder this is how it works:

To create a translation for a new page, one needs to copy the English file into the i18n/fr/docusaurus-plugin-content-docs/current/ folder and update the text to the new language.
If no-one create a translation for a page, when the user switches to the new language, they will see the English content instead.
Because it works at the page level and not the actual content level, once both English and new language files are created, and there is some new text added in the English one, there’s no way to know that the 2 files are not in sync anymore.

The only way to ensure proper maintenance of the translated pages would be that once someone changes something in the English files and makes a PR, we don’t merge that PR until we also have the other translations for it.
As we are currently working a lot on the documentation, I don't think this is a bottleneck we can manage right now. It's also a bit of a waste of community time to make them translate content that evolves so quickly.

It would be more efficient to wait until the documentation is more stable to accept translation, and then, we can enforce that EN PR modifying a page, need to have all translated languages updated as well.

Wdyt? @mvaivre @VDAODAO @polarker ?

Restructure FAQ - discussion

@Sakrecoer I'm thinking that we could improve the readability of the FAQ by having the different questions categories as sub-pages of the FAQ instead of having everything in one big pages.
What do you think ?

Links to edit a wiki page are broken

image

This can be edited in docusaurus.config.js here

I followed the instructions to edit it and replaced it with our repo URL, but it seems something is missing or i misunderstood how it works.

Template provided code having issues under "Test" command

benjaminlarkey@pop-os:~/Desktop/ContractsAlph/alephium-tutorial$ npx @alephium/cli@latest test
FAIL test/token.test.ts
● Test suite failed to run

test/token.test.ts:125:32 - error TS2339: Property 'contractId' does not exist on type 'DeployContractExecutionResult<ContractInstance>'.

125       const tokenId = deployed.contractId
                                   ~~~~~~~~~~
test/token.test.ts:126:37 - error TS2339: Property 'contractAddress' does not exist on type 'DeployContractExecutionResult<ContractInstance>'.

126       const tokenAddress = deployed.contractAddress
                                        ~~~~~~~~~~~~~~~
test/token.test.ts:127:23 - error TS2339: Property 'groupIndex' does not exist on type 'DeployContractExecutionResult<ContractInstance>'.

127       expect(deployed.groupIndex).toEqual(testGroup)
                          ~~~~~~~~~~

Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 1.961 s
Ran all test suites.
node:child_process:960
throw err;
^

Error: Command failed: npx --yes ts-node --transpile-only /home/benjaminlarkey/Desktop/ContractsAlph/alephium-tutorial/node_modules/@alephium/cli/cli_internal.ts test
at checkExecSyncError (node:child_process:885:11)
at execSync (node:child_process:957:15)
at Object. (/home/benjaminlarkey/Desktop/ContractsAlph/alephium-tutorial/node_modules/@alephium/cli/cli.js:34:1)
at Module._compile (node:internal/modules/cjs/loader:1275:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
at Module.load (node:internal/modules/cjs/loader:1133:32)
at Module._load (node:internal/modules/cjs/loader:972:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 52311,
stdout: null,
stderr: null
}

Node.js v19.9.0

Disable blog functionality

Blog functionality in Docusaurus seems to be a plugin, but i'm not familiar enough with yarn/npm to figure out how to disable it. I could hide it from the menu, but feels like a dirty fix.

TL;DR Unless we hide the blog from the menu, Someone-else® will need to figure out how to disable the blog. 😅

Feature request: internal search function

To help users orient themselves in the wiki, we'd be happy to see a search function being added to the docusaurus.

There seem to be several different ways to go about it, but all of them requires involvement from a developer. The releavant docusaursu documentation is available here: https://docusaurus.io/docs/search

Thanks 🙌

Transfer docs to a separate Crowdin project

As we discussed today in the translations meeting, we agreed to move the docs project to a separate crowdin project with less languages supported for now until we find people we trust that can approve translations outside of the core team.

Remove the dapps section

The entire dapps section can be removed since it's not ready for primetime; even the pages that appear done are definitely not compatible day-to-day with the evolution of things

Full-Node user.config

Is there documentation for the user.config arguments? No matter what I do I can't get my computer to mine on my other computer. Is there a documentation for all the arguments I can use in user.config?

Error regarding Tutorial Smart Contract Compilation

Failed to compile, error: Error: ENOENT: no such file or directory, scandir 'contracts'
node:child_process:946
throw err;
^

Error: Command failed: npx --yes ts-node --transpile-only /Users/benjaminlarkey/.npm/_npx/f1b120e1b513c04c/node_modules/@alephium/cli/cli_internal.ts compile
at checkExecSyncError (node:child_process:871:11)
at execSync (node:child_process:943:15)
at Object. (/Users/benjaminlarkey/.npm/_npx/f1b120e1b513c04c/node_modules/@alephium/cli/cli.js:34:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47 {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 54205,
stdout: null,
stderr: null
}

Node.js v18.12.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.