Migrating from hand-written HTML to Jekyll to use shared layout code.

master
James T. Martin 2020-02-06 15:34:02 -08:00
parent d519ba9a7c
commit 84d29ceb8d
16 changed files with 438 additions and 410 deletions

8
.editorconfig Normal file
View File

@ -0,0 +1,8 @@
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

7
.gitignore vendored
View File

@ -1 +1,8 @@
# Jekyll files
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata
# Emacs backup files
*~

4
Gemfile Normal file
View File

@ -0,0 +1,4 @@
source "https://rubygems.org"
gem "jekyll-last-modified-at"
gem "jekyll-sitemap"

72
Gemfile.lock Normal file
View File

@ -0,0 +1,72 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
ffi (1.12.2)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
jekyll (4.0.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (>= 0.9.5, < 2)
jekyll-sass-converter (~> 2.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 3.0)
safe_yaml (~> 1.0)
terminal-table (~> 1.8)
jekyll-last-modified-at (1.2.1)
jekyll (>= 3.7, < 5.0)
posix-spawn (~> 0.3.9)
jekyll-sass-converter (2.1.0)
sassc (> 2.0.1, < 3.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.1.0)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
posix-spawn (0.3.13)
public_suffix (4.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.15.0)
safe_yaml (1.0.5)
sassc (2.2.1)
ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.6.1)
PLATFORMS
ruby
DEPENDENCIES
jekyll-last-modified-at
jekyll-sitemap
BUNDLED WITH
2.1.4

View File

