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

Add information for line indenting #87

Closed
Paperzlel opened this issue Oct 7, 2023 · 6 comments
Closed

Add information for line indenting #87

Paperzlel opened this issue Oct 7, 2023 · 6 comments
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed

Comments

@Paperzlel
Copy link

In the current format understanding why the compiler doesn't like my presets is very unintuitive. I feel like having a way to let people know how many spaces to enter before their thing actually works is a bit of documentation that is really needed on each page in the docs.

@Paperzlel Paperzlel added the help wanted Extra attention is needed label Oct 7, 2023
@Pistonight
Copy link
Contributor

How many space you need really depend on the context and it's a YAML thing. Celer has a page for people not familiar with YAML to ramp up: https://celer.pistonite.org/docs/route/yaml-basics#nested-data

If there are ideas for how we could improve the YAML help page then I am happy to add it

There are examples on each page about specific features people can follow too, but obviously some examples are part of a file and it's not possible to get the indentation correct without listing the whole file

@Pistonight Pistonight added the documentation Improvements or additions to documentation label Oct 7, 2023
@Paperzlel
Copy link
Author

I guess thinking about it now, it'd be nice to have the "rules" of indenting listed on the YAML page, i.e. what indenting should be for each line and how the engine reads it (doing some science made me realise it's more lenient than my first comment says). There's a couple minor things, like perhaps showing how certain items would look in a mockup of a map, such as the Preset page which got me stumped whether to use hyphens or not (ideally people are less stupid than me).

If we're going picky on things I noticed in the docs, it doesn't mention putting the main.yaml in the same folder as the project.yaml in getting started, writing custom preset files / "use" files doesn't seem to mention you don't need the - in the file (which links to the config stuff since it's written like a custom file), and I had problem with getting the totk presets working due to the file structure not mentioning you want the raw file path and not the one in the https link.

Sorry if that's a lot, but small things here could probably help other people trying to learn this in the future. A quick access link to the docs would be nice as well from the editor :)

@Pistonight
Copy link
Contributor

it doesn't mention putting the main.yaml in the same folder as the project.yaml in getting started

will fix

writing custom preset files / "use" files doesn't seem to mention you don't need the - in the file (which links to the config stuff since it's written like a custom file

I guess this is related to the understanding of the use property. In basically all places, use means take the value parsed from that file and put it at the place where the use is. In the case of a config, the use is at a place where a mapping (object) is expected instead of an array, so that's what you need. Will add examples to the doc to make it easier to understand

In the case of use properties in a route, it's more flexible and it's documented here: https://celer.pistonite.org/docs/route/route-structure

I had problem with getting the totk presets working due to the file structure not mentioning you want the raw file path and not the one in the https link

Not sure what this means. You can utilize this syntax to pull totk presets from the main branch of this repo. It's not an explicit example in the doc though since the doc is about celer, not specifically totk

use: Pistonite/celer/presets/totk/xxx.yaml

See https://github.com/Pistonite/celer/tree/main/presets/totk for what's available. For further questions about the preset themselves just ask in the discord. (The presets are maintained by savage)

Also the file structure page never mentions you could use a random https link. It always has to be a local path or a github reference, and the syntax for each case is documented in detail

@Paperzlel
Copy link
Author

Yeah what I meant for the link was that the link in the search bar was not the same as the path to the folder in github, probably just a thing to point out for those unaware of the differences.

@Pistonight
Copy link
Contributor

Also I just realized the doc does mention you don't need the - for config files included by use: https://celer.pistonite.org/docs/route/configuration#configuration-files
(doesn't use that wording though, I will adjust it)

@Pistonight
Copy link
Contributor

Changes were done in #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants