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 docs and schema for multiple readme files support #4743

Closed
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions docs/pyproject.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,29 @@ The readme file of the package. **Optional**

The file can be either `README.rst` or `README.md`.

```toml
[tool.poetry]
# ...
readme = "README.rst"
```

If you want to use multiple readme files, you can by wrapping the files in a list.

```toml
[tool.poetry]
# ...
readme = [
"README.rst",
"CHANGELOG.rst"
]
```

{{% note %}}
Note that a line break (`\n`) will be added between each file in the generated readme.

Additionally, all the listed files must be of same type, i.e. you cannot mix `.rst` and `.md`.
{{% /note %}}

## homepage

An URL to the website of the project. **Optional**
Expand Down
15 changes: 13 additions & 2 deletions src/poetry/json/schemas/poetry-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,19 @@
"$ref": "#/definitions/maintainers"
},
"readme": {
"type": "string",
"description": "The path to the README file"
"anyOf": [
{
"type": "string",
"description": "The path to the README file."
},
{
"type": "array",
"description": "A list of paths to the readme files.",
"items": {
"type": "string"
}
}
]
},
"classifiers": {
"type": "array",
Expand Down