wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.85k stars 1.19k forks source link

add LLM helper component to docs #2340

Closed vincanger closed 3 weeks ago

vincanger commented 1 month ago

Description

I've seen other docs have this hidden helper component that allows LLMs to easily access all doc links. When I personally used Cursor and tried to add the url https://wasp-lang.dev/docs it would only be able to parse the introduction page of the docs. Hopefully this fixes that

Select what type of change this PR introduces:

  1. [x] Just code/docs improvement (no functional change).
  2. [ ] Bug fix (non-breaking change which fixes an issue).
  3. [ ] New feature (non-breaking change which adds functionality).
  4. [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).

Update Waspc ChangeLog and version if needed

If you did a bug fix, new feature, or breaking change, that affects waspc, make sure you satisfy the following:

  1. [ ] I updated ChangeLog.md with description of the change this PR introduces.
  2. [ ] I bumped waspc version in waspc.cabal to reflect changes I introduced, with regards to the version of the latest wasp release, if the bump was needed.

Update example apps if needed

If you did code changes and added a new feature or modified an existing feature, make sure you satisfy the following:

  1. [ ] I updated waspc/examples/todoApp as needed (updated modified feature or added new feature) and manually checked it works correctly.
  2. [ ] I updated waspc/headless-test/examples/todoApp and its e2e tests as needed (updated modified feature and its tests or added new feature and new tests for it).
vincanger commented 3 weeks ago

@Martinsos extracted the url cleansing into functions. wdyt?

Martinsos commented 3 weeks ago

@Martinsos extracted the url cleansing into functions. wdyt?

Looks good! You might want to extract these into some kind of utils file, so they can be reused elsewhere, but if you don't it is also not terrible, they are a bit specific so maybe that is for the best hm.

Btw, normally I would try to use a library for this, but there is none in stdlib -> there is for node, path.join, but not for client side -> and it would be a bit too much to pull in a library just for this, so sounds good.