From f9c59ff90c398f195488dcc05fa7a6db11c593b0 Mon Sep 17 00:00:00 2001 From: EINDEX Date: Mon, 16 Sep 2024 22:55:02 +0800 Subject: [PATCH] docs: update document website --- .github/workflows/docs.yml | 55 ++++++++++++++++++++++++ README.md | 42 ++---------------- src/pages/options/components/Connect.tsx | 2 +- src/utils.ts | 4 -- 4 files changed, 60 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..af59afb --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,55 @@ +name: Build + +on: + push: + paths: + - '/docs/**' + - '/.github/workflows/**' + release: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - run: cd docs + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + version: 9 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Update changelog + run: node changelog.js + + - name: Build + run: pnpm build + + - name: Publish to Cloudflare Pages + uses: cloudflare/pages-action@v1 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: 162c9bc5d98e73ac9c64f756da29d06d + projectName: logseq-copilot-page + directory: build + # Optional: Enable this if you want to have GitHub Deployments triggered + gitHubToken: ${{ secrets.GITHUB_TOKEN }} + # Optional: Switch what branch you are publishing to. + # By default this will be the branch which triggered this workflow + branch: main + # Optional: Change the working directory + workingDirectory: docs + # Optional: Change the Wrangler version, allows you to point to a specific version or a tag such as `beta` + wranglerVersion: '3' diff --git a/README.md b/README.md index 0368fd4..b50171b 100755 --- a/README.md +++ b/README.md @@ -24,6 +24,8 @@ Logseq Copilot is a Chrome extension that allows you to access your Logseq using your browser. Logseq is a privacy-first, open-source platform for knowledge sharing and management. With Logseq Copilot, you can easily retrieve relevant information from your Logseq graph and enrich your online search, reading, and learning experience. 🧠 +[Documents](https://logseq-copilot.eindex.me) + ## Features - 🔍 Show Logseq content when you search on popular search engines via your keywords. Now support Google, Bing, Ecosia, Baidu, Yandex, DuckDuckGo, SearX. @@ -41,43 +43,6 @@ Logseq Copilot is a Chrome extension that allows you to access your Logseq using ## Screenshot ![](docs/screenshots/screenshot.png) -## Usage - -How to use this extension, please follow the below steps: - -**Make sure you're using Logseq which version above 0.8.18** - - -1. Setup your Logeq API server: - 1. Settings -> Features -> Enable `HTTP APIs Server` - - ![Enable http APIs Server Feature](docs/screenshots/enable-http-apis-server.png) - - 2. Start server - - ![Starting Logseq API Server](docs/screenshots/start-api-server.png) - - 3. Setting Authorization token, for security reasons, highly recommend setting this, If you want to connect with Logseq copilot, must set this up. - - **PS:** `Authorization token` is a secret string, you can set it as a random string you like. - ![Setting up Authorization Token](docs/screenshots/setting-auth-token.png) - - - 4. Enable auto-start server when Logseq open. - - ![Enable Auto Start](docs/screenshots/enable-auto-start.png) - -2. Install extension. - - Store version(**Recommend**): [Chrome](https://chrome.google.com/webstore/detail/logseq-copilot/hihgfcgbmnbomabfdbajlbpnacndeihl), [Edge](https://microsoftedge.microsoft.com/addons/detail/logseq-copilot/ebigopegbohijaikegebaaboaomaifoi), [Firefox](https://addons.mozilla.org/en-US/firefox/addon/logseq-copilot/) - - Newest Version [release page](https://github.com/EINDEX/logseq-copilot/releases) download it and load it as unpacked. - -3. Go to Options page to set the connection. - If you're setting it correctly, you will see a message show on your Logseq and options page will show connected. - And your `Authorization token` will be used here agian. - ![Set Options](docs/screenshots/logseq-copilot-option.png) - - -4. You can use Logseq Copilot now!! ## Roadmap @@ -87,7 +52,7 @@ How to use this extension, please follow the below steps: - [x] 💅 Style enhancement: Improve the appearance and usability of the extension interface and the blocks display. - [x] 🌐 Support Firefox. - [x] 🆕 Browser new tab page queries: Add an option to show Logseq blocks on the browser's new tab page based on predefined or random queries. -- [ ] QuickCapture & advance quick capture, easy and fast making note in Logseq. +- [x] QuickCapture & advance quick capture, easy and fast making note in Logseq. - ~~Enhance search ranking for better blocks: Implement a more sophisticated algorithm for ranking the blocks based on their relevance to the search query and the user preferences. 📊~~ Now this feature depends on Logseq Searching API - ~~Query enhance to recall more blocks: Implement a more flexible and powerful query system for retrieving the blocks from the Logseq graph, such as using natural language or advanced operators. 🗣️~~ Now this feature depends on Logseq Searching API @@ -116,3 +81,4 @@ Logseq Copilot is an open-source project and welcomes contributions from anyone ## License GPLv3 + diff --git a/src/pages/options/components/Connect.tsx b/src/pages/options/components/Connect.tsx index 9590ce5..7346094 100644 --- a/src/pages/options/components/Connect.tsx +++ b/src/pages/options/components/Connect.tsx @@ -162,7 +162,7 @@ export const LogseqConnectOptions = () => { Guide to Connection diff --git a/src/utils.ts b/src/utils.ts index b6ecfa6..f93383d 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -25,10 +25,6 @@ function cleanAttribute(attribute: string) { return attribute ? attribute.replace(/(\n+\s*)+/g, '\n') : ''; } -function repeat(character, count) { - return Array(count + 1).join(character); -} - function linkProcess(src: string) { if (src.startsWith('/')) { return window.location.origin + src;