-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
- 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.
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.
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
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.
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.
- Changed the text "Regenerating manifest" to "Regenerating SSG assets"
- 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.
- 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.
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.