-
Notifications
You must be signed in to change notification settings - Fork 39
Complete Redesign of the Installation Page #51
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
Conversation
2021-08-14.19-56-49.mp4The site as of right now. |
I've looked into the macros plugin and from what I've tried, it is possible to include markdown files in HTML files. The problem now is that the documentation doesn't seem to mention a way to include just part of the included markdown files. But that would mean every time I'm using a new tag, a new markdown file is required (assuming if we want to sanitize the markdown file from HTML syntax). |
@Technius can you elaborate further on how we are going to make overrides but still having the content in the markdown files? Because I don't really understand. |
We create an override for The individual markdown files should have the OS-specific instructions. In this case, the markdown files should just contain the contents of the |
Here's thing though. I'm assuming making the overrides for the installation page is the same process as making the overrides for the homepage. I repeated the process of moving the file to an HTML to the overrides folder with all of its CSS. For some reason, the page wouldn't read the CSS and go about unstyled. Even weirder is that the table of content is still visible even though we're supposed to override the theme. This didn't happen with the homepage. |
Wouldn't this mean clicking the OS selection button wouldn't link to the OS page? So is it replaced with an if/else logic that select which content is displayed according to what button is "active"? But what happens when there is no active button, such as when the user first visit the installation page? |
On a second thought, could simplifying the override be a part of a different PR? Considering that some part are more complex to simplify and optimize, (Linux installation page has different download buttons, and the title of the version selection has a subtitle that isn't present in Windows and MacOS installation page), for the best implementation I think it should be a different PR. |
Yeah, let's just keep it simple for now. I can help you clean it up in another PR. |
Alright, that problem is fixed. But now when building, MkDocs says that 'downloads' (which is in the individual OS installation page) is undefined. Even though it is defined in the |
I added the whole downloads variable to the header of the markdown only as a temporary measure. Once the layout is corrected I'll fix it. |
You'll probably need to resort to the markdown file for Linux, otherwise you'll have to enter
For the links, the "correct" solution would probably be something like defining the links in a yml file and then including it with a macro: https://mkdocs-macros-plugin.readthedocs.io/en/latest/advanced/#including-external-yaml-files |
The issue seems to be that markdown can't be used inside of manually inserted HTML tags. The simplest workaround I can think of is to put the tab element thing (the one that contains all of the tabs) into a markdown file and then use the include macro. |
I've done this. Now I just need to theme it. |
I don't get why using |
Even after including the many downloads variable in an external
|
The tabs display correctly for me; did you restart your server? Unfortunately, it seems like macros only work in markdown files, not in templates (fralau/mkdocs-macros-plugin#60 (comment)).
|
By the way, I'm not sure that we need the extra |
It's been correct since yesterday. I just had to break it up to a separate markdown file.
It is. But I thought I had to try breaking it up into another file, that's what the link you sent was about. |
While this doesn't mitigate the problem completely, I believe this is a more elegant stopgap solution than merely putting the links in the header of the markdown. @Technius |
Let's just get something working for now. I will clean it up later. |
It's already working. Have you not tried it? |
The install pages look fine to me for now.
I think this is a mkdocs bug; the url filter should be generating the linux relative to the current page, but it's generating the link relative to the site's base url instead. For now, let's just directly write the url instead of using the filter. |
Done. |
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.
I think this is good to go. I will handle the squash and final merge.
This is a combination of 11 commits: * Most redesign of the page is done * Purge h1 for SEO optimization * Fix the installation.html not reading CSS files * Add CSS properties that were previously covered by the themes * Fix theming on tabs and automating its content * Make download button be vertically-aligned between the Nightly and Stable version so that it's more aesthetically pleasing * Removes unnecessary padding * Fix links to other OS installation pages with absolute path * Tweaks the tab in linux installation page by lighting up the color of not selected distro and giving animation to the colored underline * Put links as a variable in a markdown file that then get included in the HTML * Change links to not use the filter
78c63b9
to
a1233ba
Compare
Sorry it took so long, I've been busy recently. |
I pushed some commits to master branch to refactor the installation page template code. Some minor visual changes happened; can you check to see if it looks okay? |
Just saw it. Can't find any difference. |
Thanks for checking! |
Continuation of #50
To do: