diff --git a/.github/workflows/called-workflow-build-sync-production.yml b/.github/workflows/called-workflow-build-sync-production.yml index 696c377..f81d0a5 100644 --- a/.github/workflows/called-workflow-build-sync-production.yml +++ b/.github/workflows/called-workflow-build-sync-production.yml @@ -39,20 +39,20 @@ jobs: server: ${{ secrets.FTP_DYNAMSOFT_LOCAL_SERVER }} username: ${{ secrets.FTP_DYNAMSOFT_LOCAL_USER }} password: ${{ secrets.FTP_DYNAMSOFT_LOCAL_PASSWORD }} - port: 21 + port: 21 local-dir: ${{ runner.temp }}/DocHome/_site/ - server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/ + server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/ - - name: Trigger Webhook - run: | + - name: Trigger Webhook + run: | curl -X POST -H "${{ secrets.WEBHOOK_USER }}" -H "${{ secrets.WEBHOOK_TOKEN }}" -H "Content-Type: application/json" -d "[\"/${{ inputs.doc-url }}/*\"]" ${{ secrets.WEBHOOK_URL }} - - name: Update Sitemap - if: startsWith(inputs.doc-url, 'barcode-reader') || - startsWith(inputs.doc-url, 'capture-vision') || - startsWith(inputs.doc-url, 'label-recognition') || - startsWith(inputs.doc-url, 'document-normalizer') || - startsWith(inputs.doc-url, 'code-parser') || + - name: Update Sitemap + if: startsWith(inputs.doc-url, 'barcode-reader') || + startsWith(inputs.doc-url, 'capture-vision') || + startsWith(inputs.doc-url, 'label-recognition') || + startsWith(inputs.doc-url, 'document-normalizer') || + startsWith(inputs.doc-url, 'code-parser') || startsWith(inputs.doc-url, 'camera-enhancer') run: | cd ${{ runner.temp }}/DocHome/assets/scripts/GenerateSitemap diff --git a/.github/workflows/called-workflow-build-sync-testing.yml b/.github/workflows/called-workflow-build-sync-testing.yml index e2897a0..12477e2 100644 --- a/.github/workflows/called-workflow-build-sync-testing.yml +++ b/.github/workflows/called-workflow-build-sync-testing.yml @@ -13,7 +13,6 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: - Build-Site-Preview: # The type of runner that the job will run on runs-on: [self-hosted, doc-build] @@ -33,11 +32,11 @@ jobs: -e "1,3s/blob\/main$/blob\/preview/" ${{ runner.temp }}/DocHome/_config.yml cd DocHome && bundle install && bundle exec jekyll build - - name: 'Create Tar files' + - name: "Create Tar files" run: tar -czvf ${{ inputs.doc-repo }}.tar.gz -C ${{ runner.temp }}/DocHome/_site . - name: Upload the built site as a single artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v4.6.2 with: name: ${{ inputs.doc-repo }} path: ${{ inputs.doc-repo }}.tar.gz @@ -52,23 +51,23 @@ jobs: steps: # Runs a set of commands using the runners shell - name: Download the artifact - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v4.3.0 with: name: ${{ inputs.doc-repo }} - - name: 'Extract Tar files' + - name: "Extract Tar files" shell: cmd run: | mkdir ${{ runner.temp }}\DocHome\_site tar -xzf ${{ inputs.doc-repo }}.tar.gz -C ${{ runner.temp }}\DocHome\_site - name: Sync files - uses: SamKirkland/FTP-Deploy-Action@4.3.0 + uses: SamKirkland/FTP-Deploy-Action@v4.3.5 with: server: ${{ secrets.FTP_TEST_SITE_SERVER }} username: ${{ secrets.FTP_TEST_SITE_USER }} password: ${{ secrets.FTP_TEST_SITE_PASSWORD }} - port: ${{ secrets.FTP_TEST_SITE_PORT }} + protocol: ftps + port: ${{ secrets.FTP_TEST_SITE_PORT }} local-dir: ${{ runner.temp }}\DocHome\_site/ - server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/ - + server-dir: /www.dynamsoft.com/${{ inputs.doc-url }}/ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9ee5626..f319361 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,9 +6,9 @@ name: CI on: # Triggers the workflow on push events push: - branches: - - main - #- preview + branches: + - main + - preview # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -16,6 +16,15 @@ on: # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: + # Build and deploy to preview site on push to preview branch + Build-Preview: + if: ${{ github.ref == 'refs/heads/preview' }} + uses: ./.github/workflows/called-workflow-build-sync-testing.yml + with: + doc-repo: ${{ inputs.doc-repo }} + doc-url: ${{ inputs.doc-repo }} + secrets: inherit + Update-DBR-Core-On-Main-Change: if: ${{ github.ref == 'refs/heads/main' }} uses: ./.github/workflows/called-workflow-build-sync-production.yml @@ -287,7 +296,7 @@ jobs: # #- uses: actions/checkout@v2 # # # Runs a set of commands using the runners shell -# +# # - name: Build DNT Doc # run: | # cd /home/ubuntu diff --git a/.gitignore b/.gitignore index 5a05596..9f299ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .DS_Store /.vs -/.history \ No newline at end of file +/.history diff --git a/Gemfile b/Gemfile index f230b5d..368143a 100644 --- a/Gemfile +++ b/Gemfile @@ -10,4 +10,4 @@ gem "jekyll-readme-index", group: :jekyll_plugins gem "jekyll-seo-tag", group: :jekyll_plugins gem "uri" gem "net" -gem "kramdown-parser-gfm" \ No newline at end of file +gem "kramdown-parser-gfm" diff --git a/_includes/auto-version-list.html b/_includes/auto-version-list.html index d773deb..374ab6d 100644 --- a/_includes/auto-version-list.html +++ b/_includes/auto-version-list.html @@ -13,7 +13,7 @@ {%- else -%} {%- assign validVerInfo = site.data.product_version.version_info_list -%} {%- endif -%} - + {%- if site.data.product_version.useGroupedVersion -%} {%- for verInfo in validVerInfo -%} {%- assign curVerText = "" -%} diff --git a/_includes/head.html b/_includes/head.html index 54c9c31..eb34329 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -30,7 +30,7 @@ {%- assign excludeFlag = true -%} {%- endif -%} - {%- if page.url contains 'search.html' or page.url contains 'search-test.html' -%} + {%- if page.url contains 'search.html' or page.url contains 'search-test.html' -%} {%- assign excludeFlag = true -%} {%- endif -%} @@ -40,13 +40,13 @@ {%- assign docFullPath = site.docFullPath -%} {%- assign docFullPathLastChar = docFullPath | split:'' | last -%} - {%- if docFullPathLastChar contains '/' -%} + {%- if docFullPathLastChar contains '/' -%} {%- assign truncateDocHomePageSize = docFullPath | size | minus:1 -%} {%- assign docFullPath = docFullPath | slice: 0, truncateDocHomePageSize -%} {%- endif -%} - {%- assign assetsPath = '/webres/wwwroot' -%} + {%- assign assetsPath = 'https://www.dynamsoft.com/webres/wwwroot' -%}s diff --git a/_includes/liquid_autoGenerateHistoryList.html b/_includes/liquid_autoGenerateHistoryList.html index 9dd8a5e..add3f0f 100644 --- a/_includes/liquid_autoGenerateHistoryList.html +++ b/_includes/liquid_autoGenerateHistoryList.html @@ -22,7 +22,7 @@ {%- endif -%} {%- if curPageVersion contains "latest version" -%} -

