Add GH Action workflow to check spell (#1221)

This commit is contained in:
Zhizhen He
2023-05-15 00:16:08 +08:00
committed by GitHub
parent 25d9b5e459
commit 626a323193
28 changed files with 60 additions and 39 deletions

View File

@@ -9,6 +9,16 @@ on:
- master
jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling with custom config file
uses: crate-ci/typos@v1.14.8
with:
config: ./typos.toml
lint:
name: Lint
runs-on: ubuntu-22.04

View File

@@ -14,7 +14,7 @@ Currently it is not possible within Foam to include other notes into a note. Nex
Initial work and thought on including a note was ignited by issue [#652](https://github.com/foambubble/foam/issues/652). Requested by a user was a likewise functionality as offered in Obsidian. This was simply the ability to include a note.
Whilst researching digital gardening for my own setup, I came across an in-depth overview by [Maggie Appleton](https://maggieappleton.com/roam-garden). Showing examples of her personal Roam Research I see valuable possibilites to connect more information, if we would add additional functionalities to the possibility of including a note. This proposal displays these possible functionalities and markup.
Whilst researching digital gardening for my own setup, I came across an in-depth overview by [Maggie Appleton](https://maggieappleton.com/roam-garden). Showing examples of her personal Roam Research I see valuable possibilities to connect more information, if we would add additional functionalities to the possibility of including a note. This proposal displays these possible functionalities and markup.
## New features
@@ -29,7 +29,7 @@ The minimal functionality is the ability to fully include a note. Markup used in
### Include a section of a note
It could be interesting to only include a section of a note instead of the entire note. In order to do so thse user should be able to use the following syntax:
It could be interesting to only include a section of a note instead of the entire note. In order to do so the user should be able to use the following syntax:
`![[wikilink#section-b]]`
@@ -37,11 +37,11 @@ As a result it will include the section title + section content until the next s
### Include an attribute of a file (note property or frontmatter)
As a user I could be interested in collecting the value of any given proeprty for a note. For example, I might want to include the tags as defined in the frontmatter of note A. This should be possible via the syntax:
As a user I could be interested in collecting the value of any given property for a note. For example, I might want to include the tags as defined in the frontmatter of note A. This should be possible via the syntax:
`![[wikilink:<property>]]`
The property value should be lookedup by foam defined properties, e.g. title, **or** any property defined in the frontmatter of a note.
The property value should be looked up by foam defined properties, e.g. title, **or** any property defined in the frontmatter of a note.
So, the example of including the tags of a note should be:

View File

@@ -117,7 +117,7 @@ The potential solution:
enum LinkReferenceDefinitions {
Off, // link reference definitions are not generated
WithExtensions, // link reference definitions contain .md (or similar) file extensions
WithoutExtensions // link reference definitions do not contain file extenions
WithoutExtensions // link reference definitions do not contain file extensions
}
```

View File

@@ -20,6 +20,6 @@
- select "tags" in top left
- select the tag that was just released, click "edit" and copy release information from changelog
- publish (no need to attach artifacts)
8. Annouce on Discord
8. Announce on Discord
Steps 1 to 6 should really be replaced by a GitHub action...
Steps 1 to 6 should really be replaced by a GitHub action...

View File

@@ -2,7 +2,7 @@
Foam has various commands that you can explore by calling the command palette and typing "Foam".
In particular, some commands can be very customizible and can help with custom workflows and use cases.
In particular, some commands can be very customizable and can help with custom workflows and use cases.
## foam-vscode.create-note command

View File

@@ -62,7 +62,7 @@ It is possible to customize the style of a node based on the `type` property in
There are a few default node types defined by Foam that are displayed in the graph:
- `note` defines the color for regular nodes whose documents have not overriden the `type` property.
- `note` defines the color for regular nodes whose documents have not overridden the `type` property.
- `placeholder` defines the color for links that don't match any existing note. This is a [[placeholder]] because no file with such name exists.
- see [[wikilinks]] for more info <!--NOTE: this placeholder link should NOT have an associated file. This is to demonstrate the custom coloring-->
- `tag` defines the color for nodes representing #tags, allowing tags to be used as graph nodes similar to backlinks.

View File

@@ -4,7 +4,7 @@ In some situations it might be useful to include the content of another note in
## Including a note
Including a note can be done by adding an `!` before a wikilink defintion. For example `![[wikilink]]`.
Including a note can be done by adding an `!` before a wikilink definition. For example `![[wikilink]]`.
## Custom styling

View File

@@ -19,7 +19,7 @@ keywords: hello world, bonjour
---
```
This sets the `type` of this document to `feature` and sets **three** keywords for the document: `hello`, `world`, and `bonjour`. The YAML parser will treat both spaces and commas as the seperators for these YAML properties. If you want to use multi-word values for these properties, you will need to combine the words with dashes or underscores (i.e. instead of `hello world`, use `hello_world` or `hello-world`).
This sets the `type` of this document to `feature` and sets **three** keywords for the document: `hello`, `world`, and `bonjour`. The YAML parser will treat both spaces and commas as the separators for these YAML properties. If you want to use multi-word values for these properties, you will need to combine the words with dashes or underscores (i.e. instead of `hello world`, use `hello_world` or `hello-world`).
> You can set as many custom properties for a document as you like, but there are a few [special properties](#special-properties) defined by Foam.
@@ -27,11 +27,11 @@ This sets the `type` of this document to `feature` and sets **three** keywords f
Some properties have special meaning for Foam:
| Name | Description |
| -------------------- | ------------------- |
| `title` | will assign the name to the note that you will see in the graph, regardless of the filename or the first heading (also see how to [[write-notes-in-foam]]) |
| `type` | can be used to style notes differently in the graph (also see [[graph-visualization]]). The default type for a document is `note` unless otherwise specified with this property. |
| `tags` | can be used to add tags to a note (see [[tags]]) |
| Name | Description |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `title` | will assign the name to the note that you will see in the graph, regardless of the filename or the first heading (also see how to [[write-notes-in-foam]]) |
| `type` | can be used to style notes differently in the graph (also see [[graph-visualization]]). The default type for a document is `note` unless otherwise specified with this property. |
| `tags` | can be used to add tags to a note (see [[tags]]) |
For example:

View File

@@ -37,7 +37,7 @@ It is possible to customize the way that tags look in the Markdown Preview panel
> Note: the file path for the stylesheet will be relative to the currently open folder in the workspace when changing this setting for the current workspace. If changing this setting for the user, then the file path will be relative to your global [VSCode settings](https://code.visualstudio.com/docs/getstarted/settings).
The end result will be a CSS file that looks similiar to the content below. Now you can make your tags standout in your note previews.
The end result will be a CSS file that looks similar to the content below. Now you can make your tags standout in your note previews.
```css
.foam-tag{
@@ -54,4 +54,9 @@ Given the power of backlinks, some people prefer to use them as tags.
For example you can tag your notes about books with [[book]].
[note-properties|note property]: note-properties.md "Note Properties"
[graph-visualization]: graph-visualization.md "Graph Visualization"
[graph-visualization]: graph-visualization.md "Graph Visualization"
[//begin]: # "Autogenerated link references for markdown compatibility"
[note-properties|note property]: note-properties.md "Note Properties"
[graph-visualization]: graph-visualization.md "Graph Visualization"
[//end]: # "Autogenerated link references"

View File

@@ -14,7 +14,7 @@ strategies for getting the most out of Foam. The full docs are included in the
- [[recommended-extensions]]
- [[creating-new-notes]]
- [[write-notes-in-foam]]
- [[sync-notes-with-soruce-control]]
- [[sync-notes-with-source-control]]
- [[keyboard-shortcuts]]
## Features
@@ -57,7 +57,7 @@ See [[publishing]] for more details.
[recommended-extensions]: getting-started/recommended-extensions.md "Recommended Extensions"
[creating-new-notes]: getting-started/creating-new-notes.md "Creating New Notes"
[write-notes-in-foam]: getting-started/write-notes-in-foam.md "Writing Notes"
[sync-notes-with-soruce-control]: getting-started/sync-notes-with-soruce-control.md "Sync notes with source control"
[sync-notes-with-source-control]: getting-started/sync-notes-with-source-control.md "Sync notes with source control"
[keyboard-shortcuts]: getting-started/keyboard-shortcuts.md "Keyboard Shortcuts"
[wikilinks]: features/wikilinks.md "Wikilinks"
[tags]: features/tags.md "Tags"

View File

@@ -50,7 +50,7 @@ In our case, we'll be using the latter tag to wrap our {% raw %}`{{ content }}`{
You may have noticed that we only made modifications to the template `_layouts/page.html`, which means that `_layouts/home.html` won't have KaTeX support. If you wan't to render math in Foam's home page, you'll need to make the same modifications to `_layouts/home.html` as well.
Finally, if all goes well, then our site hosted on Vercel will support rendering math equations with KaTeX after commiting these changes to GitHub. Here's a demo of the default template with KaTeX support: [Foam Template with KaTeX support](https://foam-template.vercel.app/).
Finally, if all goes well, then our site hosted on Vercel will support rendering math equations with KaTeX after committing these changes to GitHub. Here's a demo of the default template with KaTeX support: [Foam Template with KaTeX support](https://foam-template.vercel.app/).
[//begin]: # "Autogenerated link references for markdown compatibility"
[math-support-with-mathjax]: math-support-with-mathjax.md "Math Support"

View File

@@ -65,7 +65,7 @@ gem "jekyll-katex" # Optional, the package that enables KaTeX math rendering
Besides adding the plugin `jekyll-katex` in `_config.yml` and `Gemfile`, we'll also have to follow the guides in [[math-support-with-katex]] to let our site fully support using KaTeX to render math equations.
### Commiting changes to GitHub repo
### Committing changes to GitHub repo
Finally, commit the newly created files to GitHub.

View File

@@ -6,7 +6,7 @@ With this #recipe you can create notes on your iOS device, which will automatica
* You use [Foam for VSCode](https://marketplace.visualstudio.com/items?itemName=foam.foam-vscode) to manage your notes
* You wish to adopt a practice such as [A writing inbox for transient and incomplete notes](https://notes.andymatuschak.org/A%20writing%20inbox%20for%20transient%20and%20incomplete%20notes)
* You wish to use [Shorcuts](https://support.apple.com/guide/shortcuts/welcome/ios) to capture quick notes into your Foam notes from your iOS device
* You wish to use [Shortcuts](https://support.apple.com/guide/shortcuts/welcome/ios) to capture quick notes into your Foam notes from your iOS device
## Other tools

View File

@@ -53,7 +53,7 @@ If such an app was worth building, it would have to have the following features:
- Instant loading and syncing for quick notes
- Sleek, simple, beautifully designed user experience.
- Ability to search and navigate forward links and back links (onlly in paid GitJournal version)
- Ability to search and navigate forward links and back links (only in paid GitJournal version)
- Killer feature that makes it the best note taking tool for Foam (?)
Given the effort vs reward ratio, it's a low priority for core team, but if someone wants to work on this, we can provide support! Talk to us on the #mobile-apps channel on [Foam Discord](https://foambubble.github.io/join-discord/w).

View File

@@ -44,7 +44,7 @@ When editing a file, you can easily navigate `[[links]]` by hovering over them t
You can view a page's backlinks using either of the following techniques:
1. Expanding the file's node in the `Repositories` tree, since it's child nodes will represent backlinks. This makes it easy to browse your pages and their backlinks in a single hierachical view.
1. Expanding the file's node in the `Repositories` tree, since it's child nodes will represent backlinks. This makes it easy to browse your pages and their backlinks in a single hierarchical view.
1. Opening a file, and then viewing it's backlinks list at the bottom of the editor view. This makes it easy to read a page and then see its backlinks in a contextually rich way.

View File

@@ -361,7 +361,7 @@ describe('SnippetParser', () => {
assertIdent('this ${1:is ${2:nested with $var}} and repeating $1');
});
test('Parser, choise marker', () => {
test('Parser, choice marker', () => {
const { placeholders } = new SnippetParser().parse('${1|one,two,three|}');
assert.strictEqual(placeholders.length, 1);

View File

@@ -141,7 +141,7 @@ describe('generateLinkReferences', () => {
newText: textForNote(
`
[//begin]: # "Autogenerated link references for markdown compatibility"
[Note being refered as angel]: <Note being refered as angel> "Note being refered as angel"
[Note being referred as angel]: <Note being referred as angel> "Note being referred as angel"
[//end]: # "Autogenerated link references"`
),
range: Range.create(3, 0, 3, 0),

View File

@@ -86,7 +86,7 @@ export class GenericDataStore implements IDataStore {
/**
* A matcher that instead of using globs uses a list of files to
* check the matches.
* The {@link refresh} function has been added to the interface to accomodate
* The {@link refresh} function has been added to the interface to accommodate
* this matcher, far from ideal but to be refactored later
*/
export class FileListBasedMatcher implements IMatcher {

View File

@@ -241,7 +241,7 @@ const sectionsPlugin: ParserPlugin = {
astPointToFoamPosition(tree.position.end).line + 1,
0
);
// Close all the remainig sections
// Close all the remaining sections
while (sectionStack.length > 0) {
const section = sectionStack.pop();
note.sections.push({
@@ -268,7 +268,7 @@ const titlePlugin: ParserPlugin = {
}
},
onDidFindProperties: (props, note) => {
// Give precendence to the title from the frontmatter if it exists
// Give precedence to the title from the frontmatter if it exists
note.title = props.title?.toString() ?? note.title;
},
onDidVisitTree: (tree, note) => {

View File

@@ -74,7 +74,7 @@ export function getDailyNoteFileName(date: Date): string {
* this function will create all folders in the path.
*
* @param currentDate The current date, to be used as a title.
* @returns Wether the file was created.
* @returns Whether the file was created.
*/
export async function createDailyNoteIfNotExists(targetDate: Date) {
const pathFromLegacyConfiguration = getDailyNotePath(targetDate);

View File

@@ -64,7 +64,7 @@ export class NavigationProvider
) {}
/**
* Provide references for links and placholders
* Provide references for links and placeholders
*/
public provideReferences(
document: vscode.TextDocument,

View File

@@ -27,7 +27,7 @@ interface FindIdentifierCommandArgs {
amongst: vscode.Uri[];
}
const FIND_IDENTIFER_COMMAND: FoamCommand<FindIdentifierCommandArgs> = {
const FIND_IDENTIFIER_COMMAND: FoamCommand<FindIdentifierCommandArgs> = {
name: 'foam:compute-identifier',
execute: async ({ target, amongst, range }) => {
if (vscode.window.activeTextEditor) {
@@ -103,8 +103,8 @@ export default async function activate(
}
),
vscode.commands.registerCommand(
FIND_IDENTIFER_COMMAND.name,
FIND_IDENTIFER_COMMAND.execute
FIND_IDENTIFIER_COMMAND.name,
FIND_IDENTIFIER_COMMAND.execute
),
vscode.commands.registerCommand(
REPLACE_TEXT_COMMAND.name,
@@ -264,7 +264,7 @@ const createFindIdentifierCommand = (
vscode.CodeActionKind.QuickFix
);
action.command = {
command: FIND_IDENTIFER_COMMAND.name,
command: FIND_IDENTIFIER_COMMAND.name,
title: 'Link to this resource',
arguments: [
{

View File

@@ -12,7 +12,7 @@
id="graph"
style="position: absolute; top: 0; left: 0; right: 0; bottom: 0;"
></div>
<!-- To test the graph locally in a broswer:
<!-- To test the graph locally in a browser:
1. copy the json data object received in the message payload
2. paste the content in test-data.js
3. uncomment the next <script ...> line

View File

@@ -1,4 +1,4 @@
# Note being refered as angel
# Note being referred as angel
This is just a link target for now.

View File

@@ -1,3 +1,3 @@
# Angel reference
[[Note being refered as angel]]
[[Note being referred as angel]]

6
typos.toml Normal file
View File

@@ -0,0 +1,6 @@
# See https://github.com/crate-ci/typos/blob/master/docs/reference.md to configure typos
[default.extend-words]
ons = "ons" # add-ons
pallette = "pallette"
[files]
extend-exclude = ["CHANGELOG.md", "d3.v6.min.js", "force-graph.1.40.5.min.js", "dat.gui.min.js"]