Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.

Commit bd87933

Browse files
author
Colin McDonnell
committed
Converting to base.css. Stylistic improvements.
1 parent 729504c commit bd87933

File tree

10 files changed

+114
-98
lines changed

10 files changed

+114
-98
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<p align="center">
2-
<h1 align="center">Devii</h1>
3-
</p>
1+
<p align="center"><h1 align="center" style="text-align:center;">Devii</h1></p>
42
<p align="center">
53
A developer blog starter for 2020. <br/>Next.js<br/>React<br/>TypeScript<br/>Markdown<br/>syntax highlighting<br/>SEO<br/>RSS generation
64
</p>
@@ -17,7 +15,7 @@ if you're happy and you know it, star this repo
1715
<br/>
1816
<br/>
1917

20-
A dev blog starter for 2020.
18+
### A dev blog starter for 2020.
2119

2220
- Works as a Markdown-based static-site generator out of the box: just add new blog posts to `/md/blog`
2321
- Supports exporting to fully static assets (powered by Next.js)

components/Author.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,22 @@ export const AuthorLines: React.FC<{ post: PostData }> = (props) => {
2727
return (
2828
<div>
2929
<p className="author-line">
30-
{props.post.author
31-
? props.post.author
32-
: ''}
30+
{props.post.author && <span>{props.post.author}</span>}
31+
32+
{props.post.authorTwitter && (
33+
<span>
34+
{' '}
35+
<a
36+
href={`https://twitter.com/${props.post.authorTwitter}`}
37+
>{`@${props.post.authorTwitter}`}</a>{' '}
38+
</span>
39+
)}
3340
</p>
3441
<p className="author-line subtle">
3542
{props.post.datePublished
3643
? format(new Date(props.post.datePublished), 'MMMM Do, YYYY')
3744
: ''}
3845
</p>
39-
<p className="author-line">
40-
{props.post.authorTwitter && (
41-
<a href={`https://twitter.com/${props.post.authorTwitter}`}>{`@${props.post.authorTwitter}`}</a>
42-
)}
43-
</p>
4446
</div>
4547
);
4648
};

