Index out of range error in Drawer.py
Opened this issue · 4 comments
Hi,
Thank you for making this template.
I tried to install it using pypi and then run fletxible-init.
The web page wont show up and I got this error message:
File "/Users/hurricane/Documents/pscripts/core/drawer.py", line 28, in init
primary = self.docs["theme"][1]["primary"]
~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
Is there anyway to fix it?
Hello!
The issue comes from the config file - it wasn't updated in the last release.
To fix the problem, make sure your fx_config.yml file has the following info:
site-name: "fletxible."
repo-url: "https://github.com/LineIndent/fletxible"
repo-name: "LineIndent/fletxible"
theme:
- bgcolor: "teal"
- primary: "teal700"
navigation:
- Start: "installation.py"
- About: "about.py"
You need to have the theme colors inside - you can change the rest as needed.
Don't forget to run the script.py file when you update the fx_config.yml file.
Hi @LineIndent thank you for your response.
Updating fx_config.yml and running script.py I'm able to get the website show up and running.
But when I run main.py, the main page appears in dark background and black text, is there any other config file I need to edit to change the page background?
Hey - that's very strange. It should work the same across all platforms. What OS are you on? This library was made in a macOS with dark-theme.
Technically you can change the bgcolor and almost all colors from inside the code itself. But that would be counterintuitive. I'll look into this and see if I can find a solution.
In the meantime you could change the colors manually from within the pages inside the web folder.
Hi again,
I'm using macOS ventura 13.4 with auto theme.
I have just changed my theme to dark, and now it's working fine.
I will try to change the colors manually as I want a page with white background.
Thank you @LineIndent .