colinwilson / lotusdocs Goto Github PK
View Code? Open in Web Editor NEW📖 A free, lightweight, modern documentation theme for Hugo [WIP]
Home Page: https://lotusdocs.dev/docs/
License: MIT License
📖 A free, lightweight, modern documentation theme for Hugo [WIP]
Home Page: https://lotusdocs.dev/docs/
License: MIT License
Complete Newbie to Hugo so this may be a mistake on my part.
Followed the instructions from the Quickstart Guide.
High Level Overview:
user@machine:~/Documents/sites/site$ hugo server -D
Start building sites …
hugo v0.92.2+extended linux/amd64 BuildDate=2023-01-31T11:11:57Z VendorInfo=ubuntu:0.92.2-1ubuntu0.1
WARNING: calling IsSet with unsupported type "invalid" (<nil>) will always return false.
ERROR 2024/03/01 22:34:21 render of "page" failed: execute of template failed: template: docs/single.html:25:44: executing "docs/single.html" at <partial (printf "%s/%s" ($.Scratch.Get "pathName") "breadcrumbs.html") .>: error calling partial: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/colinwilson/[email protected]/layouts/partials/docs/breadcrumbs.html:5:55": execute of template failed: template: partials/docs/breadcrumbs.html:5:55: executing "partials/docs/breadcrumbs.html" at <.Ancestors.Reverse>: can't evaluate field Ancestors in type *hugolib.pageState
Error: Error building site: failed to render pages: render of "section" failed: execute of template failed: template: docs/list.html:25:44: executing "docs/list.html" at <partial (printf "%s/%s" ($.Scratch.Get "pathName") "breadcrumbs.html") .>: error calling partial: "/tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/colinwilson/[email protected]/layouts/partials/docs/breadcrumbs.html:5:55": execute of template failed: template: partials/docs/breadcrumbs.html:5:55: executing "partials/docs/breadcrumbs.html" at <.Ancestors.Reverse>: can't evaluate field Ancestors in type *hugolib.pageState
Built in 709 ms
As referenced in this page, a generated page.
No response
- OS: PopOS
- Browser: N/A
- Browser Version: N/A
I attempted to embed Mermaid diagrams in a markdown page, but the built site fails to render them correctly. They seem to successfully render locally when running via hugo server
, but not when built via hugo
. I also see Javascript errors related to Mermaid in the browser console.
This issue appears to exist on the published lotusdocs documentation also: https://lotusdocs.dev/docs/features/mermaid/
The built site to correctly render Mermaid diagrams defined in markdown.
Example of failed rendering & console error on lotus docs page:
- OS: MacOS M2 & Android mobile
- Browser: Chrome & Firefox on desktop, Chrome on mobile
- Browser Version: Chrome Version 119.0.6045.159 (Official Build) (arm64)
Originally posted by hugo-sid August 26, 2023
Clicking on the 'edit this page' button opens the corresponding Markdown file from the most recent commit.
The edit this file option on GitHub is disabled, when it is opened in the above mentioned manner. So, the purpose (allowing one to edit) is not served.
Consider the URL: https://lotusdocs.dev/docs/guides/features/feedback-widget/
Clicking on the 'edit this page' button opens: https://github.com/colinwilson/lotusdocs.dev/blob/9907176ffb06a0c8652386aa9f72668a90d85bdc/content/docs/guides/features/feedback-widget.md/ - edit option is disabled.
It would be better if the 'edit this page' button opens any of the following links:
https://gohugo.io/content-management/organization/#url
https://developers.cloudflare.com/workers/platform/limits#log-size
One possible solution (not tested) can be to use:
<a href="{{.Site.Params.ghrepo}}edit/release/content/{{ .Lang }}/{{.File.Path}}">Edit this page</a>
Then in config/_default/params.toml
:
## GH repo include trailing slash
ghrepo = "https://github.com/colinwilson/lotusdocs/"
Hi!
after the install of LotusDocs theme (manual installation by cloning the theme files), I tried hugo serve
and I get an error concerning the alert shortcode.
Here is the shortcode concerned:
{{% alert context="info" %}}
my text
{{% /alert %}}
I wonder if it is not a side effect of the following recent update: `5c59008#diff-83f19c21cf48a204476a2ccf63d323c91bd1310d1f99462e590a4878a2d44846L23
Shortcode alert is understood by LotusDocs and the hugo serve
command run successfully.
No response
- OS: Linux Mint 21 Vanessa
- Browser: N/A
- Browser Version: N/A
Issue with IDs beginning with numbers e.g. ordered lists.
Uncaught DOMException: Element.querySelector: '#1-correction' is not a valid selector
findOne \js\src\dom\selector-engine.js:41
_initializeTargetsAndObservables \js\src\scrollspy.js:211
refresh \js\src\scrollspy.js:91
_ScrollSpy \js\src\scrollspy.js:73
getOrCreateInstance \js\src\base-component.js:65
<anonymous> \js\src\scrollspy.js:284
handler \js\src\dom\event-handler.js:98
addHandler \js\src\dom\event-handler.js:184
on \js\src\dom\event-handler.js:216
<anonymous>\js\src\scrollspy.js:282
<anonymous> bootstrap.js:3649
Environment:
Related:
With params.docs.prism = false
set in hugo.toml
, no copy codeblock button is present on code blocks.
A copy codeblock button is present on code blocks when prism = false
.
No response
- OS:
- Browser:
- Browser Version:
Images do not work in .md files. Local images are not displayed at all and url images (external) crash the site.
Images are displayed as per the markdown specs.
No response
- OS:
- Browser:
- Browser Version:
See discussion #77 (comment)
The hardcoded PrismJS autoloader plugin language path causes 404
errors if a Hugo project is deployed in a path other than root.
The PrismJS autoloader should find language grammars regardless of the site's baseURL
No response
- OS: Windows 11
- Browser: FireFox / Chrome
- Browser Version: 116
Hello,
loving the theme!
However, FlexSearch results are not scroll-able and they very often overflow outside the screen. Is there a way to add a maximum height to the suggestions container with scrolling?
Thanks for the help!
Internal links defined by the ref
shortcode are not compatible with the internal link preview tooltip feature.
ref
returns the absolute permalink to a page.
Either:
render-link.html
markdown render hook is updated to accommodate the ref
shortcodeor
No response
- OS: Windows 11
- Browser: Firefox / Chrome
- Browser Version: 116
When embedding a link in code ticks, the link will show up as code, but not as a link.
Sample code:
[`mylink`](www.example.com)
Output:
If we add more text to the link, the text will display as a link, but the text in code ticks will not
Text in code ticks should display with mono font, but still be colored as a link.
No response
- OS: MacOS
- Browser: Chrome
- Browser Version: 116
Hello,
I have identified a cross-site scripting (XSS) vulnerability in your Hugo template. Attackers can exploit this vulnerability by injecting code similar to <a href="javascript:alert('XSS')">Click me</a>
into the search box.
Vulnerability Description:
Vulnerability Type: Cross-Site Scripting (XSS)
Affected Area: Search box
Attack Scenario: Attackers can insert malicious code into the search box, which gets executed when users visit the search results page.
Please address this issue as soon as possible to enhance the security of your template. Thank you for your attention!
When a user inputs any code or script into the search box, it should be treated as plain text and displayed as such in the search results page. The code or script should not be executed or interpreted as HTML or JavaScript. This ensures that the search functionality remains secure and prevents any potential cross-site scripting (XSS) attacks.
No response
- OS: Win11
- Browser: Google
- Browser Version: 115
Close the sidebar menu when a click occurs outside the element (excluding the close-sidebar
element/button).
Large inline KaTex equations overflow into the ToC.
KaTex equation should be responsive and confined to the 'content' section of the page
- OS: Windows
- Browser: FireFox / Chrome
- Browser Version: 116.03 / 116.0
I already edit landing.yml on data but its nothing change, i have problem on feature grid and image compare section. I also tried to change enable to false but its still showing them, thank you
Fix so i can edit landing page and its not being templated again
- OS: Windows
- Browser: Chrome
- Browser Version: 119
When sharing a website link, the favicon image doesn't appear.
Steps to reproduce:
Type in the below message in WhatsApp (or any internet-based chat application) to see the website's favicon:
https://stackoverflow.com
Typing in the below message doesn't show the favicon:
https://lotusdocs.dev
Steps to solve:
Having the below files in static/
is likely to make the preview available:
logo.svg # could be 512x512 or better
favicon.png # 32x32
favicon.ico # 32x32
apple-touch-icon.png # 180x180
icon512.png # 512x512
For the favicon to be displayed when sending a message containing the link to the website.
When using the alert shortcode within an ordered list, the alert is not getting indented, but instead gets left aligned. Because of that, the numbering within the ordered list is off.
Example code:
This is a test command.
kubectl apply -f- <<EOF
apiversion: v1
test: value
EOF
This is the second command.
kubectl get pods
{{% alert icon="🍅" context="success" %}}
This is an alert that should be indented.
{{% /alert %}}
Test
{{% alert icon="🍅" context="success" %}}
Another alert.
{{% /alert %}}
It will display as follows:
Indent alerts when they are placed within an ordered list.
No response
- OS: macOS
- Browser: Chrome
- Browser Version: 116
Searching for English words works fine, but searching for words in CJK languages yields no results.
should be able to enter words from CJK languages as well as English words and still get search results.
- OS: Windows 11
- Browser: Chrome
- Browser Version: 112
I tried to create a table using the shortcode tables within a tab and it doesn't appear:
{{< tabs tabTotal="2">}}
{{% tab tabName="Example" %}}
{{< table >}}
| Animal | Sounds | Legs |
|---------|--------|-----|
| `Cat` | Meow | 4 |
| `Dog` | Woof | 4 |
| `Cricket` | Chirp | 6 |
{{< /table >}}
{{% /tab %}}
{{% tab tabName="Another Tab" %}}
{{< table "table-hover" >}}
| Animal | Sounds | Legs |
|---------|--------|-----|
| `Cat` | Meow | 4 |
| `Dog` | Woof | 4 |
| `Cricket` | Chirp | 6 |
{{< /table >}}
{{% /tab %}}
{{< /tabs >}}
Normal tables appear just fine.
I'd expect the shortcode tables to appear within the tabs.
No response
- OS: Windows
- Browser: Brave | Chrome
- Browser Version: v1.63.169 | v122.0.6261.112
Code blocks containing highlighted lines don't render on desktop browsers. I've tested this with Firefox and Chrome (without addons and also in private mode).
Additionally, if a wide code block is viewed on a smaller screen, horizontal scrollbar appears between the code text and code margin.
It works properly in mobile browsers.
Example this link renders differently on desktop and mobile.
The website is deployed on an NGINX server. Except for the automatic LetsEncrypt setup, the config file is at a bare minimum (happy to share if needed).
Code blocks to be highlighted on desktop browsers.
Horizontal lines to appear at the margin instead of above it.
Desktop browsers will smaller screen:
Desktop browsers will smaller screen:
Common to all desktop browsers
No response
Alert boxes lose their color in light mode.
Alert boxes should have similar color in both dark and light modes.
- OS: Ubuntu
- Browser: Brave, Firefox
- Browser Version: Brave v1.57.53, Firefox 116.0.3
How can i edit the landing page?
i guess it should be possible to edit it, and it should be documented to
No response
- OS: Debian 12.2
- Browser: Edge
- Browser Version: 116
I was writing a guide and after inserting prism into tabs the post no longer displays anything.
Apparently I can't use prism inside tabs.
that prism works inside tabs
No response
- OS: win11
- Browser: ff
- Browser Version: latest
There's currently no Toc (Table of Contents) when browsing docs on mobile. A ToC (specifically in mobile view) would make navigating pages with a large number of headings (<h1>
,<h2>
,<h3>
) much easier.
Create a mobile ready, sticky, drop down ToC
在iPhone上显示有问题, "返回顶部"按钮异常
When I use Markdown shell syntax, the highlight color doesn't apply, but when I apply HTML, it seems to work.
sudo apt update
sudo apt install python3-pip -y
pip3 install --upgrade pip
pip3 install python-openstackclient python-novaclient python-swiftclient
openstack --help
nova help
<html>
<head>
<title>Buy cool new product</title>
</head>
<body>
<!-- Use action="/create-checkout-session.php" if your server is PHP based. -->
<form action="/create-checkout-session" method="POST">
<button type="submit">Checkout</button>
</form>
</body>
</html>
I expected highlight color applied like here : https://lotusdocs.dev/docs/quickstart/
- OS: Windows
- Browser: EDGE
- Browser Version:118.0.2088.46
I was trying out the landing.yaml
to use it as the landing page for our doc set, and ran into some issues.
Related but different issues:
See the previous list, which I expected based on common landing page patterns.
No response
- OS: MacOS
- Browser: brave, chrome, safari
- Browser Version: Brave Version 1.58.137, Chromium: 117.0.5938.153, Safari 16.6
HTML alerts display with a background color.
Example code:
{{< alert icon="🍅" context="success" text="HTML alert" />}}
However, when I create a markdown alert, it does not seem to come up with a background color.
Example code:
{{% alert icon="🍅" context="success" %}}
Markdown
{{% /alert %}}
I tried the markdown example with the cart icon in your doc as well, but it seems to not show a background color either.
Have markdown alerts display the selected background color.
No response
- OS: macOS
- Browser: Chrome
- Browser Version: 116
Add a simple, configurable feedback widget that can integrate with either Google or Plausible analytics to record visitor feedback on content pages.
Originally posted by hugo-sid January 14, 2023
Hi @colinwilson . From the screenshot, lotus docs looks exiting.
Any plans to have the Hugo exampleSite
folder ? So, that one can easily check out how to organise content.
Create an exampleSite
to demo Lotus Docs' feature set
I have a working instance of gitlab with working gitlab-pages. The Plain-HTML Pages is working the hugo template from gitlab isn't working and the Gitlab Hugo Pages Example works but looks weird. But my locally build which works fine locally with lotusdocs completes the CI/CD. I am using GO v1.21.0
but it seems that the latest Hugo-extended uses GO v1.23.0
. My Pipeline was running after I switched to hugo-extended:0.109.0
.
My Hugo Config is so far the basic one and it works fine locally. The only issue seems that the copying to public or something else isn't working as expected. This is the output of the build and it seems that something is missing:
$ hugo mod get -u $THEME_URL
go: downloading github.com/colinwilson/lotusdocs v0.0.0-20230824022610-a7d660221d18
$ hugo
Start building sites …
hugo v0.109.0-47b12b83e636224e5e601813ff3e6790c191e371+extended linux/amd64 BuildDate=2022-12-23T10:38:11Z VendorInfo=gohugoio
WARN 2023/08/24 12:11:51 found no layout file for "HTML" for kind "page": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/08/24 12:11:51 found no layout file for "HTML" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/08/24 12:11:51 found no layout file for "HTML" for kind "term": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/08/24 12:11:51 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/08/24 12:11:51 found no layout file for "HTML" for kind "section": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
WARN 2023/08/24 12:11:51 found no layout file for "HTML" for kind "taxonomy": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
| EN
-------------------+-----
Pages | 5
Paginator pages | 0
Non-page files | 0
Static files | 0
Processed images | 0
Aliases | 0
Sitemaps | 1
Cleaned | 0
Total in 15 ms
Sadly I have to little insight to grasp what might cause the issue.
The following is the gitlab CICD:
image: registry.gitlab.com/pages/hugo/hugo_extended:0.109.0
variables:
HUGO_ENV: production
THEME_URL: "github.com/colinwilson/lotusdocs"
default:
tags:
- docker
- linux
before_script:
- apk add --no-cache go curl bash nodejs
- hugo mod get -u $THEME_URL
## Uncomment the following if you use PostCSS. See https://gohugo.io/hugo-pipes/postcss/
#- npm install postcss postcss-cli autoprefixer
test:
tags:
- docker
- linux
script:
- hugo
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
pages:
tags:
- docker
- linux
script:
- hugo
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
So at the end I only get 404s.
With successfull build and deploy I expect a working Pages Site
No response
- OS: Arch Linux
- Browser: Firefox
- Browser Version: 116
I'm using the emerald theme and noticed that links in the footer are highlighted differently on different pages.
In localhost:1313/projects/
, the footer looks like this by default:
On hovering over the footer link, it is highlighted with a horizontal green line:
And on clicking any of the projects, (url localhost:1313/projects/myproject
), the footer link is highlighted correctly (as shown on lotusdocs.dev/docs and its inner links):
Footer links to be displayed in the theme color on all pages.
Example this page
Screenshots added in description
- OS:
- Browser:
- Browser Version:
When I change the setting for themeColor in hugo.toml, the accent color on the internal pages changes immediately. However, the accent color (icons, buttons, links) on the homepage (localhost:1313) are still the default blue.
I expect that the themeColor setting takes effect across the entire site, including the homepage.
No response
- OS: OSX 13.4.1
- Browser: Firefox
- Browser Version: 118.0.1
Add support for FlexSearch (as the default search library)
I am running into an issue when using the Prism themes. It works great locally when my baseURL is set to /
and the publishDir are not set. This is the same setup that you have in the hugo.toml
file of the exampleSite.
when we push the docs to prod, we need to change the baseURL and set a publishDir. As soon as I do that, the Prism theme does not work properly anymore. I tried it with the exampleSite and seeing the same issue.
This is how it looks like with baseURL = /
and no publishDir:
And this is how it looks like with baseURL = https://example.com
and publishDir = public/product
The CSS should be the same in both scenarios
No response
- OS:
- Browser: Chrome and Firefox
- Browser Version:
Based on this quickstart guide, I created a page in the "docs" section.
The URL http://127.0.0.1:1313/docs
works and the page is listed, but the "docs" section is not visible in the homepage http://127.0.0.1:1313
.
I'm unable to find information on lotusdocs.dev about configuring the header.
Docs to be displayed in the header on the homepage.
No response
- OS:
- Browser:
- Browser Version:
Automatically close the sidebar menu when a menu item is clicked (excludes drop-down folders/parent directories)
I have set the following settings in my hugo.toml file
[params.docs]
darkMode = true
editPage = true
lastMod = true
But even if editPage is true there is no edit this page in the bottom of the page.
Edit this page button to be used. I use the latest version of lotus docs v.0.1.0 and hugo v0.123.8-5fed9c591b694f314e5939548e11cc3dcb79a79c+extended darwin/arm64 BuildDate=2024-03-07T13:14:42Z VendorInfo=brew
- OS: MacOS
- Browser: Brave browser
- Browser Version: v1.63.169
When using nested lists, such as an ordered list within an ordered list, or an unordered list within an ordered list, the sublists do not display proper bullets/ numbers.
Example 1: Unordered list within ordered list > no bullet points are displayed
Example 2: Ordered list within ordered list > Substeps do not start at 1
Display unordered lists as bullet points when nested in ordered lists.
Start counting from 1 for ordered lists that are nested in another ordered list.
No response
- OS: MacOS
- Browser: Chrome
- Browser Version: 116
When I add an SVG image within the tab shortcode, the image displays but is running out of the frame. PNGs seem to stay within the frame.
Have SVG images behave the same as PNG images in a tab.
- OS: MacOS
- Browser: Chrome
- Browser Version: 116
Currently when visiting https://lotusdocs.dev/robots.txt it returns 404 error page.
In order to improve the SEO it would be helpful for the site to return /robots.txt
with following content:
User-agent: *
Disallow:
Sitemap: https://lotusdocs.dev/sitemap.xml
This will allow crawling everything and point the crawlers to the sitemap.xml
which is already available.
Source for sitemap not supporting relative urls: https://stackoverflow.com/a/14218476/1337062
Source for allowing everything: https://stackoverflow.com/a/44467157/1337062
No response
No response
Following the documentation for deployment with github pages, I get the following error:
Wed, 03 Jan 2024 17:23:15 GMT
Run hugo
Wed, 03 Jan 2024 17:23:15 GMT
Wed, 03 Jan 2024 17:23:15 GMT go: errors parsing go.mod:
Wed, 03 Jan 2024 17:23:15 GMT /home/runner/work/kosmeda/kosmeda/go.mod:3: invalid go version '1.21.5': must match format 1.23
Wed, 03 Jan 2024 17:23:15 GMT Total in 472 ms
Wed, 03 Jan 2024 17:23:15 GMT Error: failed to load modules: failed to download modules: failed to execute 'go [mod download -modcacherw]': failed to execute binary "go" with args [mod download -modcacherw]: go: errors parsing go.mod:
Wed, 03 Jan 2024 17:23:15 GMT /home/runner/work/kosmeda/kosmeda/go.mod:3: invalid go version '1.21.5': must match format 1.23
Wed, 03 Jan 2024 17:23:15 GMT *errors.errorString
Wed, 03 Jan 2024 17:23:15 GMT Error: Process completed with exit code 1.
I was able to resolve it by changing the version to 1.23 inside the go.mod file.
Furthermore, there are some identation errors in the hugo.yaml in the documentation. I just used the one provided by hugo.
Successful deployment to github pages.
No response
- OS:
- Browser:
- Browser Version:
For now, I do this as a quick workaround
Create index.html
in layouts
folder.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=/docs" />
</head>
<body>
</body>
</html>
This will automatically redirects me to /docs
Originally posted by @midhunmonachan in #147 (comment)
Seems like more people are interested in this feature. I'm not sure if there is a better way to do this
It is not possible to insert an image via markdown syntax, via ![](/xxx.webp)
After inserting an image, there is only one empty
I want to support inserting images via markdown, or shortcode.
No response
- OS: Windows11
- Browser: Edge
- Browser Version: 123.0.2420.97
If I use AVIF images, I get this error:
Error: error building site: "/home/pedro/Documentos/GitHub/m3upt-lotusdocs/content/docs/intro.md:1:1": "/home/pedro/.cache/hugo_cache/modules/filecache/modules/pkg/mod/github.com/colinwilson/[email protected]/layouts/docs/_markup/render-image.html:18:77": execute of template failed: template: docs/_markup/render-image.html:18:77: executing "docs/_markup/render-image.html" at <.Width>: error calling Width: this method is only available for image resources
It works fine if I use the JPG format.
No response
- OS: I use Arch btw
- Browser: Chromium
- Browser Version: latest
When having nested dropdowns in the left-hand sidebar, the second dropdown displays as a single page as shown in the following image.
Even though Dropdown 2 has topics underneath, these will not be displayed in the nav. But once you click on Dropdown 2, the subtopics will display in the middle panel.
This is my local folder structure
Properly display nested dropdowns in the left-hand sidebar.
No response
- OS: MacOS
- Browser: Chrome
- Browser Version: 116
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.