Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the content of generated md files to be markdown compatible #43925

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 46 additions & 4 deletions cli/ballerina-cli/src/main/resources/new_cmd_defaults/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,47 @@
Prints "Hello, World!" with a hello function.
[//]: # (above is the package summary)

# Package Overview
Prints "Hello, World!" as the output to the command line using a hello function.

This package provides a simple utility function to print "Hello, World!" to the command line. It also supports personalized greetings by optionally accepting a name.

## Build from Source and Publish

### Build the Package

To build the package locally, execute the following command in the terminal:

```bash
bal pack
```

This command compiles the package and prepares it for use or distribution.

### Publish the Package

To publish the package to a local repository, use the following command:

```bash
bal push --repository=local
```

## Usage

To use the user/socialMedia package in your Ballerina project, import it along with the ballerina/io module for output handling.
(Note: For this example, we are assuming the organization name is `user` and the package name is `socialMedia`.)

```ballerina
import ballerina/io;
import user/socialMedia;

public function main() {
string greeting = socialMedia:hello("Ballerina");
io:println(greeting); // Output: Hello, Ballerina
}
```

The `hello` function can be called without any arguments to get the default greeting:

```ballerina
public function main() {
string greeting = socialMedia:hello();
io:println(greeting); // Output: Hello, World!
}
```