{{ curPageVersion }}

+

{{ curPageVersion }}

{%- else -%}

{{ "version " | append: curPageVersion }}

{%- endif -%} @@ -58,7 +58,7 @@ {%- endif -%} {%- endfor -%} {%- endif -%} - + {%- if curPageVersion == tmpPageVersion -%} {%- continue -%} {%- endif -%} @@ -78,7 +78,7 @@ {%- endif -%} {%- endfor -%} {%- endif -%} - + {%- if tmpUsedToMatchUrl != curUsedToMatchUrl -%} {%- continue -%} {%- endif -%} @@ -98,7 +98,7 @@ {%- assign firstLevelUrl = site.firstLevelUrl -%} {%- assign firstLevelUrlLastChar = firstLevelUrl | split:'' | last -%} - {%- if firstLevelUrlLastChar contains '/' -%} + {%- if firstLevelUrlLastChar contains '/' -%} {%- assign truncateDocHomePageSize = firstLevelUrl | size | minus:1 -%} {%- assign firstLevelUrl = firstLevelUrl | slice: 0, truncateDocHomePageSize -%} {%- endif -%} @@ -112,4 +112,3 @@ {%- assign historyRecode = historyRecode | append: '\nextUrlRecode\' | append: tmpPageVersion -%} {%- endfor -%} - diff --git a/_includes/liquid_generateFullTree.html b/_includes/liquid_generateFullTree.html index 8ff4677..b7d5308 100644 --- a/_includes/liquid_generateFullTree.html +++ b/_includes/liquid_generateFullTree.html @@ -56,4 +56,4 @@ {%- endif -%} {%- endif -%} -{%- endfor -%} \ No newline at end of file +{%- endfor -%} diff --git a/_includes/liquid_searchVersionTreeFile.html b/_includes/liquid_searchVersionTreeFile.html index ebb6321..3f52250 100644 --- a/_includes/liquid_searchVersionTreeFile.html +++ b/_includes/liquid_searchVersionTreeFile.html @@ -48,7 +48,7 @@ {%- else -%} {%- assign verDiff = tmpDiff | divided_by: 10 | divided_by: i -%} {%- endif -%} - {%- assign validVer = true -%} + {%- assign validVer = true -%} {%- break -%} {%- elsif curVal < targetVal -%} {%- assign needCheckSize = false -%} @@ -63,7 +63,7 @@ {%- assign verDiff = curVal | divided_by: 10 -%} {%- else -%} {%- assign verDiff = curVal | divided_by: 10 | divided_by: minSize -%} - {%- endif -%} + {%- endif -%} {%- endif -%} {% endunless %} {%- if validVer -%} @@ -91,4 +91,4 @@ {%- assign curDirPath = nearestFile | remove: needRemoveStr -%} {%- endif -%} {%- include {{ nearestFile }} ver=include.ver curPath=curDirPath lang=include.lang -%} -{%- endif -%} \ No newline at end of file +{%- endif -%} diff --git a/_includes/livehelp.html b/_includes/livehelp.html index ffae970..1abd511 100644 --- a/_includes/livehelp.html +++ b/_includes/livehelp.html @@ -8,4 +8,4 @@ \ No newline at end of file + diff --git a/_includes/main-page-head.html b/_includes/main-page-head.html index 0627c29..d70645f 100644 --- a/_includes/main-page-head.html +++ b/_includes/main-page-head.html @@ -53,4 +53,4 @@ {%- if page.latestPageUri -%} -{%- endif -%} \ No newline at end of file +{%- endif -%} diff --git a/_includes/page_header.html b/_includes/page_header.html index 35d644c..f65aba6 100644 --- a/_includes/page_header.html +++ b/_includes/page_header.html @@ -508,4 +508,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav.html b/_includes/productNav.html index 3d46a6d..9f204e0 100644 --- a/_includes/productNav.html +++ b/_includes/productNav.html @@ -33,4 +33,4 @@ {%- endif -%} {%- if site.firstLevelUrl contains 'remote-scan/docs' -%} {%- include productNav/remoteScanNav.html -%} -{%- endif -%} \ No newline at end of file +{%- endif -%} diff --git a/_includes/productNav/companyNav.html b/_includes/productNav/companyNav.html index 885968a..ceb1ceb 100644 --- a/_includes/productNav/companyNav.html +++ b/_includes/productNav/companyNav.html @@ -12,4 +12,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/dbrNav.html b/_includes/productNav/dbrNav.html index 3e57e52..0a55029 100644 --- a/_includes/productNav/dbrNav.html +++ b/_includes/productNav/dbrNav.html @@ -60,4 +60,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/dceNav.html b/_includes/productNav/dceNav.html index a6b462e..8b59181 100644 --- a/_includes/productNav/dceNav.html +++ b/_includes/productNav/dceNav.html @@ -37,7 +37,6 @@
  • Documentation
  • -
  • Free trial
  • @@ -45,4 +44,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/dcpNav.html b/_includes/productNav/dcpNav.html index 8afa5dd..8587990 100644 --- a/_includes/productNav/dcpNav.html +++ b/_includes/productNav/dcpNav.html @@ -33,4 +33,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/dcvNav.html b/_includes/productNav/dcvNav.html index 255719c..e94ea77 100644 --- a/_includes/productNav/dcvNav.html +++ b/_includes/productNav/dcvNav.html @@ -34,4 +34,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/ddnNav.html b/_includes/productNav/ddnNav.html index 56c21c3..ab380df 100644 --- a/_includes/productNav/ddnNav.html +++ b/_includes/productNav/ddnNav.html @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/dlrNav.html b/_includes/productNav/dlrNav.html index 405c261..1cfad82 100644 --- a/_includes/productNav/dlrNav.html +++ b/_includes/productNav/dlrNav.html @@ -52,4 +52,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/dwtNav.html b/_includes/productNav/dwtNav.html index 14d249c..f6cf3cc 100644 --- a/_includes/productNav/dwtNav.html +++ b/_includes/productNav/dwtNav.html @@ -70,4 +70,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/mrzNav.html b/_includes/productNav/mrzNav.html index 67d0287..47d835b 100644 --- a/_includes/productNav/mrzNav.html +++ b/_includes/productNav/mrzNav.html @@ -34,4 +34,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/mwcNav.html b/_includes/productNav/mwcNav.html index 56843c1..125af48 100644 --- a/_includes/productNav/mwcNav.html +++ b/_includes/productNav/mwcNav.html @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav/remoteScanNav.html b/_includes/productNav/remoteScanNav.html index 24eaa8c..03c3f54 100644 --- a/_includes/productNav/remoteScanNav.html +++ b/_includes/productNav/remoteScanNav.html @@ -32,4 +32,4 @@ - \ No newline at end of file + diff --git a/_includes/productNav_OLD.html b/_includes/productNav_OLD.html index 9b6dddd..e8c441e 100644 --- a/_includes/productNav_OLD.html +++ b/_includes/productNav_OLD.html @@ -27,4 +27,4 @@ {%- endif -%} {%- if site.firstLevelUrl contains 'company/docs' -%} {%- include companyNav.html -%} -{%- endif -%} \ No newline at end of file +{%- endif -%} diff --git a/_includes/search-input.html b/_includes/search-input.html index 78cc309..8b52db0 100644 --- a/_includes/search-input.html +++ b/_includes/search-input.html @@ -88,7 +88,7 @@
    ${components.Snippet({ hit, attribute: 'content' })}
    ` - } + } } }) ]); @@ -203,4 +203,4 @@ window.location.href = preUrl + "/docs/search.html?q=" + $("#searchbox").val() } }) - \ No newline at end of file + diff --git a/_includes/trialLicense.html b/_includes/trialLicense.html index 4042013..f4f641a 100644 --- a/_includes/trialLicense.html +++ b/_includes/trialLicense.html @@ -1,4 +1,4 @@ -{%- assign assetsPath = '/webres/wwwroot' -%} +{%- assign assetsPath = 'https://www.dynamsoft.com/webres/wwwroot' -%} @@ -335,4 +335,4 @@ - \ No newline at end of file + diff --git a/_layouts/default-layout.html b/_layouts/default-layout.html index 27ceec5..dcf1254 100644 --- a/_layouts/default-layout.html +++ b/_layouts/default-layout.html @@ -50,7 +50,7 @@ {{ content }} - {%- assign assetsPath = '/webres/wwwroot' -%} + {%- assign assetsPath = 'https://www.dynamsoft.com/webres/wwwroot' -%}
    {%- unless site.useVersionTreeV2 -%} @@ -158,7 +158,7 @@ var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)"); return (arr = document.cookie.match(reg)) ? unescape(arr[2]) : null; } - + $('#txtSearch').keydown(function(e) { if (e.keyCode == 13) { let product = getUrlVars(document.URL)["product"] ? getUrlVars(document.URL)["product"] : getCurrentUrlProductName(document.URL) @@ -215,8 +215,8 @@ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); - })(window,document,'script','dataLayer','GTM-538F83'); + })(window,document,'script','dataLayer','GTM-538F83'); - \ No newline at end of file + diff --git a/_layouts/home-page.html b/_layouts/home-page.html index 57f9a06..609e289 100644 --- a/_layouts/home-page.html +++ b/_layouts/home-page.html @@ -5,7 +5,7 @@ {%- include page_header.html -%} - +
    diff --git a/_layouts/search-layout.html b/_layouts/search-layout.html index 1b87835..d7a684f 100644 --- a/_layouts/search-layout.html +++ b/_layouts/search-layout.html @@ -21,10 +21,10 @@ {{title}} - {%- assign assetsPath = '/webres/wwwroot' -%} + {%- assign assetsPath = 'https://www.dynamsoft.com/ {%- assign docFullPath = site.docFullPath -%} {%- assign docFullPathLastChar = docFullPath | split:'' | last -%} - {%- if docFullPathLastChar contains '/' -%} + {%- if docFullPathLastChar contains '/' -%} {%- assign truncateDocHomePageSize = docFullPath | size | minus:1 -%} {%- assign docFullPath = docFullPath | slice: 0, truncateDocHomePageSize -%} {%- endif -%} @@ -144,7 +144,7 @@

    {{page.h1}}

    ${components.Snippet({ hit, attribute: 'content' })}
    ` - } + } } }), @@ -176,7 +176,7 @@

    {{page.h1}}

    ${components.Snippet({ hit, attribute: 'content' })}
    ` - } + } } }), @@ -243,4 +243,4 @@

    {{page.h1}}

    {%- include livehelp.html -%} - \ No newline at end of file + diff --git a/_layouts/search-page.html b/_layouts/search-page.html index 2213b99..6a195d1 100644 --- a/_layouts/search-page.html +++ b/_layouts/search-page.html @@ -166,4 +166,4 @@

    Search

    {%- include livehelp.html -%} - \ No newline at end of file + diff --git a/_layouts/tree-layout.html b/_layouts/tree-layout.html index a3acba6..e2626a4 100644 --- a/_layouts/tree-layout.html +++ b/_layouts/tree-layout.html @@ -15,4 +15,4 @@ {%- include auto-version-list.html -%} - \ No newline at end of file + diff --git a/_plugins/custom_alerts.rb b/_plugins/custom_alerts.rb index 7c7e765..3667b97 100644 --- a/_plugins/custom_alerts.rb +++ b/_plugins/custom_alerts.rb @@ -1,6 +1,6 @@ module Jekyll Jekyll::Hooks.register [:pages, :posts, :documents], :post_render do |doc| - next unless doc.output && !doc.output.nil? + next unless doc.output && !doc.output.nil? next unless doc.path.end_with?(".md") next unless doc.output.include?("[!") @@ -13,4 +13,4 @@ module Jekyll HTML end end -end \ No newline at end of file +end diff --git a/_plugins/remote-include.rb b/_plugins/remote-include.rb index 6373ad7..40dc9ae 100644 --- a/_plugins/remote-include.rb +++ b/_plugins/remote-include.rb @@ -30,4 +30,4 @@ def render(context) end end -Liquid::Template.register_tag('remote_include', Jekyll::RemoteInclude) \ No newline at end of file +Liquid::Template.register_tag('remote_include', Jekyll::RemoteInclude) diff --git a/assets/css/basis-bs.css b/assets/css/basis-bs.css index fa80b0b..3664f4e 100644 --- a/assets/css/basis-bs.css +++ b/assets/css/basis-bs.css @@ -1131,4 +1131,4 @@ textarea:focus { .container { width: calc(100% - 40px) } -} \ No newline at end of file +} diff --git a/assets/css/basis.css b/assets/css/basis.css index eece313..22ed413 100644 --- a/assets/css/basis.css +++ b/assets/css/basis.css @@ -1130,7 +1130,7 @@ div, .sideBar .mainPage { left: auto; right: 35px; } - + #categoryMenuTree .rightSideMenu.showRightSideMenu.rsm-fixed { right: 35px; } @@ -2562,7 +2562,7 @@ i.dbr-white-logo { .fullVersionHistory .fullVersionInfo .hasChildLi.expand { background: #f5f5f5; } -.fullVersionHistory .fullVersionInfo .hasChildLi > ul { +.fullVersionHistory .fullVersionInfo .hasChildLi > ul { display: none; } .fullVersionHistory .fullVersionInfo .hasChildLi > div i.icon-arrow { @@ -3022,7 +3022,7 @@ a#toTop { } #categoryMenuTree .sideBar { background: #f5f5f5; - -webkit-order: 1; + -webkit-order: 1; order: 1; } #categoryMenuTree .sideBar.col-xs-12, #categoryMenuTree sideBar.col-md-3 @@ -3174,7 +3174,7 @@ a#toTop { #categoryMenuTree .docContainer { background: #FFFFFF; - -webkit-order: 2; + -webkit-order: 2; order: 2; } @@ -3578,4 +3578,4 @@ div.blockquote-important + blockquote::before { #searchResult td.gsc-clear-button { display: none!important; -} \ No newline at end of file +} diff --git a/assets/css/bootstrap.css b/assets/css/bootstrap.css index c5aa708..27b420f 100644 --- a/assets/css/bootstrap.css +++ b/assets/css/bootstrap.css @@ -8475,4 +8475,4 @@ button.close { .hidden-print { display: none !important } -} \ No newline at end of file +} diff --git a/assets/css/dm-style.css b/assets/css/dm-style.css index 8542c6a..73f3d1c 100644 --- a/assets/css/dm-style.css +++ b/assets/css/dm-style.css @@ -6860,4 +6860,4 @@ pre { .highlight { background-color: #f8f8f8 -} \ No newline at end of file +} diff --git a/assets/css/footer.css b/assets/css/footer.css index df1fd16..d9df840 100644 --- a/assets/css/footer.css +++ b/assets/css/footer.css @@ -16,7 +16,7 @@ margin-right: 150px; } .footer__item p { - font-family: Oswald-Regular; + font-family: Oswald-Regular; font-size: 18px; color: #fe8e14; } diff --git a/assets/css/searchPage.css b/assets/css/searchPage.css index 34d7154..284aecc 100644 --- a/assets/css/searchPage.css +++ b/assets/css/searchPage.css @@ -403,4 +403,4 @@ .newDocSearch #paginationDiv .pagination { margin: 0 auto; padding: 0; margin-top: 20px; text-align: center; } .newDocSearch #paginationDiv .pagination .paginationItem { display: inline-block; color: #323234; cursor: pointer; vertical-align: top; width: 36px; height: 36px; font-size: 24px; line-height: 36px; margin: 0 10px; } .newDocSearch #paginationDiv .pagination .paginationItem:first-child { margin-left: 0; } -.newDocSearch #paginationDiv .pagination .paginationItem.on { border: 1px solid #323234; line-height: 34px; } \ No newline at end of file +.newDocSearch #paginationDiv .pagination .paginationItem.on { border: 1px solid #323234; line-height: 34px; } diff --git a/assets/js/docsLangLatestVersion.js b/assets/js/docsLangLatestVersion.js index f732457..f42ec0e 100644 --- a/assets/js/docsLangLatestVersion.js +++ b/assets/js/docsLangLatestVersion.js @@ -39,4 +39,4 @@ var docsLangLatestVersion = { javascript: "4.1.2", maui: "4.2.200" } -} \ No newline at end of file +} diff --git a/assets/js/ds-jquery-bs.js b/assets/js/ds-jquery-bs.js index 91ef007..b0ba9f4 100644 --- a/assets/js/ds-jquery-bs.js +++ b/assets/js/ds-jquery-bs.js @@ -20,4 +20,4 @@ function breakpoint(){ } } return type; -} \ No newline at end of file +} diff --git a/assets/js/index-banner-two-version.js b/assets/js/index-banner-two-version.js index e41a374..c7e157c 100644 --- a/assets/js/index-banner-two-version.js +++ b/assets/js/index-banner-two-version.js @@ -5,9 +5,9 @@ function FullTreeMenuList(generateDocHead, needh3=true) { { allHerf1[i].onclick = function(){ if ($(this).parents(".sideBar").length > 0 && (getUrlVars(document.URL)["ver"]==undefined|| getUrlVars(document.URL)["ver"]=="latest")) { - addParam(this, verArray[0], 'sidebar'); + addParam(this, verArray[0], 'sidebar'); } else { - addParam(this, verArray[0]); + addParam(this, verArray[0]); } return false; }; @@ -49,13 +49,13 @@ function FullTreeMenuList(generateDocHead, needh3=true) { needh3 = needh3 == 'true' || needh3 == true ? true : false if (needh3) { $('#fullTreeMenuListContainer').addClass('needh3'); - } + } GenerateContentByHead(needh3); } } } -function AddCanonicalLinkOnPage(searchUrl = document.URL) { +function AddCanonicalLinkOnPage(searchUrl = document.URL) { var oriUrl = searchUrl; //history version doc url searchUrl = searchUrl.replace(/\/index-v[0-9]+[^\/]*.html/g,"/"); @@ -162,7 +162,7 @@ function ExpandCurrentPageTree(searchListId) { } function SearchVersion() { - var docUrl = document.URL; + var docUrl = document.URL; var ver = getUrlVars(docUrl)["ver"]; var curVerFromUrl = ""; var tmpExp = new RegExp(/-v[0-9]+[^\/^?^#]*((\/)|(.html))/g); @@ -195,7 +195,7 @@ function SearchVersion() { } } if(compatiableDiv != null){ - + } if (compatiableDiv != null && compatibleTag != null){ compatiableDiv.style.display = "block"; @@ -229,7 +229,7 @@ function UsefulRecord(isUseful) { else { $.get("https://www.dynamsoft.com/Secure/Rate.ashx?paper="+encodeUrl+"&product=DBR-Doc&rate=1") } - + var feedbackTag = document.getElementById("feedbackFooter"); if(feedbackTag!=null) { @@ -258,4 +258,4 @@ function initCrumbs() { } $(crumbul[0]).append(appendText); } -} \ No newline at end of file +} diff --git a/assets/scripts/GenerateSitemap/GenerateSitemapByMenuTree.py b/assets/scripts/GenerateSitemap/GenerateSitemapByMenuTree.py index 07f2842..d551d86 100644 --- a/assets/scripts/GenerateSitemap/GenerateSitemapByMenuTree.py +++ b/assets/scripts/GenerateSitemap/GenerateSitemapByMenuTree.py @@ -41,12 +41,12 @@ def extract_links(url, repo_type): response = requests.get(url, timeout=100) response.raise_for_status() soup = BeautifulSoup(response.text, 'html.parser') - + version_tree = soup.find(id="version_tree_latest_version") if not version_tree: print(f"not find id='version_tree_latest_version': {url}") return [] - + liList = version_tree.find_all('li', {}, False) links = [] for liItem in liList: @@ -109,9 +109,9 @@ def get_directory_by_product(product): def write_xml_file(directory, filename, xml_element): if not os.path.exists(directory): os.makedirs(directory) - + filepath = os.path.join(directory, filename) - + tree = ET.ElementTree(xml_element) tree.write(filepath, encoding="utf-8", xml_declaration=True) print("menu-tree-sitemap.xml is generated.") @@ -136,4 +136,3 @@ def write_xml_file(directory, filename, xml_element): loc.text = link write_xml_file(get_directory_by_product(item), "menu-tree-sitemap.xml", urlset) - diff --git a/sitemap.xml b/sitemap.xml index f79e61d..26a4195 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -5,7 +5,7 @@ regenerate: true {%- assign pages = site.html_pages | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/Hide_Tree_Page.html"' -%} -{%- if site.docFullPath contains 'web-twain/docs' -%} +{%- if site.docFullPath contains 'web-twain/docs' -%} {%- assign pages = site.documents | where_exp:'doc','doc.sitemap != false' | where_exp:'doc','doc.url != "/Hide_Tree_Page.html"' -%} {%- endif -%} {%- for page in pages -%} @@ -35,23 +35,23 @@ regenerate: true {%- if site.docFullPath contains 'license-server/docs' and page.url contains 'schedule/stable' -%} {%- assign excludeFlag = true -%} {%- endif -%} -{%- if site.docFullPath contains 'web-twain/docs' and page.url contains 'indepth/faqs/develop' -%} +{%- if site.docFullPath contains 'web-twain/docs' and page.url contains 'indepth/faqs/develop' -%} {%- assign excludeFlag = true -%} {%- endif -%} -{%- if page.url contains 'search.html' or page.url contains 'search-test.html' -%} +{%- if page.url contains 'search.html' or page.url contains 'search-test.html' -%} {%- assign excludeFlag = true -%} {%- endif -%} {%- assign docFullPath = site.docFullPath -%} {%- assign docFullPathLastChar = docFullPath | split:'' | last -%} -{%- if docFullPathLastChar contains '/' -%} +{%- if docFullPathLastChar contains '/' -%} {%- assign truncateDocHomePageSize = docFullPath | size | minus:1 -%} {%- assign docFullPath = docFullPath | slice: 0, truncateDocHomePageSize -%} {%- endif -%} {%- unless excludeFlag or page.layout == "" or page.layout == "default" -%} - {{ docFullPath }}{{page.url | replace:'/index.html','/' | xml_escape}} + {{ docFullPath }}{{page.url | replace:'/index.html','/' | xml_escape}} {%- endunless -%}