Comments (14)
I added theme as a module. So I can't delete theme data file. It seems like it combines theme data and my project data.
Ah ha. Yes this is a problem. I'll look at resolving this very soon (next update).
from lotusdocs.
Have you tried deleting the theme's landing.yaml
file?
from lotusdocs.
I added theme as a module. So I can't delete theme data file. It seems like it combines theme data and my project data.
Hero and "what can i do" sections is mine, but other is sample. It happened when I had updated theme to last commit version.
Workaround: Disabling keys from sample helps.
featureGrid:
enable: false
imageCompare:
enable: false
![Screenshot 2023-12-18 at 20 28 13](https://private-user-images.githubusercontent.com/10090151/291278606-9b833b8c-27cf-4055-a36a-ddc2e062bb2a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTc4NTc5MjQsIm5iZiI6MTcxNzg1NzYyNCwicGF0aCI6Ii8xMDA5MDE1MS8yOTEyNzg2MDYtOWI4MzNiOGMtMjdjZi00MDU1LWEzNmEtZGRjMmUwNjJiYjJhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjA4VDE0NDAyNFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRmZTJmOTM4YWFhN2UzMzhmMzdlZTNmMjI3ZjA5MGEyMDdkZDUzMmJiZTUxZWE4ZTgxNjM3NDRmMjZmMjA3ZGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.zGg2FD4c2of-3_Fxckbb87iPkpq6QYngQm0-SLYIalY)
from lotusdocs.
Only one problem. ctaButton
button always leads to root. No matter ctaButton.url
setting. So I was forced to use cta2Button
https://github.com/rusinikita/changes/pull/6/files
from lotusdocs.
The workaround doesn't work, by the way. It crashes out saying that a partial failed:
This sucks.
Followup: https://gohugo.io/templates/data-templates/ -- There's a note about this specifically:
Therefore, theme authors should be careful not to include data files that could be easily overwritten by a user who decides to customize a theme. For theme-specific data items that shouldn’t be overridden, it can be wise to prefix the folder structure with a namespace.
from lotusdocs.
I guess, there is something inside your configuration. Can you provide file.
from lotusdocs.
Here's the most minimal repro:
hero:
enable: false
featureGrid:
enable: false
The full error I get:
ERROR Rebuild failed: render: failed to render pages: render of "home" failed: "/Users/indrora/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/colinwilson/[email protected]/layouts/index.html:19:11": execute of template failed at <partialCached $path ($indexContext.Get "indexContext")>: error calling partialCached: partial "landing/featureGrid.html" not found
This tells me that it's making a guess as to what template, but moreover not checking if the section has enable
set to true.
But wait, the plot thickens!
The following raises a New and Interesting error:
hero:
enable: false
mycoolsection:
enable: false
template: asdf
this causes a NEW bug to show up:
ERROR Rebuild failed: render: failed to render pages: render of "home" failed: "/Users/indrora/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/colinwilson/[email protected]/layouts/index.html:19:11": execute of template failed at <partialCached $path ($indexContext.Get "indexContext")>: error calling partialCached: partial "landing/mycoolsection.html" not found
There's actually multiple bugs here:
- The template provides data that is being used, and instead should supply at most some filler data that gets set aside if there is a site-specific dataset
- The template does not check to see if the
enable
field is set - The template is derived from the key rather than from the
template
field
Edit: it appears I was on an older version. Once I forced Hugo to use the release branch, it worked.
from lotusdocs.
What version or git commit did you use to get the workaround functional? I'm on version v0.121.1-00b46fed8e47f7bb0a85d7cfc2d9f1356379b740+extended
and I get the same error you showed when I disable the feature grid and image compare sections.
from lotusdocs.
@aMytho Here is my version that works
https://github.com/rusinikita/changes/blob/main/docs/go.mod
https://rusinikita.github.io/changes/
from lotusdocs.
That worked for me, thank you!
@aMytho Here is my version that works
https://github.com/rusinikita/changes/blob/main/docs/go.mod https://rusinikita.github.io/changes/
from lotusdocs.
I think this problem happens only when you use lotus docs as a submodule? I faced the same problem today my configuration is like the below
hero:
....
badge:
text: custom text
color: primary # primary, secondary, success, danger, warning, info, light, dark
pill: false # boolean
soft: true # boolean
featureGrid:
enable: true
weight: 20
template: feature grid
title: This is updated.
subtitle: Lotus Docs is a highly configurable Hugo documentation theme.
Hero page was working fine it override it, but feature grid just won't work.
but what I used this repo as a template, and everything started working.
from lotusdocs.
I'm facing the same issue.
I've installed this as a Hugo Module following the instructions here.
When I add my data/landing.yaml
I can edit Hero and it works, everything else doesn't.
I've tried the workaround but also didn't work. I can provide more information on my context, if you tell me what you need :)
from lotusdocs.
Use the template from the repo of the docs itself @ManuelLevi
from lotusdocs.
Thanks @chapimenge3
I've copied the contents of these files (one at a time):
- /data/landing.yaml
- /exampleSite/data/landing.yaml
to my /data/landing.yaml.
Neither of them worked. I can change the Hero, but nothing else.
from lotusdocs.
Related Issues (20)
- AVIF images not working HOT 3
- No copy codeblock for non-prism highlighting HOT 4
- themeColor in hugo.toml doesn't affect homepage HOT 1
- PrismJS highlight color no applied with shell HOT 2
- How can i edit the landing page? HOT 2
- /robots.txt is missing HOT 1
- Landing page issues HOT 4
- Mermaid diagram rendering broken HOT 5
- invalid go version '1.21.5': must match format 1.23 HOT 1
- Prism theme does not show correct CSS when baseURL/publishDir are not set to /
- Unable to Build from Quickstart Page (March 1st, 2024) HOT 2
- Shortcode tables don't show up within tabs HOT 2
- editPage parameter not working
- CJK language search does not work in flexsearch
- Disabling landing page
- Prism inside Tabs Issue
- The page does not support inserting images HOT 1
- Images do not work HOT 1
- Failed to extract shortcode: shortcode "alert" has no .Inner, yet a closing tag was provided HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lotusdocs.