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

Switch documentation to a combination of silverbullet-pub and mkdocs #71

Merged
merged 2 commits into from
Sep 16, 2024

Conversation

justyns
Copy link
Owner

@justyns justyns commented Sep 16, 2024

UI stuff is not my strongsuit, and I'd rather not try making a full-fledged docs website. After looking at a few options, I settled on using mkdocs-material which looks pretty good imo.

Docs are now being rendered first by silverbullet-pub to render queries/templates, and then being processed by mkdocs (and mkdocs-material) to turn it into a prettier docs website.

@justyns justyns added the documentation Improvements or additions to documentation label Sep 16, 2024
Copy link
Contributor

coderabbitai bot commented Sep 16, 2024

Walkthrough

Walkthrough

The pull request encompasses a series of updates to documentation files associated with the AI Core Library. Key changes include the renaming of template references, the introduction of new commands and features, the addition of deprecation warnings for certain commands, and enhancements to the overall structure and formatting of documentation. Additionally, a new script was introduced to improve the MkDocs documentation generation process.

Changes

File(s) Change Summary
docs/AI Core Library.md Updated rendering commands for templates; removed sync-mode note.
docs/Changelog.md Updated to reflect enhancements, including new features and documentation revamp.
docs/Commands/AI: Call OpenAI with Note as context.md Added deprecation warning for the command, advising users to switch to templated prompts.
docs/Commands/AI: Generate Note FrontMatter.md Minor formatting change to experimental status note.
docs/Commands/AI: Insert Summary.md Added deprecation warning for the command, recommending templated prompts.
docs/Commands/AI: Select Embedding Model from Config.md Added template section for command summary.
docs/Commands/AI: Select Image Model from Config.md Added template code block for command summary.
docs/Commands/AI: Select Text Model from Config.md Added template section for command summary.
docs/Commands/AI: Stream response with selection or note as prompt.md Added deprecation warning for the command, suggesting templated prompts.
docs/Commands/AI: Summarize Note and open summary.md Added deprecation warning for the command, recommending templated prompts.
docs/Commands/AI: Test Embedding Generation.md Added template code block for command summary.
docs/Development.md Expanded documentation on working with docs/ directory and real-time updates.
docs/Installation.md Modified latest release description for clarity.
docs/Library/AIDocs/Query/AI Template.md Introduced a new template structure for AI documentation.
docs/Quick Start.md Minor formatting adjustment to model selection note.
docs/Templated Prompts.md Minor formatting adjustment to note section.
docs/mkdocs-sb.py Introduced script for processing wiki-style links and converting admonitions for MkDocs.

Possibly related PRs


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai generate interesting stats about this repository and render them as a table.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range and nitpick comments (2)
docs/Commands/AI: Summarize Note and open summary.md (1)

6-8: Deprecation warning is clear and helpful.

The deprecation warning is prominently placed and effectively communicates to users that they should transition to using "Templated Prompts" instead. This is a good practice to guide users towards the preferred approach.

To further enhance the documentation, consider the following suggestions:

  1. Provide a brief explanation of why the command is being deprecated. This can help users understand the rationale behind the change.

  2. Include a link to the documentation for "Templated Prompts" to make it easier for users to find information on the alternative approach.

  3. If applicable, mention any migration steps or considerations users should be aware of when transitioning from this command to "Templated Prompts".

These additions can make the deprecation process smoother and more informative for users.

docs/Changelog.md (1)

76-76: Remove the empty line before the horizontal rule for consistency.

To maintain consistency with the rest of the changelog entries, consider removing the empty line before the horizontal rule separating the entries. This will improve the readability of the changelog.

Apply this diff to remove the empty line:

-
 ---
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1eff73e and 49b9d9d.

Files ignored due to path filters (4)
  • .github/workflows/gh-pages-docs.yml is excluded by none and included by none
  • .gitignore is excluded by none and included by none
  • mkdocs.yml is excluded by none and included by none
  • render-docs.sh is excluded by none and included by none
Files selected for processing (17)
  • docs/AI Core Library.md (2 hunks)
  • docs/Changelog.md (2 hunks)
  • docs/Commands/AI: Call OpenAI with Note as context.md (1 hunks)
  • docs/Commands/AI: Generate Note FrontMatter.md (1 hunks)
  • docs/Commands/AI: Insert Summary.md (1 hunks)
  • docs/Commands/AI: Select Embedding Model from Config.md (1 hunks)
  • docs/Commands/AI: Select Image Model from Config.md (1 hunks)
  • docs/Commands/AI: Select Text Model from Config.md (1 hunks)
  • docs/Commands/AI: Stream response with selection or note as prompt.md (1 hunks)
  • docs/Commands/AI: Summarize Note and open summary.md (1 hunks)
  • docs/Commands/AI: Test Embedding Generation.md (1 hunks)
  • docs/Development.md (1 hunks)
  • docs/Installation.md (1 hunks)
  • docs/Library/AIDocs/Query/AI Template.md (1 hunks)
  • docs/Quick Start.md (1 hunks)
  • docs/Templated Prompts.md (1 hunks)
  • docs/mkdocs-sb.py (1 hunks)
Files skipped from review due to trivial changes (8)
  • docs/AI Core Library.md
  • docs/Commands/AI: Select Embedding Model from Config.md
  • docs/Commands/AI: Select Image Model from Config.md
  • docs/Commands/AI: Select Text Model from Config.md
  • docs/Commands/AI: Test Embedding Generation.md
  • docs/Installation.md
  • docs/Quick Start.md
  • docs/Templated Prompts.md
