Repository navigation
docs: add library tutorials chapter (steem-js + steemgosdk demos) - #51
Merged
Merged
Conversation
Phase 7: migrate the usage examples of the two official client libraries into a new en-only docs/tutorials/ section (9 pages) and add an en-root sidebar Tutorials group between Guides and Services. All 268 source code blocks are migrated byte-for-byte (machine-audited). Quality gates: node --check 201/201 js blocks, 3 read demos executed against https://api.steemit.com, gofmt -e 53/53 go blocks, pnpm build exit 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Library tutorials chapter (steem-js + steemgosdk demos)
Phase-7 tutorials chapter: migrates the usage examples of the two official Steem client libraries into a new en-only
docs/tutorials/section.@steemit/steem-js1.2.4) — source:steem-js/docs/(README.md + signedCall-examples.md + signature-verification-examples.md + RPC-AUTH-MIGRATION.md), repo: https://github.com/steemit/steem-jsgithub.com/steemit/steemgosdk) — source:steemgosdk/docs/(examples.md + signed-call.md), repo: https://github.com/steemit/steemgosdkThe internal engineering notes of the steem-js repo (
refactoring-2025,any-type-analysis,BASELINE_VALUES,DEBUG,OPERATIONS-JSON-PITFALLS) were deliberately not migrated; the one sentence in the broadcast page that linked toOPERATIONS-JSON-PITFALLS.mdwas trimmed accordingly.New pages (9) + sidebar
docs/tutorials/index.mddocs/tutorials/steem-js/index.mdconfig.set/setUrl/setOptions/ multiple instances), JSON-RPC overview, API routing, usage examples, TypeScript support, error handlingdocs/tutorials/steem-js/read-api.mddocs/tutorials/steem-js/broadcast.mddocs/tutorials/steem-js/signed-calls.mdsignedCall/signedCallAsync+ signature verification — the two library example guides merged with the README sectionsdocs/tutorials/steem-js/rpc-auth-migration.mddocs/tutorials/steemgosdk/index.mddocs/tutorials/steemgosdk/broadcast.mddocs/tutorials/steemgosdk/signed-call.mdconfig.mts: en root sidebar gains a Tutorials group between Guides and Services (overview + 5 steem-js pages + 3 steemgosdk pages). Other locales untouched (en-only, consistent with the existing Guides chapters; the i18nRouting caveat in config covers this).Section placement decisions
Code-block audit (machine-verified)
Every fenced code block of every source file appears in the output pages byte-for-byte (fence language tags and block bodies unchanged; verified by script, multiset comparison over
(lang, content)):No source block was dropped, cherry-picked, or altered; no extra code blocks were introduced in the new prose. Only heading wording/placement and navigation prose were adjusted (frontmatter, page intros, cross-page links, "Where to go next" sections).
Quality gates
node --checkon all 201javascriptblocks: PASS (201/201). Each block was extracted to a temp file and parse-checked (strategies: plain CJS, ESM.mjs, async-wrapper, expression wrapper for return-value object literals). The 5typescriptblocks were additionally parse-checked withtsc --noEmit --noResolve— README's TS block is syntactically clean; two RPC-AUTH blocks contain...ellipsis placeholders that never parsed (see defects below).https://api.steemit.comfrom a temporary harness inside the steem-js checkout (deleted afterwards):getAccountsAsync(['ned','dan'])→ both accounts returned;getOpsInBlockAsync(10000001, false)→ 16 ops (first: vote);getDynamicGlobalPropertiesAsync()→ head_block_number 111009518. All succeeded.gofmt -eon all 53goblocks: PASS (53/53). Full-file blocks parse as-is (31); statement/func fragments parse with a harness wrapper (21) and one import+statement fragment with an import-split harness (1). Fragment wrapping is check-harness only — page content is untouched.NODE_OPTIONS=--max-old-space-size=8192 pnpm build→ exit 0 (268.97s, docs:gen + VitePress 1.6.4; all 9 tutorial pages rendered intodist/tutorials/; VitePress dead-link check passed).Source defects preserved (not silently fixed)
Structural (markdown), repaired only at the fence level — block bodies byte-identical:
steem-js/docs/README.mdL245: a```javascriptfence is never closed; the next fence at L271 was silently swallowed by naive renderers. Migration adds the missing closing fence after L267.steem-js/docs/signedCall-examples.mdL453: stray orphan closing fence after thesignedCallAsyncsection (it would otherwise turn the following prose into a code block). Migration drops the stray line.Suspected outdated / non-compilable content, kept verbatim as in the originals:
RPC-AUTH-MIGRATION.mdL26/L38:assert.equal(...)andexpect(...).toBe(...)use bare...placeholders — not valid TS/JS syntax (illustrative elision in the source doc).steemgosdk/docs/signed-call.md"Custom Verification" block mixes a package import with top-level statements — not a compilable Go unit as written.ned/danaccounts, block 10000001,0.19.2version strings in return examples,conveyor.is_email_registeredsigned-call target). They are documentation samples and were preserved unchanged; the three demos we actually executed work against the live node.Site conventions
title+ explicit#H1; internal links in.htmlform (directory form for section index pages); pages interlink via intros and "Where to go next" sections./api/broadcast_ops/).developers.steem.ioresource links were replaced by GitHub repo + in-site API Reference links.🚫 Not merging — left for review.