elastic / elastic/elastic-package

`elastic-package create package` of type content, renders the readme template at `docs`

Open
#3,135 1 comment 0 reactions 0 assignees View on GitHub
bug Team:Ecosystem
Dominant language
Go
Stars
72
Forks
141
Avg merge
19h 42m
Merged PRs (30d)
55

Description

When creating a package of type `content` the template for the readme goes into `doc` folder.
https://github.com/elastic/elastic-package/blob/aca24a959c8cd5b8c1028f8851311b47c72eec4c/internal/packages/archetype/package.go#L51

As the `content` type package does not have a `_div` folder, when the command `elastic-package check` [runs the readme updater](https://github.com/elastic/elastic-package/blob/aca24a959c8cd5b8c1028f8851311b47c72eec4c/internal/docs/readme.go#L40), it does not detect the content package readme file, so the file goes as template format all along into the build and build zip.

Some solutions for this could be:

- Implement the `_dev` folder at the `content` type packages, so the templates land there and they can be updated correctly into the `docs`
- When creating the `content` package, go a step ahead and do the render of the readme in that moment. This way the readme file will be static.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read internal/packages/archetype/package.go around line 51 and internal/docs/readme.go around line 40 to trace how content package READMEs are created and updated. Run the relevant package creation, check, and build flows, then decide which documented approach is intended. Done means a content package README is rendered or updated correctly and the build archive contains the rendered file rather than the template.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.