Additional context used
Path-based instructions (8)
docs/Library/AIDocs/Query/AI Template.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

docs/Commands/AI: Stream response with selection or note as prompt.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

docs/Commands/AI: Insert Summary.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

docs/Commands/AI: Summarize Note and open summary.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

docs/Commands/AI: Call OpenAI with Note as context.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

docs/Commands/AI: Generate Note FrontMatter.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

docs/Development.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

docs/Changelog.md (1)

Pattern **/*.md: Review these markdown files. They are written for a markdown note taking tool called Silverbullet, and may contain extra syntax not typically found in markdown.

Ensure any documentation makes sense and is good.

LanguageTool
docs/Commands/AI: Generate Note FrontMatter.md

[style] ~8-~8: Consider using a shorter alternative to avoid wordiness.
Context: ...e submit feedback if you have ideas for making it better. This command will attempt to extract ...

(MADE_IT_JJR)

docs/Development.md

[style] ~26-~26: Consider using a different verb to strengthen your wording.
Context: ...nd load the new version of the plug (or speed up this process by running the {[Sync: Now...

(SPEED_UP_ACCELERATE)

Additional comments not posted (13)
docs/Library/AIDocs/Query/AI Template.md (1)

1-8: The AI documentation template looks great!

The template provides a clear and consistent structure for documenting AI prompts and their associated details. The use of conditional rendering based on the presence of an aiprompt object allows for flexibility in displaying either specific or general descriptions. Additionally, the optional usage information enhances the documentation's usability.

Suggestions for further improvement:

  • Consider adding more optional sections, such as examples or best practices, to provide additional context and guidance for using the AI prompts.
  • If applicable, include a section for documenting any limitations or considerations when using the AI prompts.

Overall, the template is well-structured and will contribute to a more organized and informative AI documentation.

docs/Commands/AI: Stream response with selection or note as prompt.md (1)

5-7: LGTM!

The deprecation warning is clear, well-placed, and provides an alternative command to use. This effectively communicates the deprecation and guides users to transition to the new recommended approach.

docs/Commands/AI: Insert Summary.md (1)

8-8: LGTM!

The deprecation warning is clear, prominently placed, and provides an alternative for users. This effectively communicates the change in the command's status and guides users to the recommended approach.

docs/Commands/AI: Call OpenAI with Note as context.md (1)

9-9: The deprecation warning is clear and informative.

The warning effectively communicates that the command is deprecated and should not be used. It also provides a clear alternative by directing users to use [[Templated Prompts]] instead.

The prominent placement of the warning using a blockquote and bold text ensures that users will notice the deprecation message.

docs/Commands/AI: Generate Note FrontMatter.md (1)

8-8: The changes improve the documentation.

Formatting the experimental note as a block quote enhances its visibility and makes the documentation more readable. The documentation clearly explains the purpose of the command and provides instructions for adding additional rules. It also sets the right expectations about the LLM's behavior without specific prompt rules.

Great job on improving the documentation!

Tools
LanguageTool

[style] ~8-~8: Consider using a shorter alternative to avoid wordiness.
Context: ...e submit feedback if you have ideas for making it better. This command will attempt to extract ...

(MADE_IT_JJR)

docs/Development.md (2)

26-26: LGTM!

The segment provides a helpful tip to speed up the process of loading the new version of the plug. The current wording is clear and concise.

Tools
LanguageTool

[style] ~26-~26: Consider using a different verb to strengthen your wording.
Context: ...nd load the new version of the plug (or speed up this process by running the {[Sync: Now...

(SPEED_UP_ACCELERATE)


29-42: Excellent documentation!

The new documentation section provides clear and well-explained instructions for rendering documentation using silverbullet-pub and mkdocs. The instructions for making changes locally and seeing real-time updates are very helpful for developers working on the documentation. The mention of manually editing markdown files using any editor provides flexibility to developers.

Great job on enhancing the documentation process!

docs/mkdocs-sb.py (5)

10-14: LGTM!

The function logic is correct, and the implementation is accurate. It effectively checks for the existence of the target Markdown file based on the provided link.


16-29: LGTM!

The function logic is correct, and the implementation is accurate. It effectively processes the wiki link matches, finds the target files, and constructs the appropriate Markdown links.


31-34: LGTM!

The function logic is correct, and the implementation is accurate. It effectively converts blockquotes with bold headers into MkDocs-style admonitions, improving the formatting and presentation of notes within the documentation.


36-39: LGTM!

The function logic is correct, and the implementation is accurate. It effectively identifies and replaces wiki-style links in the Markdown text by invoking the replace_wiki_link function for each match.


41-45: LGTM!

The event handler is implemented correctly. It effectively integrates the link processing and admonition conversion into the MkDocs page rendering process by modifying the Markdown content before it is rendered.

docs/Changelog.md (1)

32-32: Documentation website revamp looks good!

The update to use mkdocs and mkdocs-material in addition to silverbullet-pub aligns with the PR objectives and seems to be a well-thought-out approach to enhance the documentation experience by improving the structure and presentation while still leveraging silverbullet-pub for specific functionalities.

@justyns justyns merged commit 9eea112 into main Sep 16, 2024
3 checks passed
@justyns justyns deleted the mkdocs branch September 16, 2024 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant