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

docs: give every template a README.md #191

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

joshua-mo-143
Copy link
Member

Description of change

Give every template a README.md in prep for templates rollout.

How has this been tested? (if applicable)

rocket/static-files/README.md Outdated Show resolved Hide resolved
templates.toml Outdated Show resolved Hide resolved
@joshua-mo-143 joshua-mo-143 marked this pull request as draft October 22, 2024 00:31
@joshua-mo-143 joshua-mo-143 marked this pull request as ready for review October 23, 2024 10:20
@joshua-mo-143 joshua-mo-143 marked this pull request as draft October 23, 2024 10:55
@joshua-mo-143 joshua-mo-143 marked this pull request as ready for review October 23, 2024 11:13
Copy link
Member

@jonaro00 jonaro00 left a comment

Choose a reason for hiding this comment

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

The fact that we've needed to add 1200 lines of mostly copy+pasted markdown in 54 files tells me some things:

  • We should drastically reduce the number of templates and increase the quality of the ones we maintain instead of plowing through the pain of adding and maintaining all of this.
  • If we are pasting the same text or structure in every README, it should tells us that we might need to improve/fix something else.

Before fixing every comment I've made, shall we discuss and be more strategic about what we want to achieve here? Can save us some work.

- Rust
- Node.js/NPM.
- Typescript.
- [cargo-shuttle](https://www.shuttle.dev)
Copy link
Member

Choose a reason for hiding this comment

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

Should this link instead say "Shuttle CLI", and the link be to the installation docs? (all READMEs)


## Troubleshooting
- Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add
the `--port <port-number>` to the `shuttle run` command to change this.
Copy link
Member

Choose a reason for hiding this comment

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

Any reason for having this specific hint on every single README? The run command will use a different port if the attempted one is occupied, so this isn't really a problem to begin with.

## Troubleshooting
- Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add
the `--port <port-number>` to the `shuttle run` command to change this.
- If connecting to OpenAI doesn't work, try checking your Secrets.toml file.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- If connecting to OpenAI doesn't work, try checking your Secrets.toml file.

Comment on lines +11 to +18
## Pre-requisites

- Rust
- [cargo-shuttle](https://www.shuttle.dev)

## How to use this template

Set your OpenAI API key in `Secrets.toml`.
Copy link
Member

Choose a reason for hiding this comment

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

OpenAI account pre-requisite

@@ -27,7 +27,7 @@ required-features = []

[[bin]]
name = "hello_world"
path = "src/bin/shuttle.rs"
path = "src/bin/shuttle.dev"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
path = "src/bin/shuttle.dev"
path = "src/bin/shuttle.rs"


## Introduction

This example shows how to use a Cargo workspace with Shuttle using the `rocket` web service frameowrk.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This example shows how to use a Cargo workspace with Shuttle using the `rocket` web service frameowrk.
This example shows how to use a Cargo workspace with Shuttle using the `rocket` web service framework.

Comment on lines +40 to +41
- Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add
the `--port <port-number>` to the `shuttle run` command to change this.
Copy link
Member

Choose a reason for hiding this comment

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

If we are keeping these, they can be removed from all non-web servers.


- Shuttle connects by default to port 8000 - if you're currently already using something at port 8000, you can add
the `--port <port-number>` to the `shuttle run` command to change this.
- If you're running locally don't ofrget to have Docker running!
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- If you're running locally don't ofrget to have Docker running!
- If you're running locally don't forget to have Docker running!

@@ -0,0 +1,37 @@
# `shuttle-cron`
Copy link
Member

Choose a reason for hiding this comment

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

wouldn't use inline code in title

@@ -0,0 +1,27 @@
# Warp Hello World
Copy link
Member

Choose a reason for hiding this comment

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

Side note: My intention with having each "template name" in templates.toml was that we could use that to render each template's <h1> tag instead of being forced to have this replicated in every README h1. Not a big deal tho. Both can be used at the same time.

@joshua-mo-143
Copy link
Member Author

Yeah I think at this point we should probably consolidate the list of examples into a much more focused list.

At the moment I'm seeing A/W, Axum and Rocket with Poise/Serenity being the main ones with a small amount of high-quality examples for each - it would make writing the readmes much easier

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