diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 79e19b1..b3717b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,16 +18,77 @@ jobs: # This workflow contains jobs called "Build-Master" and "Build-Preview" Build-Main: if: ${{ github.ref == 'refs/heads/master' }} - uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-production.yml@main - with: - doc-repo: label-recognition-docs - doc-url: label-recognition/docs/core - secrets: inherit + # The type of runner that the job will run on + runs-on: self-hosted + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + #- uses: actions/checkout@v2 + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + cd /home/ubuntu + [ -d DLRDocCore ] && rm -rf DLRDocCore + [ -d label-recognition-docs ] && rm -rf label-recognition-docs + [ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview + [ ! -d DLRDocCore ] && mkdir -p DLRDocCore + git clone --depth 1 https://github.com/dynamsoft-docs/label-recognition-docs.git label-recognition-docs + git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview + cp -rfp ./label-recognition-docs/* ./DLRDocCore/ + cp -rfp ./Docs-Template-Repo-Preview/* ./DLRDocCore/ + cd DLRDocCore && bundle install && bundle exec jekyll build + + - name: Sync files - Main Site + uses: SamKirkland/FTP-Deploy-Action@4.3.0 + with: + server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }} + username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }} + password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }} + port: 21 + local-dir: /home/ubuntu/DLRDocCore/_site/ + server-dir: /www.dynamsoft.com/label-recognition/docs/core/ + + - name: Trigger Webhook + run: | + curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/label-recognition/docs/core/*\"]" ${{ secrets.WEBHOOK_URL }} + Build-Preview: if: ${{ github.ref == 'refs/heads/preview' }} - uses: dynamsoft-docs/Docs-Template-Repo/.github/workflows/called-workflow-build-sync-testing.yml@preview - with: - doc-repo: label-recognition-docs - doc-url: label-recognition/docs/core - secrets: inherit + # The type of runner that the job will run on + runs-on: self-hosted + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a set of commands using the runners shell + - name: clear space + run: | + cd /home/ubuntu + [ -d DLRDocCorePreview ] && rm -rf DLRDocCorePreview + [ -d label-recognition-docs-core-preview ] && rm -rf label-recognition-docs-core-preview + [ -d Docs-Template-Repo-Preview ] && rm -rf Docs-Template-Repo-Preview + cd /home/ubuntu + + - name: Build the site + run: | + cd /home/ubuntu + [ ! -d DLRDocCorePreview ] && mkdir -p DLRDocCorePreview + git clone --depth 1 --branch preview https://github.com/Dynamsoft-Docs/label-recognition-docs.git label-recognition-docs-core-preview + git clone --depth 1 --branch preview https://github.com/dynamsoft-docs/Docs-Template-Repo.git Docs-Template-Repo-Preview + cp -rfp ./label-recognition-docs-core-preview/* ./DLRDocCorePreview/ + cp -rfp ./Docs-Template-Repo-Preview/* ./DLRDocCorePreview/ + sed -i -e "1,3s/blob\/master$/blob\/preview/" \ + -e "1,3s/blob\/main$/blob\/preview/" /home/ubuntu/DLRDocCorePreview/_config.yml + cd DLRDocCorePreview && bundle install && bundle exec jekyll build + + - name: Sync files + uses: SamKirkland/FTP-Deploy-Action@4.3.0 + with: + server: ${{ secrets.FTP_TEST_SITE_SERVER }} + username: ${{ secrets.FTP_TEST_SITE_USER }} + password: ${{ secrets.FTP_TEST_SITE_PASSWORD }} + port: 7500 + local-dir: /home/ubuntu/DLRDocCorePreview/_site/ + server-dir: /www.dynamsoft.com/label-recognition/docs/core/ diff --git a/_config.yml b/_config.yml index ccc7317..0ba2f4c 100644 --- a/_config.yml +++ b/_config.yml @@ -67,6 +67,11 @@ baseurl: "/label-recognition/docs/core" plugins: - jemoji - jekyll-sitemap + - jekyll-webp + - jekyll-relative-links + - jekyll-redirect-from + - jekyll-readme-index + - jekyll-seo-tag defaults: diff --git a/_includes/dlrNav.html b/_includes/dlrNav.html index cddcd61..70fefe3 100644 --- a/_includes/dlrNav.html +++ b/_includes/dlrNav.html @@ -1,17 +1,15 @@
diff --git a/_layouts/default-layout.html b/_layouts/default-layout.html index 7796352..1473461 100644 --- a/_layouts/default-layout.html +++ b/_layouts/default-layout.html @@ -7,25 +7,14 @@ {%- assign noTitleIndex = "noTitleIndex" -%} {%- endif -%} -
- {%- include page_header.html -%} -
+ {% assign url = 'https://www.dynamsoft.com/shared/head/' %} + {% remote_include {{ url }} %} + {%- include dlrNav.html -%}
Table of contents
- -
+
{%- include main-page-head.html -%}
@@ -59,7 +48,18 @@
-
+ +
@@ -69,21 +69,14 @@
-
+
+ - - - - - diff --git a/_layouts/home-page.html b/_layouts/home-page.html index a3a268e..89aa900 100644 --- a/_layouts/home-page.html +++ b/_layouts/home-page.html @@ -17,9 +17,9 @@ -
- {%- include page_header.html -%} -
+ {% assign url = 'https://www.dynamsoft.com/shared/head/' %} + {% remote_include {{ url }} %} +
diff --git a/_layouts/search-page.html b/_layouts/search-page.html index cff46ea..e7b1ac5 100644 --- a/_layouts/search-page.html +++ b/_layouts/search-page.html @@ -108,9 +108,9 @@ } -
- {%- include page_header.html -%} -
+ {% assign url = 'https://www.dynamsoft.com/shared/head/' %} + {% remote_include {{ url }} %} +
@@ -306,6 +306,57 @@

