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

Tool: Add Watcher feature to Manifest and SSG #47

Merged
merged 10 commits into from
Jul 6, 2024
Merged

Commits on Jul 5, 2024

  1. feat(tool): add --generate-manifest flag to SSG command

    This commit adds a new feature to the SSG command by introducing the `--generate-manifest` flag. When this flag is used, a manifest file will be generated for the local vault if it is missing. The manifest file contains information about all the files in the vault.
    
    The changes include:
    - Added a new boolean property `GenerateManifest` to the `GenerateStaticSiteCommandSettings` class.
    - Modified the `ExecuteAsync` method in the `GenerateStaticSite` class to check if the `GenerateManifest` flag is set and generate a manifest using the `GenerateManifestAsync` method from the `GenerateManifestCommand`.
    - Created a new internal static method called `WriteStaticFilesAsync`, which writes static files to disk.
    - Updated existing code to use this new method instead of duplicating code.
    
    These changes enhance the functionality of the SSG command by providing an option to generate a manifest file for better organization and management of files in the vault.
    SakuraIsayeki committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    75a34f6 View commit details
    Browse the repository at this point in the history
  2. feat(styles): Update code block syntax mixin

    - Updated the `code-block-syntax` mixin in `_mixins.scss`
    - Added support for multiple languages by accepting an array of language names
    - Each language now has its own CSS class and pre tag styling
    
    This commit improves the flexibility and extensibility of the code block syntax mixin, allowing it to handle multiple programming languages more effectively.
    SakuraIsayeki committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    cd06151 View commit details
    Browse the repository at this point in the history
  3. feat(tool): Add --watch flag for manifest update command

    This commit adds a new `--watch` command option to the `GenerateManifestCommand` class. When this option is specified, the command will watch the vault for changes and automatically regenerate the manifest whenever a change is detected. The generated manifest will then be written to disk.
    
    The code changes include:
    - Added a new `Watch` property to the `GenerateManifestSettings` class.
    - Modified the validation logic in the `Validate()` method of the `GenerateManifestSettings` class to allow for watching even if force mode is not enabled.
    - Added logic in the `GenerateManifestCommand` class to handle watching for vault updates and regenerating the manifest accordingly.
    - Updated error handling in case an error occurs while regenerating or writing the manifest.
    
    These changes enhance the functionality of generating manifests by providing an automated way to keep them up-to-date with any changes made to the vault.
    SakuraIsayeki committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    ab8fb33 View commit details
    Browse the repository at this point in the history
  4. feat(FileSystemVault): Add file change debouncing mechanism

    This commit adds a file change debouncing mechanism to the `FileSystemVault` class. It introduces a dictionary of file change locks, which helps mitigate duplicate dispatches of a given file change event. The debounce period between file changes is set to 100 milliseconds.
    
    The code changes include:
    - Addition of `_fileChangeLocks` dictionary to store file change locks
    - Introduction of `DebouncePeriod` constant for setting the debounce period
    - Implementation of logic to check and update the reference hash at the time of lock acquisition
    - Dispatching the `VaultUpdate` event only if the debounce period has elapsed since the last change
    SakuraIsayeki committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    0fb0f76 View commit details
    Browse the repository at this point in the history
  5. feat(tool): Add --watch flag for SSG command

    This commit adds support for the `--watch` flag in the SSG (Static Site Generator) command. The `--watch` flag allows the tool to watch the vault for changes and automatically regenerate the static site when changes are detected.
    
    In the `GenerateManifestCommand.cs` file:
    - Added a new property `Watch` to the `GenerateManifestCommandSettings` class.
    - Modified the existing code to handle the new `Watch` flag.
    - Updated status messages and error handling related to watching for vault changes.
    
    In the `GenerateStaticSiteCommand.cs` file:
    - Added a new property `Watch` to the `GenerateStaticSiteCommandSettings` class.
    - Modified the existing code to handle the new `Watch` flag.
    - Updated status messages and error handling related to watching for vault changes.
    
    These changes enable users of our tool to conveniently generate and update their static sites by simply using the `--watch` flag.
    SakuraIsayeki committed Jul 5, 2024
    Configuration menu
    Copy the full SHA
    1ed616e View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2024

  1. fix(FileSystemVault): Fix ToRelativePath method

    The ToRelativePath method in the FileSystemVault class has been updated to replace backslashes with forward slashes. This change ensures consistent path formatting across different platforms.
    SakuraIsayeki committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    69c64c5 View commit details
    Browse the repository at this point in the history
  2. fix(ssg): Update status message

    - Changed the text "Regenerating manifest" to "Regenerating SSG assets"
    SakuraIsayeki committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    3842ef0 View commit details
    Browse the repository at this point in the history
  3. docs: Update documentation on CLI Commands

    - Removed the "Features" section from `Index.md`.
    - Updated the content and structure of `Static Site Generation.md` to provide more detailed information about exporting Obsidian vaults to HTML files.
    - Added developer features section in `Static Site Generation.md` and `Vault Manifests.md`, providing additional options for development and automation purposes.
    - Updated the default exclusions list in `Vault Manifests.md`.
    - Added developer features section in `Vault Manifests.md`, explaining extra functionalities available for developers when using the manifest command.
    SakuraIsayeki committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    4738277 View commit details
    Browse the repository at this point in the history
  4. styles: Update font sizes and margins in global styles

    - Updated font sizes for h2, h3, h4, h5, and h6 headings in _global.scss
    - Adjusted margin-bottom for font styles mixin in _mixins.scss
    
    This commit updates the font sizes for various heading levels (h2 to h6) in the global styles. The font size values have been adjusted to improve readability and visual hierarchy. Additionally, the margin-bottom value in the font styles mixin has been modified to create more consistent spacing between elements.
    SakuraIsayeki committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    eeaeffe View commit details
    Browse the repository at this point in the history
  5. feat(styles): Add new callout colors

    This commit adds new callout colors to the `_content.scss` file. Specifically, it includes the colors for "note" and "tip" callouts. These colors are used to set the background color of the respective callouts and adjust their title text color accordingly.
    SakuraIsayeki committed Jul 6, 2024
    Configuration menu
    Copy the full SHA
    0ef4aa2 View commit details
    Browse the repository at this point in the history