Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add llms.txt and llms-all.txt endpoints for LLM-friendly content #474
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
base: master
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
Add llms.txt and llms-all.txt endpoints for LLM-friendly content #474
Changes from 6 commits
fcb6006534d7f75672dcbc28a82395027388f72c64dbea30be81267c8e8ac67082658c063bfb33407c051aaa2a677fa7fbc013fb2File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing permission check Warning
Check warning
Code scanning / Jenkins Security Scan
Stapler: Missing POST/RequirePOST annotation Warning
Check warning on line 71 in src/main/java/io/jenkins/plugins/designlibrary/Home.java
Partially covered line
Check warning on line 76 in src/main/java/io/jenkins/plugins/designlibrary/Home.java
Partially covered line
Check warning on line 85 in src/main/java/io/jenkins/plugins/designlibrary/Home.java
Not covered lines
Check warning on line 91 in src/main/java/io/jenkins/plugins/designlibrary/Home.java
Partially covered line
Check warning on line 94 in src/main/java/io/jenkins/plugins/designlibrary/Home.java
Not covered line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't workable, better to just commit markdown files.
@janfaracik think its worth trying to generate jelly from markdown or just keep a markdown copy and a jelly version?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's fair, the Jelly-parsing approach technically works but it's fragile. Any new pattern someone adds to a component Jelly file would need another special case in the parser.
Even just building this I ran into a bunch of edge cases while manually checking each page, things like half-encoded tag names in property values, 'br' inside i18n strings causing two sentences to run together, Java generics inside code container spans getting stripped by the tag cleaner, and Colors using j:forEach which makes the Jelly basically unparseable statically. Each one took a while to track down. So I get why this isn't the right long-term approach.
One option, we could use the current implementation as a one-time generation tool to get all the content out, then delete LlmContent.java entirely and just commit the generated .md files directly. That way the content isn't lost but there's no fragile parser living in the codebase.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah give it a go, will need to run it past others of whether we want:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where should the .md files live? Either alongside each component's existing resources (src/main/resources/.../AppBars/index.md) or in a dedicated top-level folder like docs/llms/app-bars.md?
Should the HTTP endpoints still work and serve these files, or are the committed files enough? If the URLs need to keep working, we still need some Java code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check warning on line 77 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Partially covered line
Check warning on line 83 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Not covered lines
Check warning on line 95 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Partially covered line
Check warning on line 96 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Not covered line
Check warning on line 106 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Not covered line
Check warning on line 115 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Partially covered line
Check warning on line 118 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Not covered line
Check warning on line 119 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Partially covered line
Check warning on line 120 in src/main/java/io/jenkins/plugins/designlibrary/LlmContent.java
Not covered line
Uh oh!
There was an error while loading. Please reload this page.