@ -1,6 +1,20 @@
# jamestmartin.me
This is the source code for my personal website, [https://jamestmartin.me](jamestmartin.me).
## Installation
This project is built using [https://jekyllrb.com/](Jekyll), a static site generator.
To install this website, you must first [https://jekyllrb.com/docs/installation/](install Jekyll).
Next, install all necessary modules with `bundle exec`.
To build the site, run `bundle exec jekyll build`.
To rebuild the site continuously as updates are made,
run `bundle exec jekyll build --watch`.
The web root for the website will be `_site/`.
You may point your web server there and the site will work with no additional effort.
To work on the site without installing full web server, use `bundle exec jekyll serve`.
## Code Conventions
All of my code is valid HTML5 and CSS3 according to ["https://html.spec.whatwg.org"](WHATWG standards)

4
_config.yml Normal file
View File

@ -0,0 +1,4 @@
url: "https://jamestmartin.me"
plugins:
- jekyll-last-modified-at
- jekyll-sitemap

24
_layouts/default.html Normal file
View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>{{ page.title }}</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<link rel="canonical" href="{{ site.url }}{{ page.permalink }}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<header>
<span class="site-title">
<a href="/">James T. Martin</a>
</span>
<nav>
<ul>
<li><a href="/projects/">Projects</a>
<li><a href="/resume/">Resume</a>
<li><a href="/contact">Contact</a>
</ul>
</nav>
</header>
<main>{{ content }}</main>

54
_layouts/resume.html Normal file
View File

@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>James T. Martin, {{ page.title }}</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="stylesheet" href="/assets/resume.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<link rel="canonical" href="{{ site.url }}{{ page.permalink }}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<main>
<article class="resume">
<header>
<h1>James T. Martin, {{ page.resumeName }}</h1>
<span class="tagline">{{ page.tagline }}</span>
</header>
<!-- TODO: Figure out a more semantic way to deal with the container/content divs. -->
<div class="container">
<aside>
<section id="personal-info">
<header>
<h2>Personal Info</h2>
</header>
<dl>
<div>
<dt>Email
<dd>@jtmar.me, james
</div>
<div>
<dt>Phone
<dd><a href="tel:+1-206-331-1994">(206) 331-1994</a>
</div>
<div>
<dt>Location
<dd>Renton, WA
</div>
<div>
<dt>GitHub
<dd><a href="https://github.com/jamestmartin">jamestmartin</a>
</div>
<div>
<dt>LinkedIn
<dd><a href="https://www.linkedin.com/in/jamestmartinme/">jamestmartinme</a>
</div>
</dl>
</section>
</aside>
<div class="content">{{ content }}</div>
</div>
</article>
</main>

View File

@ -1,27 +1,9 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>Contact Me - James T. Martin</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<header>
<span class="site-title">
<a href="/">James T. Martin</a>
</span>
<nav>
<ul>
<li><a href="/projects/">Projects</a>
<li><a href="/resume/">Resume</a>
<li><a href="/contact">Contact</a>
</ul>
</nav>
</header>
<main>
<article id="contact">
---
layout: default
title: Contact Me
permalink: /contact
---
<article id="contact">
<header>
<h2>Contact Me</h2>
</header>
@ -47,5 +29,4 @@
<dd>Renton, WA
</div>
</dl>
</article>
</main>
</article>

View File

@ -1,25 +1,6 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>James T. Martin</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<header>
<span class="site-title">
<a href="/">James T. Martin</a>
</span>
<nav>
<ul>
<li><a href="/projects/">Projects</a>
<li><a href="/resume/">Resume</a>
<li><a href="/contact">Contact</a>
</ul>
</nav>
</header>
<main>
TODO: About me.
</main>
---
layout: default
title: James T. Martin
permalink: /
---
TODO: About me.

View File

@ -1,27 +1,9 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>Projects - James T. Martin</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<header>
<span class="site-title">
<a href="/">James T. Martin</a>
</span>
<nav>
<ul>
<li><a href="/projects/">Projects</a>
<li><a href="/resume/">Resume</a>
<li><a href="/contact">Contact</a>
</ul>
</nav>
</header>
<main>
<article id="projects">
---
layout: default
title: Projects
permalink: /projects/
---
<article id="projects">
<header>
<h2>Projects</h2>
</header>
@ -68,5 +50,4 @@
<li><a href="https://scratch.mit.edu/users/zeusoflightning/">Scratch projects</a> from elementary school, because why not? Man, I've come a <em>long</em> way as a programmer since then.
</ul>
</section>
</article>
</main>
</article>

View File

@ -1,26 +1,9 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>Minecraft Clone - Projects - James T. Martin</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<header>
<span class="site-title">
<a href="/">James T. Martin</a>
</span>
<nav>
<ul>
<li><a href="/projects/">Projects</a>
<li><a href="/resume/">Resume</a>
<li><a href="/contact">Contact</a>
</ul>
</nav>
</header>
<main>
<article id="minecraft-clone">
---
layout: default
title: Minecraft Clone
permalink: /projects/minecraft-clone
---
<article id="minecraft-clone">
<header>
<h2>Minecraft Clone</h2>
</header>
@ -43,5 +26,4 @@
This was one of my favorite projects. I was very proud of it as a middle schooler.
Disappointingly, I lost the code when I deleted my old email address,
which made me lose access to my private BitBucket repositories.
</article>
</main>
</article>

View File

@ -1,27 +1,9 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>The Mining Dead - Projects - James T. Martin</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<header>
<span class="site-title">
<a href="/">James T. Martin</a>
</span>
<nav>
<ul>
<li><a href="/projects/">Projects</a>
<li><a href="/resume/">Resume</a>
<li><a href="/contact">Contact</a>
</ul>
</nav>
</header>
<main>
<article id="the-mining-dead">
---
layout: default
title: The Mining Dead
permalink: /projects/the-mining-dead
---
<article id="the-mining-dead">
<header>
<h2>The Mining Dead</h2>
<p>This page is a work in progress.
@ -70,5 +52,4 @@
Skuli's second attempt and the ice worlds, the various attempts to succeed me,
Skuli's later servers, other servers I made, and Obamallama's servers.
</ul>
</article>
</main>
</article>

View File

@ -1,27 +1,9 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>Resume - James T. Martin's</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<header>
<span class="site-title">
<a href="/">James T. Martin</a>
</span>
<nav>
<ul>
<li><a href="/projects/">Projects</a>
<li><a href="/resume/">Resume</a>
<li><a href="/contact">Contact</a>
</ul>
</nav>
</header>
<main>
<article>
---
layout: default
title: Resumes
permalink: /resume/
---
<article>
<header>
<h2>Resumes</h2>
<p>I have different resumes for different jobs.
@ -32,5 +14,4 @@
<li>TODO: <a href="compiler-developer">Compiler Developer</a>
<li>TODO: <a href="general-laborer">General Laborer</a>
</ul>
</article>
</main>
</article>

View File

@ -1,54 +1,10 @@
<!DOCTYPE html>
<html lang="en-US">
<meta charset="utf-8">
<title>James T. Martin, Software Developer</title>
<link rel="stylesheet" href="/assets/style.css">
<link rel="stylesheet" href="/assets/resume.css">
<link rel="icon" type="image/png" href="/assets/favicon.png">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<main>
<article class="resume">
<header>
<h1>James T. Martin</h1>
<span class="tagline">A self-taught programmer fond of programming language theory.</span>
</header>
<!-- TODO: Figure out a more semantic way to deal with the container/content divs. -->
<div class="container">
<aside>
<section id="personal-info">
<header>
<h2>Personal Info</h2>
</header>
<dl>
<div>
<dt>Email
<dd>@jtmar.me, james
</div>
<div>
<dt>Phone
<dd><a href="tel:+1-206-331-1994">(206) 331-1994</a>
</div>
<div>
<dt>Location
<dd>Renton, WA
</div>
<div>
<dt>GitHub
<dd><a href="https://github.com/jamestmartin">jamestmartin</a>
</div>
<div>
<dt>LinkedIn
<dd><a href="https://www.linkedin.com/in/jamestmartinme/">jamestmartinme</a>
</div>
</dl>
</section>
</aside>
<div class="content">
<section id="experience">
---
layout: resume
title: Software Developer
permalink: /resume/software-developer
tagline: A self-taught programmer fond of programming language theory.
---
<section id="experience">
<header>
<h2>Experience</h2>
</header>
@ -77,9 +33,9 @@
<li>Collaborated to build robot controller programs for FTC competitions
</ul>
</section>
</section>
</section>
<section id="skills">
<section id="skills">
<header>
<h2>Skills</h2>
</header>
@ -94,9 +50,9 @@
<li>Web: <abbr title="Cross-Site Scripting">XSS</abbr> prevention, <abbr title="Cross-Site Request Forgery">CSRF</abbr> prevention, <abbr title="Content Security Policy">CSP</abbr>, input validation, SQL injection prevention
</ul>
</ul>
</section>
</section>
<section id="education">
<section id="education">
<header>
<h2>Education</h2>
</header>
@ -113,8 +69,4 @@
<li>Member of marching, symphonic, and jazz bands; recieved John Philip Sousa award in 2019.
</ul>
</section>
</section>
</div>
</div>
</article>
</main>
</section>

View File

@ -1,2 +1,4 @@
User-agent: *
Disallow:
Host: jamestmartin.me
Sitemap: https://jamestmartin.me/sitemap.xml