components/BlogPost.tsx

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,20 @@ export const BlogPost: React.FunctionComponent<{ post: PostData }> = ({
1111
return (
1212
<div className="blog-post">
1313
<PostMeta post={post} />
14-
{post.bannerPhoto && (
15-
<img className="blog-post-image" src={post.bannerPhoto} />
16-
)}
14+
{post.bannerPhoto && (
15+
<img className="blog-post-image" src={post.bannerPhoto} />
16+
)}
1717

18-
<div className="blog-post-title">
19-
{title && (
20-
<h1>{title}</h1>
21-
)}
22-
{subtitle && (
23-
<h2>{subtitle}</h2>
24-
)}
25-
<hr />
26-
<Author post={post} />
27-
</div>
18+
<div className="blog-post-title">
19+
{title && <h1>{title}</h1>}
20+
{subtitle && <h2>{subtitle}</h2>}
21+
<br />
22+
<Author post={post} />
23+
</div>
2824

29-
<div className="blog-post-content">
30-
<Markdown source={post.content} />
31-
</div>
25+
<div className="blog-post-content">
26+
<Markdown source={post.content} />
27+
</div>
3228
</div>
3329
);
3430
};

components/PostCard.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ export const PostCard: React.FC<{ post: PostData }> = (props) => {
1111
{post.thumbnailPhoto && (
1212
<div
1313
className="post-card-thumbnail"
14-
style={{ "background-image": `url(${post.thumbnailPhoto})`}}
14+
style={{ backgroundImage: `url(${post.thumbnailPhoto})` }}
1515
/>
1616
)}
1717
<div className="post-card-title">
18-
{post.title && (
19-
<h2>{post.title}</h2>
20-
)}
21-
{false && post.subtitle && (
22-
<p>{post.subtitle}</p>
23-
)}
18+
{post.title && <h2>{post.title}</h2>}
19+
{false && post.subtitle && <p>{post.subtitle}</p>}
2420
<p>
2521
{props.post.datePublished
2622
? format(new Date(props.post.datePublished), 'MMMM Do, YYYY')

md/blog/the-ultimate-tech-stack.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ published: true
44
datePublished: 1590463136775
55
author: Colin McDonnell
66
authorTwitter: vriad
7-
authorPhoto: /profile.jpg
7+
authorPhoto: /img/profile.jpg
88
tags:
99
- Static Site Generators
1010
- React
1111
- Next.js
12-
thumbnailPhoto: /pancakes_thumb.jpeg
13-
bannerPhoto: /pancakes.jpeg
12+
thumbnailPhoto: /img/pancakes_thumb.jpeg
13+
bannerPhoto: /img/pancakes.jpeg
1414
canonicalUrl: https://vriad.com/essays/devii
1515
---
1616

md/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
This site is entirely built with Devii! In fact, the
2-
[GitHub repo for Devii](https://github.com/vriad/devii) contains the
3-
code for the site you're looking at now.
1+
Devii is a starter kit for building your personal developer website. Powered by the best technologies 2020 has to offer.
2+
3+
It's not a a framework or a library, it's a just a simple project that contains some useful utilities and patterns that'll help you hit the ground running. In fact, the [GitHub repo for Devii](https://github.com/vriad/devii) contains the code for the site you're currently reading!
44

55
Devii doesn't try to be a fully functional blog out of the box. After cloning/forking the repo, you'll need to delete the contents of `index.tsx` (the page you're reading now!) and implement your own homepage. Devii makes it easier — for instance, you can access a list of all your blog posts in `props.posts` — but you still have to build the site you're imagining in your mind's eye.
66

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"dev": "next dev",
3131
"build": "next build",
3232
"start": "next start",
33-
"export": "next export"
33+
"export": "next export",
34+
"deploy": "next build && next export && firebase deploy --only hosting"
3435
},
3536
"dependencies": {
3637
"fecha": "^4.2.0",
@@ -55,4 +56,4 @@
5556
"favicons": "^6.1.0",
5657
"typescript": "^3.8.3"
5758
}
58-
}
59+
}

pages/index.tsx

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const Home = (props: {
3939
implemented in the
4040
<code>/components/PostCard.tsx</code> component.
4141
</p>
42-
<div className="postcard-container">
42+
<div className="post-card-container">
4343
{props.posts.map((post, j) => {
4444
return <PostCard post={post} key={j} />;
4545
})}
@@ -49,32 +49,43 @@ const Home = (props: {
4949
<div className="section">
5050
<h2>Testimonials</h2>
5151
<blockquote>
52-
<p><em>Seems like it might be useful!</em></p>
53-
<p>— Dan Abramov, taken <a href="https://github.com/vriad/devii/issues/2" target="_blank"> utterly out of context</a></p>
52+
<p>
53+
<em>Seems like it might be useful!</em>
54+
</p>
55+
<p>
56+
— Dan Abramov, taken{' '}
57+
<a href="https://github.com/vriad/devii/issues/2" target="_blank">
58+
{' '}
59+
utterly out of context
60+
</a>
61+
</p>
5462
</blockquote>
5563
</div>
5664

57-
<div className="section">
65+
{/* <div className="section">
5866
<h2>README.md</h2>
5967
<p>
6068
Below is the README.md for devii. It was imported and rendered using
6169
Next.js dynamic imports. The rest of this page (including this
6270
paragraph) are rendered with React. You can also read the README on
63-
GitHub at <a href="https://github.com/vriad/devii">https://github.com/vriad/devii</a>.
71+
GitHub at{' '}
72+
<a href="https://github.com/vriad/devii">
73+
https://github.com/vriad/devii
74+
</a>
75+
.
6476
</p>
65-
</div>
77+
</div> */}
6678

67-
<div className="section alternate">
79+
{/* <div className="section alternate">
6880
<div className="narrow">
6981
<Markdown source={props.readme} />
7082
</div>
71-
</div>
83+
</div> */}
7284

73-
<div className="section">
74-
<h2 class="centered">Get started</h2>
85+
<div className="section alternate">
86+
<h2 className="centered">Get started</h2>
7587
<button className="fork-button">Fork Devii on GitHub</button>
7688
</div>
77-
7889
</div>
7990
);
8091
};

public/rss.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
<<<<<<< HEAD
2-
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[My Awesome Blog]]></title><description><![CDATA[I write about code 'n stuff]]></description><link>https://alyssaphacker.com</link><image><url>https://alyssaphacker.com/icon.png</url><title>My Awesome Blog</title><link>https://alyssaphacker.com</link></image><generator>RSS for Node</generator><lastBuildDate>Thu, 29 Oct 2020 08:21:21 GMT</lastBuildDate><atom:link href="https://alyssaphacker.com/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Mar 2020 04:00:00 GMT</pubDate><copyright><![CDATA[2020 Alyssa P. Hacker]]></copyright><language><![CDATA[en]]></language><managingEditor><![CDATA[alyssa@example.com]]></managingEditor><webMaster><![CDATA[alyssa@example.com]]></webMaster><ttl>60</ttl><item><title><![CDATA[Dan Abramov knows about Devii]]></title><description><![CDATA[<p>Dan Abramov knows about Devii!</p>
3-
=======
4-
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[My Awesome Blog]]></title><description><![CDATA[I write about code 'n stuff]]></description><link>https://alyssaphacker.com</link><image><url>https://alyssaphacker.com/icon.png</url><title>My Awesome Blog</title><link>https://alyssaphacker.com</link></image><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2020 03:08:58 GMT</lastBuildDate><atom:link href="https://alyssaphacker.com/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Mar 2020 04:00:00 GMT</pubDate><copyright><![CDATA[2020 Alyssa P. Hacker]]></copyright><language><![CDATA[en]]></language><managingEditor><![CDATA[alyssa@example.com]]></managingEditor><webMaster><![CDATA[alyssa@example.com]]></webMaster><ttl>60</ttl><item><title><![CDATA[Dan Abramov knows about Devii]]></title><description><![CDATA[<p>Dan Abramov knows about Devii!</p>
5-
>>>>>>> master
1+
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[My Awesome Blog]]></title><description><![CDATA[I write about code 'n stuff]]></description><link>https://alyssaphacker.com</link><image><url>https://alyssaphacker.com/icon.png</url><title>My Awesome Blog</title><link>https://alyssaphacker.com</link></image><generator>RSS for Node</generator><lastBuildDate>Sat, 31 Oct 2020 19:19:33 GMT</lastBuildDate><atom:link href="https://alyssaphacker.com/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Mar 2020 04:00:00 GMT</pubDate><copyright><![CDATA[2020 Alyssa P. Hacker]]></copyright><language><![CDATA[en]]></language><managingEditor><![CDATA[alyssa@example.com]]></managingEditor><webMaster><![CDATA[alyssa@example.com]]></webMaster><ttl>60</ttl><item><title><![CDATA[Dan Abramov knows about Devii]]></title><description><![CDATA[<p>Dan Abramov knows about Devii!</p>
62
<blockquote>
73
<p>Seems like it might be useful!
84
— Dan Abramov, taken entirely out of context</p>

0 commit comments

Comments
 (0)