Skip to content

Commit 4595f65

Browse files
authored
Merge pull request #15 from uswds/dw-11ty-and-uswds-3
Use 11ty and USWDS 3
2 parents 5274e5b + 78e838b commit 4595f65

27 files changed

Lines changed: 4315 additions & 318 deletions

.eleventy.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
module.exports = function (eleventyConfig) {
2+
eleventyConfig.addPassthroughCopy("assets");
3+
let pathPrefix = "/";
4+
5+
if (process.env.BASEURL) {
6+
pathPrefix = process.env.BASEURL;
7+
}
8+
9+
return {
10+
pathPrefix: pathPrefix,
11+
templateFormats: ["md", "njk", "html", "liquid"],
12+
markdownTemplateEngine: "liquid",
13+
htmlTemplateEngine: "liquid",
14+
dir: {
15+
layouts: "_layouts",
16+
data: "_data",
17+
},
18+
};
19+
};

.eleventyignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
README.md
2+
LICENSE.md
3+
_drafts/

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
_site
22
.sass-cache
3-
.jekyll-metadata
43
assets/uswds
54
node_modules
65
.gz
76
.DS_Store
8-
.jekyll-cache

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16
1+
18

.ruby-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gemfile

Lines changed: 0 additions & 4 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 69 deletions
This file was deleted.

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,39 @@
11
# USWDS Tutorial
2+
23
A tutorial project to learn about installing, compiling, and customizing with USWDS.
34

45
## Requirements
5-
- Node v16
6-
- Ruby v3.0.2
6+
7+
- Node v18
78
- Git
89
- Access to a terminal application
910
- A text editor
1011
- A modern web browser
1112

1213
## Installation
14+
1315
1. Clone the tutorial repo, either in the terminal or with GitHub's `Use this template` button near the top of the page. **We recommend using the terminal and the command line.** If you choose to clone using the terminal, open a terminal window, navigate to the directory where you'd like to put the `uswds-tutorial` directory and run:
14-
```
16+
17+
```bash
1518
git clone https://github.com/uswds/uswds-tutorial.git
1619
```
1720

1821
This will create a `uswds-tutorial` directory with the tutorial files inside. Navigate to this new directory:
1922

20-
```
23+
```bash
2124
cd uswds-tutorial
2225
```
2326

2427
1. Install the project dependencies:
2528

26-
```
29+
```bash
2730
npm install
2831
```
2932

3033
1. Start the tutorial server:
3134

32-
```
35+
```bash
3336
npm start
3437
```
3538

36-
1. Once the server is running, head to [http://localhost:4000/](http://localhost:4000/) and follow the directions on the page!
37-
38-
39+
1. Once the server is running, head to [http://localhost:8080/](http://localhost:8080/) and follow the directions on the page!

_config.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

_includes/head.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<meta charset="utf-8">
33
<meta http-equiv="X-UA-Compatible" content="IE=edge">
44
<meta name="viewport" content="width=device-width, initial-scale=1">
5-
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 | escape }}">
5+
<meta name="description" content="{{ page.excerpt | default: site.description | strip_html | strip | truncate: 160 | escape }}">
66
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
77
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
8-
<link rel="stylesheet" href="{{ '/assets/css/open-props.css' | relative_url }}">
9-
<link rel="stylesheet" href="{{ '/assets/css/styles.css' | relative_url }}">
8+
<link rel="stylesheet" href="{{ '/assets/css/open-props.css'| url }}">
9+
<link rel="stylesheet" href="{{ '/assets/css/styles.css'| url }}">
1010
</head>

0 commit comments

Comments
 (0)