-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update docs_theme to boostrap V5.x #9404
base: master
Are you sure you want to change the base?
Conversation
d0b7188
to
aa3583a
Compare
Some updates on my progress so far. I setup webpack for the project and the development environment. The navbar structure is almost completely updated. The side nav structure can be a bit improved and I haven't really touched the main content so far. |
I would love to have hear your opinions on the new theme. There are some problems specifically with the old django rest framework picture and the sponsers' picture on the dark mode but everything else looks quite good to me.
|
@cclauss It's been a while since my last commit. I would appreciate it if you could take some time to review the current state of the project. Thank you. |
"build": "webpack build", | ||
"build:production": "webpack build --mode=production", | ||
"build:watch": "webpack build --watch" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I try to build the docs on master, I run mkdocs build
and then I can just open the site/index.html
file and it just works.
With this branch, the html file is missing all CSS styles, until I run npm i && npm run build
, which seems like an extra step needed to deploy the docs. I have no idea how the actual docs are currently deployed nor if the project is willing to change that, but that might be a deal breaker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of downloading the css files from bootstrap directly I've imported the needed parts of bootstrap manually which decreases the final bundle size and improves performance. We could build the final css files locally and commit them to the repo or create a workflow to automatically build the final css files both solutions work. In my opinion the second solution is better and cleaner. There's gonna be 10K of raw bootstrap code which is just unnecessary in my opinion.
I deployed a preview of the new theme: https://669e11a0d553a7007d5ec657--effulgent-entremet-d2197e.netlify.app |
Thanks for deploying it. The code formatting with prettify is not working in this deployed version for some reason though. It works fine on my local development server. |
I see, the request to fetch |
That's my bad actually, I accidentally added the dist folder into .gitignore which includes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you share screenshots of the updates please?
The theme is also responsive, I could share the tablet/mobile views if you want.
If there are any other issues which need to be fixed i would be happy to know. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code itself lgtm, and I think this is an improvement.
I see two outstanding questions, both to be answered by @tomchristie:
- Are you OK adding
npm install
/build
to the pipeline? - Are you OK with how the sponsors' logos are handled? (The previous scheme showed a random pick on the left; that seem to no longer work.)
Thanks @mostafaei2002, @peterthomassen… I’m going to be slightly awkward and blocking here. I don’t think this ties in neatly with getting a unified doc style throughout encode, and so I’m going to suggest we hold off on this.
Not really, no. |
I am trying to update the docs_theme to bootstrap v5.x, There were some problems with the previous version.
The process shouldn't be very hard since the whole HTML structure is less than 250 lines. I don't know how much custom css, js is written for the current active version though.
If everything goes smoothly I should finish in a week or two.
Ideally I would love to use something other than mkdocs to generate the static HTML web pages. Bootstrap itself seems fine but mkdocs isn't that good. I like something like Astro much better.
Probably better to keep it quick and simple though and not overdo it.