Skip to content

docs: Add comprehensive Docusaurus documentation site#165

Open
teyouale wants to merge 3 commits into
IBM:mainfrom
teyouale:joel-docs/add-docusaurus-site
Open

docs: Add comprehensive Docusaurus documentation site#165
teyouale wants to merge 3 commits into
IBM:mainfrom
teyouale:joel-docs/add-docusaurus-site

Conversation

@teyouale
Copy link
Copy Markdown

@teyouale teyouale commented May 13, 2026

Eyouale Degefaw added 3 commits May 13, 2026 10:12
- Add complete documentation structure with guides, concepts, and recipes
 - Add Algolia search configuration
Copy link
Copy Markdown
Collaborator

@CarstenLeue CarstenLeue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have two main points:

  • the build output should go to the gh-pages branch
  • the examples should NOT be part of the markdown files, but rather go examples pulled into the markdown at build time


- uses: actions/setup-node@v4
with:
node-version: 20
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use the latest LTS


deploy:
environment:
name: github-pages
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this deploy to?
In a github pages deployment I would expect this to be deployed to the branch that actually serves up github pages.

Transform data through a series of operations using function composition.

<CodeCard file="basic-pipeline.go">
{`package main
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code should not live in this MD file, because nothing validates that this is actually compilable code.

Instead all code examples should reference an _test.go file and in that file an ExampleXXX function. That way all examples are executed at compile time and we are sure they compile.

When the docusaurus site gets build the examples need to be inserted into the docusaurus markdown.

This can e.g. be done via the https://github.com/campoy/embedmd tool (running as a pre-processor over the docusaurus files) or via a remark plugin.


<CodeCard file="processUser.go" status="tested">
{`// fp-go v2 approach
func processUser(id string) ioresult.IOResult[User] {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be

func processUser() readerioresult.ReaderIOResult[string, *User] {
    return function.Flow3(
        fetchUser,
        ioresult.Chain(validateUser),
        ioresult.Chain(saveUser),
    )
}

"github.com/IBM/fp-go/v2/function"
)

func processUser(id string) result.Result[User] {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example should be

func processUser() readerresult.ReaderResult[string, User] {
    return function.Flow4(
        fetchUser,
        result.Chain(validateUser),
        result.Chain(enrichUser),
        result.Chain(saveUser),
    )
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants