-
-
Notifications
You must be signed in to change notification settings - Fork 716
Jekyll Rewrite #2674
I've been working on and off for the past few months on a rewrite of the current website, made with Jekyll. It's the same technology used on the blog/AppCenter site, and being static, is very performant.
The current website looks and feels pretty good to the user. Quoting what @danrabbit said on Twitter once, it "does a good job of hiding the mess underneath". Still, I believe it is in the best interest of the project to get to the point of starting fresh eventually, and with the imminent release of Odin, it would be good timing.
Reasons to drop the current PHP-based project of the main website:
- The website mostly contains static information, with just a few dynamic bits; the PHP code results in extra overhead for both server and client;
- The code is not very organized, making it a bit difficult to maintain;
- It is unnecessarily tied with the Store;
- It has a different stack than other projects, making reutilization of elements/styles more difficult;
- Feel free to add more, this is a discussion!
Current dynamic functionalities
Now, the website has some dynamic functionalities that we'd need to pay attention to, since it'll become a static website. They are:
- Purchase - This is something we'd likely want to have an API for? I can't say I went 100% through what goes on in the current Stripe integration but it looks simple though;
- Download - It currently uses PHP to get the best region via IP, but this seems totally doable via JS. If JS is disabled, we'd have to give a default link;
- Recent blog posts - already being done via JS, no issue here;
- Team page - it currently loads the data from Slack dynamically. Could this be done on build time? I assume this doesn't change frequently
- Store - yeah, this should be a separate site and project;
- Docs - not really dynamic, but I think they could be moved to the actual docs site?
What I've already done
I have created a public repo to work on this. It is setup with a GH Action to publish it to GitHub Pages, on a subdomain I own. The live enviroment can be checked out here.
I've kept in mind the stack currently being used in other sites, and worked on making the code as clean as possible. Also, I've tried to stay true to the styles of the current website, specially regarding typography. I also kept the buttons/inputs in the same styles, but I expect them to be changed if the site is to mimic the OS's stylesheet redesign.
I've been in touch with @cassidyjames a while ago about this and, since there will likely by a redesign of the home page, haven't worked on that one at all. What's currently done and working is:
- Header
- Footer
- Language picker (working both manually or automatically by browser language)
- i18n support (currently only in English and Brazilian Portuguese)
- Dark mode support
- /support page
- /press page
- /brand page
- /oems page
- /privacy page
What I'd really like to do soon is see how to integrate this with Weblate, and see if we can salvage the existing translations from it.
What do you think?
I'm opening this discussion to see what the team thinks of the idea and what I've worked on so far. This way we can work out any issues, and hopefully if this goes forward, attract the attention of someone to help me out with this.
All reactions
-
👍 1 -
🎉 1 -
❤️ 3 -
🚀 1
Replies: 7 comments 4 replies
I've always thought it was a bit odd that there's a small section of "docs" on the website. That definitely seems like something that could be in its own repo since its essentially just powered by GitBook(?) and looks totally different.
All reactions
Sweet! This will be super nice and something we totally want to do. One thing to do during this rewrite is update the CSS and templates to match our more modern style from the blog site.
Update on the dynamic parts:
- store is moving to it's own project at elementary/store
- all docs should be moved over to the gitdocs site
- recent blog posts can be done during build time if we want to speed it up even more
- team page can also be done on build time + we might want to redesign it a bit
- purchase + download would be nice to move to an API with builds.elementary.io, but that's probably going to take a while to get done
All reactions
-
🎉 1
Yes, I am rewriting the CSS from scratch (and using the blog ones as a base when possible) and using nicer things like flex, grid and variables. A small part of it was copy-pasted and modified only slightly, like inputs and buttons, because I'm pretty sure they will be updated to resemble the OS's new stylesheet. But they're still more organized and readable than before, so it will be a breeze to update.
All reactions
-
🎉 1 -
❤️ 1
Re: team page, if we still want to do something dynamic it would probably be much more accurate to use GitHub as the source of truth here. There are a lot of people in Slack that are outside collaborators or just have gone inactive etc. The GitHub teams are more likely to be kept up to date and accurate since it reflects who has repo access and not just who is in a chat room
All reactions
-
👍 4
Makes sense. Ideally this would be generated with the GitHub API on build time I think, but doing it dynamically via JS (or manually on code if we choose to) wouldn't be a problem.
All reactions
-
👍 2
Just finished setting up the Privacy page. I took liberty of updating the browsers listed there, adding a new one (Brave), updating Edge to the Chromium-based one, and removing Midori and IE, since IE doesn't even show up in Plausible stats anyway, and I think Midori isn't a thing anymore?
I also think reusing existing translations from Weblate won't be really doable sadly, unless it's done manually.
All reactions
@cassidyjames I know you were making initial drafts for the home page design. One possibility to keep in mind: I wrote the theming to theoretically support changing accent colors dynamically. So if you'd like to highlight this feature (alongside dark mode) we could add this changing of the accent color in the website as a novelty.
It's something I've seen on the Pop_OS website (for dark mode toggle) which was a fun detail :)
All reactions
So, I've been looking into integrating Weblate with this new project and it looks like it can be integrated easily. However, setting up an FOSS repo there seems to have some an approval process that's not really worth it on my prototype repo.
Is there any interest in bringing the project in its current state into the elementary organization? It would also allow to start working on the Team page, since if the plan is to use the GitHub API, it requires the organization access to fetch the data.
All reactions
No need to integrate into weblate yet. As long as the po and pot files are accessible we should be good. As for the team page, I think you should be able to get the public memberships in the org without any special token. We don't want to show hidden people anyway.
All reactions
-
👍 1
Indeed, for the Team page it looks like this resource from the API would meet our needs.
As for translations, no po and pot files, they're all in a single YAML file (1 per language) right now. The gem I used for i18n supports breaking them in multiple parts maybe, but I haven't tried that yet.
All reactions
I am having trouble finding the time to work on this 😥️
If anyone wants to continue the work on it feel free to contact me, the project is very straightforward at this point