intelops / external-docs

This is the repo to manage all the public documentation.
https://docs.intelops.ai
1 stars 10 forks source link

getting build issue #75

Closed devopstoday11 closed 1 year ago

devopstoday11 commented 1 year ago

@tfsumon , when I run " hugo server " after updating my local hugo version to the latest one, I am not able to run the site. Looks like there is version compatibility issues with the template's theme. Please fix. I am not able to test any changes without this fix.

hugo server
Watching for changes in /home/devopstoday/Documents/GitHub/external-docs/{archetypes,content,i18n,package.json,static,themes}
Watching for config changes in /home/devopstoday/Documents/GitHub/external-docs/config.toml
Start building sites … 
hugo v0.119.0-b84644c008e0dc2c4b67bd69cccf87a41a03937e+extended linux/amd64 BuildDate=2023-09-24T15:20:17Z VendorInfo=snap:0.119.0

ERROR render of "page" failed: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/_default/baseof.html:10:5": execute of template failed: template: _default/contact.html:10:5: executing "_default/contact.html" at <partial "header.html" .>: error calling partial: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/partials/header.html:211:3": execute of template failed: template: partials/header.html:211:3: executing "partials/header.html" at <partial "search-modal" .>: error calling partial: execute of template failed: html/template:partials/search-modal.html: ends in a non-text context: {stateJSBqStr delimNone urlPartNone jsCtxRegexp attrNone elementScript <nil>}
ERROR render of "home" failed: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/_default/baseof.html:10:5": execute of template failed: template: index.html:10:5: executing "index.html" at <partial "header.html" .>: error calling partial: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/partials/header.html:211:3": execute of template failed: template: partials/header.html:211:3: executing "partials/header.html" at <partial "search-modal" .>: error calling partial: execute of template failed: html/template:partials/search-modal.html: ends in a non-text context: {stateJSBqStr delimNone urlPartNone jsCtxRegexp attrNone elementScript <nil>}
ERROR render of "section" failed: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/_default/baseof.html:10:5": execute of template failed: template: _default/list.html:10:5: executing "_default/list.html" at <partial "header.html" .>: error calling partial: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/partials/header.html:211:3": execute of template failed: template: partials/header.html:211:3: executing "partials/header.html" at <partial "search-modal" .>: error calling partial: execute of template failed: html/template:partials/search-modal.html: ends in a non-text context: {stateJSBqStr delimNone urlPartNone jsCtxRegexp attrNone elementScript <nil>}
Built in 575 ms
Error: error building site: render: failed to render pages: render of "section" failed: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/_default/baseof.html:10:5": execute of template failed: template: _default/changelog.html:10:5: executing "_default/changelog.html" at <partial "header.html" .>: error calling partial: "/home/devopstoday/Documents/GitHub/external-docs/themes/godocs-4/layouts/partials/header.html:211:3": execute of template failed: template: partials/header.html:211:3: executing "partials/header.html" at <partial "search-modal" .>: error calling partial: execute of template failed: html/template:partials/search-modal.html: ends in a non-text context: {stateJSBqStr delimNone urlPartNone jsCtxRegexp attrNone elementScript <nil>}
tfsumon commented 1 year ago

Hello @devopstoday11!

To solve the issue, please follow these steps:

  1. Locate the search-modal.html file in the layouts/partials/ directory.
  2. Go to line number 125.

Replace the existing code:

<a class="block" href="${innerItem.url}">
    <p class="text-dark mb-0 lh-base">${innerItem.title}</p>
    <p class="small text-muted mt-1 mb-0 lh-base">${contentValue}</p>
</a>

With the updated code:

<a class="block" href="${innerItem.url}">
    <p class="text-dark mb-0 lh-base">${innerItem.title}</p>
    <span></span>
    <p class="small text-muted mt-1 mb-0 lh-base">${contentValue}</p>
</a>

Let me know if you need further assistance.

devopstoday11 commented 1 year ago

@tfsumon , I see only 99 lines in that file. I am using my "chandu" branch. I did find similar code snippet but not fully matching with the "existing code" you mentioned, hence I am confused now. Take my branch "chandu" and check please.

Also, resolve the conflicts in your PR. Looks like there are still conflicts.

tfsumon commented 1 year ago

Go to line number 91

Replace Following

`<a class="block" href="${innerItem.url}"><p class="text-dark mb-0 lh-base">${innerItem.title}</p><p class="small text-muted mt-1 mb-0 lh-base">${contentValue}</p></a>`

With the updated code:

`<a class="block" href="${innerItem.url}"><p class="text-dark mb-0 lh-base">${innerItem.title}</p><span></span><p class="small text-muted mt-1 mb-0 lh-base">${contentValue}</p></a>`

Here I just added blank <span></span> tag after ${innerItem.title}</p>

I have recently created a pull request. Please review it, and there are no merge conflicts. image

devopstoday11 commented 1 year ago

@tfsumon Thank you. After adding <span></span> I am able to run the site locally with the latest hugo version. I will check the PR now.

devopstoday11 commented 1 year ago

@tfsumon , please check https://github.com/intelops/external-docs/pull/76#issuecomment-1774579502