Skip to content

Commit

Permalink
feat: initial configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
greatislander committed Apr 11, 2024
1 parent e01a7d8 commit b7f9c9b
Show file tree
Hide file tree
Showing 72 changed files with 8,138 additions and 19,179 deletions.
6 changes: 3 additions & 3 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Copyright Holders

Copyright 2020
Copyright 2024

This is the list of Trivet copyright holders. It does not list all individual contributors because some have assigned
This is the list of ACAW / CAMA copyright holders. It does not list all individual contributors because some have assigned
copyright to an institution, only made minor changes, or their contributions no longer appear in the codebase.
Please see the version control system's revision history for details on contributions.

Expand All @@ -13,7 +13,7 @@ Please see the version control system's revision history for details on contribu
## Contributors

Individual contributions can be viewed on the
[Contributors](https://github.com/fluid-project/trivet/graphs/contributors) page, or through the version control
[Contributors](https://github.com/inclusive-design/acaw-cama/graphs/contributors) page, or through the version control
system's revision history.

**Note**: Individual authors may not hold copyright. See above "Copyright Holders" section for more information.
59 changes: 0 additions & 59 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# BSD 3-Clause License

Copyright (c) 2020, OCAD University.
Copyright (c) 2024, OCAD University.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
# Trivet
# ACAW / CAMA

_A simple starter kit for Eleventy-based static sites for the Fluid Project._

[![Netlify Status](https://api.netlify.com/api/v1/badges/8286bcec-a92b-47ca-a4cf-128a276b57eb/deploy-status)](https://app.netlify.com/sites/trivet/deploys)

This repository contains the files needed to build [Eleventy](http://11ty.dev/)-based static sites for the [Fluid Project](https://fluidproject.org).
It includes support for internationalization; if your project does not require internationalization, use [Trivet Monolingual](https://github.com/fluid-project/trivet-monolingual)
It includes support for internationalization; if your project does not require internationalization, use [Trivet Monolingual](https://github.com/inclusive-design/acaw-cama-monolingual)
instead.

## Installation

You can use this repository as a template for a new site hosted on [Netlify](https://netlify.com) with [Decap CMS](https://decapcms.org)
pre-configured:

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/fluid-project/trivet&stack=cms)
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/inclusive-design/acaw-cama&stack=cms)

You can also use GitHub's template repository feature to create your own project based on Trivet Monolingual. From the
[repository homepage](https://github.com/fluid-project/trivet),
[repository homepage](https://github.com/inclusive-design/acaw-cama),
click the "Use this template" button and then choose "Create a new repository".

You can also set up a new project locally using [degit](https://www.npmjs.com/package/degit):

```bash
npx degit fluid-project/trivet YOUR-PROJECT-NAME
npx degit inclusive-design/acaw-cama YOUR-PROJECT-NAME
```

## Usage
Expand Down Expand Up @@ -182,7 +182,7 @@ For more information about how Decap CMS works with internationalized content, s
## Disabling Internationalization

If you do not need internationalization support for all content on your site, it can be disabled for a specific
collection or collections. If you don't need internationalization support at all, you should use [Trivet Monolingual](https://github.com/fluid-project/trivet-monolingual)
collection or collections. If you don't need internationalization support at all, you should use [Trivet Monolingual](https://github.com/inclusive-design/acaw-cama-monolingual)
as the basis of your project instead.

### Disabling Internationalization for a Specific Collection
Expand Down Expand Up @@ -323,7 +323,7 @@ internationalization for a specific collection, you can do so in one of two ways

## License

Trivet is available under the [New BSD License](https://raw.githubusercontent.com/fluid-project/trivet/master/LICENSE.md).
Trivet is available under the [New BSD License](https://raw.githubusercontent.com/inclusive-design/acaw-cama/master/LICENSE.md).

## Third Party Software in Trivet

Expand Down
57 changes: 6 additions & 51 deletions eleventy.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,22 @@
Copyright the Trivet copyright holders.
See the AUTHORS.md file at the top-level directory of this distribution and at
https://github.com/fluid-project/trivet/raw/main/AUTHORS.md.
https://github.com/inclusive-design/acaw-cama/raw/main/AUTHORS.md.
Licensed under the New BSD license. You may not use this file except in compliance with this License.
You may obtain a copy of the New BSD License at
https://github.com/fluid-project/trivet/raw/main/LICENSE.md.
https://github.com/inclusive-design/acaw-cama/raw/main/LICENSE.md.
*/

"use strict";

const fluidPlugin = require("eleventy-plugin-fluid");
const navigationPlugin = require("@11ty/eleventy-navigation");
const rssPlugin = require("@11ty/eleventy-plugin-rss");
const syntaxHighlightPlugin = require("@11ty/eleventy-plugin-syntaxhighlight");
const { EleventyI18nPlugin } = require("@11ty/eleventy");

// Import transforms
const parseTransform = require("./src/_transforms/parse-transform.js");

// Import data files
const siteConfig = require("./src/_data/config.json");

module.exports = function (eleventyConfig) {
eleventyConfig.setUseGitIgnore(false);

Expand All @@ -33,52 +28,12 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy({"src/admin/config.yml": "admin/config.yml"});
eleventyConfig.addPassthroughCopy({"src/assets/icons": "/"});
eleventyConfig.addPassthroughCopy({"src/assets/images": "assets/images"});
eleventyConfig.addPassthroughCopy({
"node_modules/decap-cms/dist/decap-cms.js": "lib/cms/decap-cms.js",
"node_modules/decap-cms/dist/decap-cms.js.map": "lib/cms/decap-cms.js.map",
"node_modules/nunjucks/browser/nunjucks-slim.min.js": "lib/cms/nunjucks-slim.min.js",
"node_modules/prop-types/prop-types.min.js": "lib/cms/prop-types.min.js",
"node_modules/react/umd/react.development.js": "lib/cms/react.development.js",
"node_modules/react/umd/react.production.min.js": "lib/cms/react.production.min.js"
});

const now = new Date();

// Custom collections
const livePosts = post => post.date <= now && !post.data.draft;
siteConfig.locales.forEach(locale => {
eleventyConfig.addCollection(`posts_${locale}`, collection => {
return collection.getFilteredByGlob(`./src/collections/posts/${locale}/*.md`).filter(livePosts);
});

// The following collection is used to create a collection of posts for the RSS feed.
eleventyConfig.addCollection(`postFeed_${locale}`, collection => {
return collection.getFilteredByGlob(`./src/collections/posts/${locale}/*.md`).filter(livePosts)
.reverse()
.slice(0, siteConfig.maxPostsInFeed);
});
});

// Plugins
eleventyConfig.addPlugin(fluidPlugin, {
defaultLanguage: "en-CA",
localesDirectory: "src/_locales",
supportedLanguages: {
"en-CA": {
slug: "en",
name: "English"
},
"fr-CA": {
slug: "fr",
name: "Français",
dir: "ltr",
uioSlug: "fr"
}
}
});
eleventyConfig.addPlugin(navigationPlugin);
eleventyConfig.addPlugin(rssPlugin);
eleventyConfig.addPlugin(syntaxHighlightPlugin);
eleventyConfig.addPlugin(EleventyI18nPlugin, {
defaultLanguage: "en"
});

return {
dir: {
Expand Down
33 changes: 0 additions & 33 deletions netlify.toml

This file was deleted.

Loading

0 comments on commit b7f9c9b

Please sign in to comment.