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

Commit 9193236

Browse files
authored
Convert to lume! (#158)
1 parent 643e2f7 commit 9193236

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+745
-3656
lines changed

.devcontainer/devcontainer.json

-5
This file was deleted.

.editorconfig

-15
This file was deleted.

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
public/
21
.DS_store
32
.idea/
3+
_site
4+
.netlify

.vscode/extensions.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"ronnidc.nunjucks",
4+
"denoland.vscode-deno",
5+
"esbenp.prettier-vscode"
6+
]
7+
}

Makefile

-7
This file was deleted.

README.md

+29-41
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,47 @@
1-
[![Build Status](https://travis-ci.org/devict/devict.org.svg)][travis]
2-
31
# devict.org
42

5-
This is the source repository for [devict.org](http://devict.org). It is built
6-
using [Hugo][hugo].
3+
This is the source repository for [devict.org](http://devict.org). It is built using [Lume][lume], which is powered by [Deno][deno].
74

85
## Contributing
96

10-
A great way to contribute is to [file an issue][issues] if you notice a bug or
11-
something that could be improved. Note that the [devICT Code of Conduct](https://devict.org/conduct)
12-
applies to collaboration in this space.
13-
14-
### Development
15-
16-
To modify the site itself you should fork this repository then clone the repo
17-
locally. Create a new branch off `master` for your issue such as `fix-link`.
18-
19-
#### With Docker
7+
A great way to contribute is to [file an issue][issues] if you notice a bug or something that could be improved. Note that the [devICT Code of Conduct](https://devict.org/conduct) applies to collaboration in this space.
208

21-
```
22-
$ make serve
23-
```
9+
To modify the site itself you should fork this repo then clone your fork locally. Create a new branch off `main` for your issue such as `fix-link`. When your changes are ready, push up your branch to your fork and submit a PR to this repo for review.
2410

25-
Then open `https://localhost:1313`!
11+
## Local development
2612

27-
To just build the site, use `make build`.
13+
### Set up your IDE
2814

29-
#### Without Docker
15+
- VSCode: install the recommended extensions (cmd+shift+p -> "show recommended extensions")
16+
- Otherwise, [deno has docs on setting up other IDEs][deno-ide-setup]
3017

31-
Download and install Hugo from the [Hugo Getting Started][hugo-release] page.
32-
There are many versions of Hugo to support a wide variety of users. Pick the
33-
installation steps that match your operating system. You do **not** need to have
34-
Go installed to use Hugo.
18+
### Install and run
3519

36-
With hugo installed run `hugo server`. The site will be visible at
37-
http://localhost:1313 with LiveReload enabled so changes will be built
38-
and displayed instantly.
20+
- [Install deno][deno-install]
21+
- `deno task cache` to install dependencies
22+
- `deno task serve` to serve the site
23+
- Visit http://localhost:3000
3924

40-
You may also [create a GitHub Codespace][create-codespace] and run the `Hugo Build` task from the dev environment. Ports will forward automatically, so you can visit http://localhost:1313 as with other methods.
25+
### Make changes
4126

42-
[create-codespace]: https://docs.github.com/en/free-pro-team@latest/github/developing-online-with-codespaces/creating-a-codespace "Creating a Codespace"
27+
- Site config is stored at `_config.ts`, [here is a reference to available options](https://lume.land/docs/advanced/cheatsheet/).
28+
- Page files are stored in the root directory, and are generally `md` files.
29+
- `index.md`, `about.md`, etc.
30+
- Just about any other extension works too (`njk`, or `js` for example).
31+
- [Additional format support](https://lume.land/docs/getting-started/page-formats/) can be added with plugins.
32+
- Global data variables are in `_data.json`.
33+
- These values can be overridden in individual pages with [frontmatter](https://lume.land/docs/getting-started/page-data/).
34+
- Here is more information on [page data](https://lume.land/docs/getting-started/shared-data/).
35+
- Static assets are stored in `static`.
4336

44-
### Deployment
4537

46-
Merges/commits to the `master` branch trigger a build on [Travis CI][travis].
47-
The build parameters are defined in `.travis.yml`. That file defines the build
48-
environment, decrypts an SSH key for deployment (`.travis.key.enc`), installs
49-
Hugo, then runs the script `.travis.sh`.
38+
## Deployment
5039

51-
That script clones, builds, commits, and pushes the website to a separate
52-
repository [devict.github.io][deploy-repo]. That repo is a "GitHub Pages" site
53-
which serves the generated HTML content.
40+
This repo is deployed to [Netlify][netlify]. Commits to the `main` branch are autodeployed there. Our netlify deploy configuration is stored in repo at `netlify.toml`.
5441

55-
[hugo]: https://gohugo.io "Hugo"
56-
[hugo-release]: https://gohugo.io/getting-started/installing/ "Hugo Installation"
42+
[lume]: https://lume.land "Lume"
43+
[deno]: https://deno.land "Deno"
44+
[netlify]: https://netlify.com "Netlify"
5745
[issues]: https://github.com/devict/devict.org/issues "devICT.org issues"
58-
[travis]: https://travis-ci.org/github/devict/devict.org "Travis CI"
59-
[deploy-repo]: https://github.com/devict/devict.github.io "deploy repository"
46+
[deno-ide-setup]: https://docs.deno.com/runtime/manual/getting_started/setup_your_environment#using-an-editoride "Deno IDE setup"
47+
[deno-install]: https://docs.deno.com/runtime/manual/getting_started/installation "Install Deno"

_config.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import lume from "lume/mod.ts";
2+
import attributes from "lume/plugins/attributes.ts";
3+
// import favicon from "lume/plugins/favicon.ts";
4+
5+
const site = lume();
6+
7+
site.ignore("README.md", "static", "netlify.toml");
8+
9+
site.copy("static", ".");
10+
11+
site.use(attributes());
12+
// site.use(favicon());
13+
14+
export default site;

_data.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"site": {
3+
"title": "devICT"
4+
},
5+
"layout": "layouts/single.njk"
6+
}

layouts/index.html _includes/layouts/home.njk

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1+
---
2+
title: Home
3+
---
4+
15
<!DOCTYPE html>
2-
<html lang="{{ .Site.LanguageCode }}">
6+
<html lang="en">
37

48
<head>
5-
{{ partial "head.html" . }}
9+
{% include "partials/head.njk" %}
610
</head>
711

812
<body>
9-
{{ partial "header.html" . }}
13+
{% include "partials/header.njk" %}
1014
<div class="container main">
1115
<div class="content">
1216
<div class="row">
@@ -48,6 +52,6 @@ <h2><span class="fa-stack">
4852
</div>
4953
</div>
5054
</div>
51-
{{ partial "footer.html" . }}
55+
{% include "partials/footer.njk" %}
5256
</body>
5357
</html>

_includes/layouts/single.njk

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Page
3+
---
4+
5+
<!DOCTYPE html>
6+
<html lang="en">
7+
8+
<head>
9+
{% include "partials/head.njk" %}
10+
</head>
11+
12+
<body>
13+
{% include "partials/header.njk" %}
14+
<div class="title-header">
15+
<div class="container">
16+
<h1 class="page-title">{{ title }}</h1>
17+
</div>
18+
</div>
19+
20+
<div class="container main">
21+
22+
<div class="content">
23+
{{ content | safe }}
24+
</div>
25+
26+
</div>
27+
{% include "partials/footer.njk" %}
28+
{% if scripts %}
29+
{% for script in scripts %}
30+
<script src="{{ script }}"></script>
31+
{% endfor %}
32+
{% endif %}
33+
</body>
34+
</html>

layouts/partials/footer.html _includes/partials/footer.njk

+1-9
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,4 @@
3333
<!-- jQuery! -->
3434
<script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script>
3535
<!-- Bootstrap JS! -->
36-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
37-
38-
<!-- Banner -->
39-
{{ if .IsHome }}
40-
<script src="/js/rellax.min.js"></script>
41-
<script>
42-
var rellax = new Rellax('.parallax');
43-
</script>
44-
{{ end }}
36+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>

layouts/partials/head.html _includes/partials/head.njk

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<meta http-equiv="content-type" content="text/html; charset=utf-8">
22
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
33

4-
{{ hugo.Generator }}
5-
64
<!-- Google verfication for gsuite addresses -->
75
<meta name="google-site-verification" content="ElZDG1QQHa37Wl0Qr6GHITali8UFPOenXPz5tLtGJps">
86

@@ -31,4 +29,4 @@
3129

3230
<script src="https://cdn.usefathom.com/script.js" data-site="OSDLGBRF" defer></script>
3331

34-
<title> {{ .Title }} &middot; {{ .Site.Title }} </title>
32+
<title> {{ title }} &middot; {{ site.title }} </title>

layouts/partials/header.html _includes/partials/header.njk

+20-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
<div class="container">
44
<!-- Brand and toggle get grouped for better mobile display -->
55
<div class="navbar-header">
6-
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#nav-collapse" aria-expanded="false">
6+
<button
7+
type="button"
8+
class="navbar-toggle collapsed"
9+
data-toggle="collapse"
10+
data-target="#nav-collapse"
11+
aria-expanded="false"
12+
>
713
<span class="sr-only">Toggle navigation</span>
814
<span class="icon-bar"></span>
915
<span class="icon-bar"></span>
@@ -24,17 +30,19 @@
2430
<li><a href="https://jobs.devict.org">Jobs</a></li>
2531
<li><a href="/support">Support</a></li>
2632
</ul>
27-
</div><!-- /.navbar-collapse -->
28-
</div><!-- /.container-fluid -->
33+
</div>
34+
<!-- /.navbar-collapse -->
35+
</div>
36+
<!-- /.container-fluid -->
2937
</nav>
3038
</div>
31-
{{if .IsHome}}
32-
<div class="banner">
33-
<div class="banner-slide">
34-
<h1 class="banner-title">Wichita's Developer Community</h1>
35-
<a class="banner-link" href="https://slack.devict.org">Join us in Slack!</a>
36-
</div>
37-
<!-- <div class="parallax parallax-image" style="background-image: url('/images/banners/homepage.png');"></div> -->
38-
<div class="parallax parallax-image" style="background: #012029;"></div>
39+
{% if isHome %}
40+
<div class="banner">
41+
<div class="banner-slide">
42+
<h1 class="banner-title">Wichita's Developer Community</h2>
43+
<a class="banner-link" href="https://slack.devict.org">Join us in Slack!</a>
3944
</div>
40-
{{ end }}
45+
<!-- <div class="parallax parallax-image" style="background-image: url('/images/banners/homepage.png');"></div> -->
46+
<div class="parallax parallax-image" style="background: #012029"></div>
47+
</div>
48+
{% endif %}

content/about.md about.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
+++
2-
date = "2016-07-18T14:52:11-05:00"
3-
title = "About devICT"
4-
+++
1+
---
2+
title: About
3+
---
54

65
## A community for Wichita developers
76

archetypes/meetings.md

-49
This file was deleted.

content/conduct.md conduct.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
+++
2-
date = "2016-07-18T14:52:11-05:00"
3-
title = "Code of Conduct"
4-
+++
1+
---
2+
title: Code of Conduct
3+
---
54

65
## &amp; Anti-Harassment Policy
76

config.toml

-8
This file was deleted.

content/jobs.md

-5
This file was deleted.

0 commit comments

Comments
 (0)