Search

} }) + $("body").delegate("#searchResult .gsc-resultsRoot a.gs-title", "click", function(e) { + e.preventDefault(); + + var link = $(this).eq(0).data("ctorig") + if (link.indexOf("capture-vision/docs") > 0) { + var repoType = getRepoType("core", link); + if (link.indexOf("?") > 0) { + var arr = link.split("?") + if(arr[1].indexOf("#") > 0) { + var subArr = arr[1].split("#") + link = link +"?product=dlr&repoType="+ repoType +"&" + arr[1] + } else { + link = link + "&product=dlr&repoType=" + repoType + } + } else { + link = link + "?product=dlr&repoType=" + repoType + } + } + window.location.href = link + }); + + function getRepoType(defaultValue, link) { + var lang = getCurrentUrlLang(link, true) + var repoType = defaultValue + if (lang) { + if (lang == 'android' || lang == 'objectivec-swift') { + repoType = "mobile" + } else if (lang == 'javascript') { + repoType = "web" + } else if (lang == 'cplusplus' || lang == 'c' || lang == 'java' || lang == 'dotnet') { + repoType = "server" + } else { + repoType = "core" + } + } else { + if(link.indexOf("/docs/server/") > 0) { + repoType = "server" + } + if (link.indexOf("/docs/core/") > 0) { + repoType = "core" + } + if (link.indexOf("/docs/mobile") > 0) { + repoType = "mobile" + } + if (link.indexOf("/docs/web/") > 0) { + repoType = "web" + } + } + return repoType + } + {%- include livehelp.html -%} diff --git a/introduction/index.md b/introduction/index.md index 24979da..57fc25d 100644 --- a/introduction/index.md +++ b/introduction/index.md @@ -9,7 +9,7 @@ noTitleIndex: true # Overview of Dynamsoft Label Recognizer -Dynamsoft Label Recognizer (DLR) is an SDK designed to recognize meaningful zonal text or symbols in an image (or a 'Label' in this context). Some common scenarios where a component like DLR can prove handy include price tags in supermarkets, inventory labels in warehouses, VIN codes on car windshields, driver licenses, ID cards, and more. +Dynamsoft Label Recognizer (DLR) is a data capture SDK designed to recognize meaningful zonal text or symbols in an image (or a 'Label' in this context). Some common scenarios where a component like DLR can prove handy include passport MRZ, ID cards, price tags in supermarkets, inventory labels in warehouses, VIN codes on car windshields, driver licenses, and more. DLR powers your software development through the following aspects: @@ -21,6 +21,11 @@ DLR powers your software development through the following aspects: With DLR, you can create customizable text detection and recognition software with enterprise-grade performance to meet your business needs. +Getting started with Dynamsoft Label Recognizer: +- [JavaScript](https://www.dynamsoft.com/label-recognition/docs/web/programming/javascript/) +- [Android](https://www.dynamsoft.com/label-recognition/docs/mobile/programming/android/) | [iOS](https://www.dynamsoft.com/label-recognition/docs/mobile/programming/objectivec-swift/) +- [Java](https://www.dynamsoft.com/label-recognition/docs/server/programming/java/) | [.NET](https://www.dynamsoft.com/label-recognition/docs/server/programming/dotnet/) | [C++](https://www.dynamsoft.com/label-recognition/docs/server/programming/cplusplus/) + ## Key Features ### Reference Region