diff --git a/docs/pyproject.md b/docs/pyproject.md index 96c40280e40..73900c092db 100644 --- a/docs/pyproject.md +++ b/docs/pyproject.md @@ -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** diff --git a/src/poetry/json/schemas/poetry-schema.json b/src/poetry/json/schemas/poetry-schema.json index fe916f1e04e..b5b5bab77a8 100644 --- a/src/poetry/json/schemas/poetry-schema.json +++ b/src/poetry/json/schemas/poetry-schema.json @@ -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",