elementary / blog-template Goto Github PK
View Code? Open in Web Editor NEWTemplate for the Jekyll-powered elementary blog
Home Page: https://blog.elementary.io
License: GNU General Public License v3.0
Template for the Jekyll-powered elementary blog
Home Page: https://blog.elementary.io
License: GNU General Public License v3.0
From https://github.com/elementary/blog/issues/9
Looks like it's just monospace for now
We should be able to copy over some styles from the main site.
We currently show the next newest and next oldest post in Up Next. Something I was thinking about today was also showing the newest blog post on the blog, as it might be the most relevant to someone coming to an old blog link.
Of course we should make sure we don't repeat posts.
When the height of the page is less than the viewport's, the footer floats some pixels above the bottom, due to not having enough content to push it down.
Steps to reproduce the behavior:
The footer should stay fixed to the bottom of the <body>
.
Browser: Chromium 84.0.4147.105
OS: Manjaro
[ x ] I'm using the latest version from git that I've manually compiled
[ x ] I'm using the latest released stable version
I noticed that the <html>
and <body>
tags are not filling the height of the page, so I added this to my local copy of the theme:
html, body {
height: 100%;
}
However, though this made the page fill the viewport, it didn't fix the issue of the floating footer. I tried other solutions like setting position: absolute;
to the footer and position: relative;
to the <body>
, but to no avail.
These changes even triggered other weird bugs, like making the search bar icon float randomly and making the footer be stuck to a random part of the page with each reload. ๐
The theme's files contain many hard-coded parts, like links and messages, making reference to elementary OS's blog, which makes difficult for other people to use it in their own blogs.
The theme should make use of variables that can be configured via the _config.yml
or the front matters, rather than editing the theme's files directly.
I really like this theme and I'd be happy to contribute to it by submitting a PR replacing the hard-coded parts with variables, if you're okay with it.
I'm using this theme on my self-hosted blog running on an Nginx + Ubuntu 20.04 server.
From https://github.com/elementary/blog/issues/12
Should be relatively easy to do with lightweight js and local storage
Reported on Twitter: https://twitter.com/Jbastardov/status/1387076808517066754
Can't scroll moderately long code block horizontally. It gets cropped.
The code block is horizontally scrollable.
Other Linux
Compiled from git
N/A
N/A
We support text-based Twitter embeds by providing the text locally. But we don't support media like photos or video.
We should support "embedding" photos and video locally, ideally by providing the images and video files to ensure content doesn't disappear and isn't hitting Twitter's servers on load.
From https://github.com/elementary/blog/issues/49 by @danrabbit
Oops
With a static site, there's not a good way to pro-actively get people reading content. We publish on social media, but some folks might prefer a more newsletter-like format. However, we don't really want to collect folks' email addresses, and using something like Mailchimp would be expensive.
We already regularly send blog posts to patrons and sponsors, so let's use that! This also becomes a natural "upsell" for folks to directly support us, without feeling invasive or like anything extra/new since it's promoting existing ways to support us.
We currently have linked icons at the bottom of each post to various ways to support us.
Lots of sites also have a "subscribe to our newsletter" form on blogs, or worse, pop-ups on their site. I don't want to to something exactly like that, but some sort of messaging around getting notified when we post by supporting us on Patreon or GitHub Sponsors could be more effective than just having links at the bottom of posts.
Now that we have that, we should add it
It's kind of a pain to search back through the archive of posts because the cards are so big and it requires a lot of scrolling
Change the archive page to use small cards
We recently switch the tags page to use small cards
From https://github.com/elementary/blog/issues/34
Like iPhone 5/SE (tested in Firefox Responsive mode with the iPhone SE preset):
From https://github.com/elementary/blog/issues/48. Context:
I don't think there's anything that can be done in Jekyll to enforce this for Markdown links (I'll double-check), but at the very least we can do that super light JS that adds
target="_blank"
to links that link offsite.
So with the Markdown parser you can do
[Example](https://example.com){:target="_blank"}
, but that's annoying to do for every link. Instead, I'm adding some lightweight JS that addstarget="_blank"
to any external links that don't already have atarget
attribute. This means if you want to override the behavior, you can just add[Example](https://example.com){:target="_self"}
, but[Example](https://example.com)
will automatically open in a new tab.
Please don't use JavaScript for this. Try doing some build time plugin like https://keith-mifsud.me/projects/jekyll-target-blank
@btkostner I tried exactly that first, and it didn't work. I believe due to the
--safe
environment used by GitHub Pages. But if you can get it working, be my guest. ๐
Gonna merge this for now since we have a lot of external links in blog posts. I would prefer doing it as build time as well, and will open a new issue to fix that.
I do agree we should move it to build-time ideally if we can get that working.
On mobile we have to do so much scrolling because of how tall all the cards are. I opened another issue about a tighter layout for small cards, but the large cards are still very tall
Another small change we could make is using a 16:9 aspect ratio for the large card previews on mobile. This would also just be more like the desktop site where we use a wider card aspect ratio
On mobile, the large and small cards are the same size, which is about almost the entire screen size per post depending on your phone. This means lots and lots of scrolling on mobile
Small cards should use an even more compact layout on mobile to help with all that scrolling. Something like the layout from search where we have a small square card with the information to the right could work well
There's a lot of good tagged content and we have some featured tags in the secondary nav, but I don't think that's really necessarily as engaging as it could be.
We also have kind of a weird thing were we go from the newest story in a big card to the next 3 newest in small cards and then back to older stories in 3 big cards
I think this is what we used to do on Medium?
Right now we have a permalink for sharing each post in its footer. But it's not obvious how to share this link easily on mobile.
Use navigator.share, which is supported on mobile. We can trivially fall back to the existing behavior when unsupported.
I just implemented this at the Blaede Family Recipes: https://blaede.family/recipes/banana-bread/
From https://github.com/elementary/blog/issues/3
Right now they're just mono, but we usually set a gray background color, too.
From https://github.com/elementary/blog/issues/40 by @danrabbit
Something like this might make the tags page nicer to scroll through as well
I like the idea, but that feels like a lot of wasted space to the right. ๐ค
I guess we could flow it into a grid, but I feel like a list is faster to scan
like on the main site
Originally reported by @MobileAZN in elementary Community Slack:
The store link at the bottom of the blog post is incorrect.
It points to: https://elementary.io/store/
It should point to: https://store.elementary.io/Iโm not sure if itโs a common footer you paste in, but it does need updating.
Clicking the cart button should take us to the new store page
7.x (Horus)
Latest release (I have run all updates)
N/A
Not relevant
For my own needs I'd like to be able to embed bash command / output snippets, and have them nicely styled. I think I'm going to work on this anyway, but I can submit a PR if you'd like this feature as well (and I'd love to get feedback from you, more aesthetically aware people). I imagine this is not a priority for you, as you'd prefer regular users to keep away from the terminal, but maybe you're planning on publishing some more technical blog posts directed at programmers or potential elementary contributors?
Describe the solution you'd like
For bigger snippets, I was thinking instead of the currently used codeblock style, we could show something that resembles a terminal. Biggest concerns are not showing line numbers, using a dark background and a maximum line length (text wrap). Maybe also some kind of title bar, that resembles a terminal window title bar. Easily embedding colored bash output would need a bit of research, but I think it's be doable. Ideally coloring could be automated, but manual tweaking to add colors would be good enough for me.
For embedding just commands, I would like a more minimal style with just dark background and a $
prompt. This would mostly serve as an easy way to copy commands.
Existing work
Example implementation for Rogue highlighting is described here
Additional context
This could be styled based on the Elementary terminal, obviously. I would skip the tab bar and most of title bar icons. The colors used by default could be exposed through simple css classes.
Text formatted table is rendered badly.
\
):```sh
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ 3 local devices โ
โโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโฌโโโโโโโโโโโโโค
โ MOUNTED ON โ SIZE โ USED โ AVAIL โ USE% โ TYPE โ FILESYSTEM โ
โโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโผโโโโโโโโโโโโโค
โ / โ 97.9G โ 36.8G โ 56.1G โ [#######.............] 37.6% โ ext4 โ /dev/sda2 โ
โ /boot/efi โ 511.0M โ 38.0M โ 473.0M โ [#...................] 7.4% โ vfat โ /dev/sda1 โ
โ /home โ 146.6G โ 78.5G โ 60.6G โ [##########..........] 53.5% โ ext4 โ /dev/sda4 โ
โฐโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโดโโโโโโโโโโโโโฏ
\```
bundle exec jekyll serve
The table should've been rendered properly, like this:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ 3 local devices โ
โโโโโโโโโโโโโโฌโโโโโโโโโฌโโโโโโโโฌโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโฌโโโโโโโโโโโโโค
โ MOUNTED ON โ SIZE โ USED โ AVAIL โ USE% โ TYPE โ FILESYSTEM โ
โโโโโโโโโโโโโโผโโโโโโโโโผโโโโโโโโผโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโผโโโโโโโโโโโโโค
โ / โ 97.9G โ 36.8G โ 56.1G โ [#######.............] 37.6% โ ext4 โ /dev/sda2 โ
โ /boot/efi โ 511.0M โ 38.0M โ 473.0M โ [#...................] 7.4% โ vfat โ /dev/sda1 โ
โ /home โ 146.6G โ 78.5G โ 60.6G โ [##########..........] 53.5% โ ext4 โ /dev/sda4 โ
โฐโโโโโโโโโโโโโดโโโโโโโโโดโโโโโโโโดโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโดโโโโโโโโโโโโโฏ
If it's not rendered properly on GitHub on your system, please change your monospace font. Here's the original table:
Other Linux
Latest release (I have run all updates)
N/A
N/A
Is your feature request related to a problem? Please describe.
The github.com/elementary/blog repository duplicates a lot of this work making it hard to sync changes.
Describe the solution you'd like
Publish the github.com/elementary/blog-template as an actual gem jekyll theme so we can just reference it in github.com/elementary/blog and use it like any other theme.
I think this would make the results a lot more relevant:
At the moment we're still getting a ton of clicks on that Medium link and I wonder if it's because of how prominently that looks like where you go to read more stories after the one or two suggested "Up Next" posts
Show 3 (or maybe even 6) stories below "Up Next" (using the smaller card size from the homepage) from the same tags as the published story. So for example if you're reading a design post, we show more design posts you could read. This could be a good way to surface older posts and drive engagement towards similar content
On Medium, directly below the post they show "related reads", but from other publishers.
From https://github.com/elementary/blog/issues/61 by @fitojb
Guillemets are neither arrows nor directional symbols. They are quotation marks. They look particularly wrong when browsing the rest of the elementary website in Spanish, Catalan or French (these languages use guillemet quotation marks, making the overall site conflate two very different uses).ยน
I recommend swapping these for โโโ and โโโ respectivelyยฒ, and maybe add them to the ::after pseudoelement so they arenโt underlined on hover and selectable. Other solution might be a specialized SVG image of a chevron, which is acceptable even if it slightly resembles these punctuation marks, since it wonโt be confused.
ยน I might write a blog post one day delving deeper into this pervasive but wrong practice in web design.
ยฒ If you ever add โFirstโ and โLastโ to the pagination, โโคโ/โโฅโ can be used as well.
There's a lot of great content now in the "related" posts, but it can be kind of a big scroll distance to go from "Up Next" to "Related" since it can have 3 huge previews there now
Maybe it would be better to use the "Small" size for "Up Next" posts so that you don't have to scroll so far past the bottom of a post to see more content
Not sure if this belongs here (did not find a dedicated blog repo) but I checked the elementary blog out and the post for the odin release was 43(!)Megabyte in size, and other post include several images with more than 1meg in size and this is really not so smart using all the visitors bandwith (some are on metered connections and have no unlimited data plans).
Google Speed Analyser also says to optimize images:
blog.elementary.io should not use such big images
Solution would be to use compressed images where no absolute high quality media are neccessary and maybe some lazy loading here and there. You could also detect display sizes and use different images on desktop and mobile. Look into srcset https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset, this allows you to use high quality on larger screen sizes and another low quality on mobile for example.
I also think some automation could solve this.. not sure what jekyll-developers are using for this though.
I am unable to zoom the image in the blog post - it's zoomimg out instantly
https://blog.elementary.io/introducing-elementary-os-5-1-hera/
Steps to reproduce the behavior:
Image zoom works
OS: MacOs
Brower: Firefox Nightly 72.0a1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.