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

Generating ElmBooks based on doc comments #38

Open
Orasund opened this issue Oct 19, 2022 · 1 comment
Open

Generating ElmBooks based on doc comments #38

Orasund opened this issue Oct 19, 2022 · 1 comment

Comments

@Orasund
Copy link

Orasund commented Oct 19, 2022

In The Roadmap you write

Generating ElmBooks based on doc comments – the same that are used to generate docs on elm-packages. This could allow published elm packages to automatically have their own ElmBook with example codes turning into live components and no code duplication.

Is this still up for grabs? I'm currently interested in anything related to generating content and am currently investigating different ways of doing so. This task might be a good way to explore various possibilities.

Some technologies I want to explore using this task:

  • Elm-codegen - generates code using Elm
  • Elm-pen - generates code using Moustache Files & Json
  • elm-posix - lets you read & write files using node.js
@Orasund
Copy link
Author

Orasund commented Oct 21, 2022

I actually have already something to show: Checkout this Documentation
You find the code here. The steps needed to get to the documentation where the following:

  1. Create an Elm file containing the documentation (See ElmBook.Gen.Doc.Module inside the generated folder)
  2. Create Elm-Book chapters (See ElmBook.Docs in src)
  3. Copy the created files into the main source code folder (this step is currently missing)
  4. Create your Elm-Book like usual and include ElmBook.Docs.chapters in the list of chapters.

What's missing is the CLI that automates these processes. I'm also not sure if I should create a new repository for this or if it should live inside this repository...?

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

No branches or pull requests

1 participant