diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..b826e9b --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,30 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm install + - run: npm run build --if-present diff --git a/README.md b/README.md index 4892b69..59110cc 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,13 @@ You no longer have to open another editor just to view or edit a certain code fi This plugin allows to embed code files from Obsidian vault or remote file (eg., GitHub). It works better with live preview feature of Obsidian. ### Additional Changes -Additional changes were made to the embed display to add a better fitting title bar (closer resemblace to the code block). -Modified some buttons and styles to the embed display to allow better usability. -Allowed for local filepaths to be used in embed display. -Open VSCode Editor from embedded code file. -Create code buttons creates the file in the current directory (no longer the root) +* Additional changes were made to the embed display to add a better fitting title bar (closer resemblace to the code block). +* Modified some buttons and styles to the embed display to allow better usability. +* Allowed for local filepaths to be used in embed display. +* Open VSCode Editor from embedded code file. +* Create code buttons creates the file in the current directory (no longer the root). +* Clicking Edit button and returning to the page with embeded code will automatically update (5 second max wait). +* Clicking Refresh button will automatically update the code (No longer have to edit block then rebuild). ## Using the embed block First you need to activate the plugin from Community Plugins. Then you can embed the code as follow: @@ -60,8 +62,10 @@ The `PATH`, `LINES` and `TITLE` properties are set as YAML key-value paris: * `PATH` should be the file to embed from the vault or a remote address. If you use github make sure to use `https://raw.githubusercontent.com/...` * `LINES` will include only the specified lines of code. The set of included lines will append dots (`...`) to show any excluded lines in the file. +* `FUNCTION` will include only the specified funcitons. The set of included lines will append dots (`...`) to show any excluded lines in the file. * `TITLE` will set the title displayed above the embeded code. If the `TITLE` is not set then the filename of the embeded file will be displayed. + ## Using Obsidian VSCode Editor ### Basic features