superhawk610 / dev-a-day Goto Github PK
View Code? Open in Web Editor NEWWriting about development once a day for a year.
Home Page: https://blog.aaronross.tech
License: Do What The F*ck You Want To Public License
Writing about development once a day for a year.
Home Page: https://blog.aaronross.tech
License: Do What The F*ck You Want To Public License
This will be a bit more involved since our deployment is totally static, but should be doable with something like Firebase integration.
API Setup
Client Integration
Deployment Integration
Articles are padded a bit too much on mobile, we need all the width we can get. Probably should just be decreased to 5px
or so.
A nice feature on many modern article hosts is displaying the estimate time required to read through an article. I'm sure the actual estimation can be performed by an existing dependency, just need to find one and integrate it with the article-view
component.
Ya know, for people that don't want to go through the effort of copy/pasting the URL.
A couple recent articles have linked back to other articles - the current behavior of links within an article is to open in a new tab, but this is not ideal since it's linking to another page on our site. Once the markdown renderer has completed, we can scrape for relative links (anything prefixed with /
) and replace their click handlers with a custom handler.
The handler should instruct Angular's router to smoothly transition to the indicated route, something like
constructor(private router Router) { }
openArticle(path: string): void {
this.router.navigate('articles', 'article-view');
}
Currently the site favicon is Angular's logo because lazy. Let's do something a little more descriptive.
It would be nice to allow the user to jump to the next or previous article in a series once they've finished reading one.
Only 2 days in and I'm already realizing these are generally going to be long articles. It would be nice to have a button show up once you've scrolled away from the top of the page that allows you to easily get back to the top.
Providing an immediate method of feedback and engagement for readers would be great, and a fun project to play around with real time subscriptions (because why not, right?).
discussion
component to articles moduleTo grab some traffic from GitHub, we could link to all (just recent?) articles in the README and have it updated as part of the deploy process. Could be cool.
Title says it all. Header id
s should be run through toLowerCase()
.
Mobile overscrolls on some pages, just slap a overflow-x: hidden
and we'll be good to go.
The current deploy script is nearly there - it handles building and pushing everything up to gh-pages, but new content isn't propagated to the live site since the old content is cached/served via Cloudflare. Cloudflare offers an API for handling this programmatically, let's use that.
yarn deploy
Twitter is a great way to generate engagement, but it sure would be nice to have it done automatically.
Styled code blocks scroll horizontally on mobile to preserve the intended content width. Unstyled blocks (with no language) should also do this.
When linking to an article from a Tweet, Twitter will generate a card to preview the content of the article. Since we're using a SPA and Twitter doesn't execute any JS on the page, we've got to provide any relevant <title>
and <meta>
tags directly in the HTML - hence, we need SSR. This will almost certainly require migrating to a different host than GitHub Pages.
Potential Hosts:
Twitter Card reference: https://developer.twitter.com/en/docs/tweets/optimize-with-cards/overview/summary.html
It would be cool to see what sort of engagement we're getting, as well as monitor site health in case of errors.
Code Health
Visitor Analytics
Currently, article content is bundled into the build artifact, which is fine since there are only a couple of articles. However, as this project continues to grow, it will become impractical to load all articles when the user first visits. We've got to work around the limitation of a static deployment, so the easiest solution is to publish the raw markdown files via static deployment and read them from their respective URL.
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.