Skip to content
This repository has been archived by the owner on Feb 10, 2024. It is now read-only.

Index out of range error in Drawer.py #2

Open
azmikabiwa opened this issue Jun 22, 2023 · 4 comments
Open

Index out of range error in Drawer.py #2

azmikabiwa opened this issue Jun 22, 2023 · 4 comments

Comments

@azmikabiwa
Copy link

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?

@LineIndent
Copy link
Owner

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.

@azmikabiwa
Copy link
Author

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?
Screenshot 2023-06-23 at 13 18 01

@LineIndent
Copy link
Owner

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.

@azmikabiwa
Copy link
Author

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 .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants