Coder Social home page Coder Social logo

vennobennu / c20 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sigmmma/c20

0.0 0.0 0.0 175.95 MB

A living knowledge base for the Halo CE modding community

Home Page: https://c20.reclaimers.net

License: GNU General Public License v3.0

JavaScript 0.41% Python 0.30% TypeScript 3.19% Markdown 33.20% MAXScript 0.84% SCSS 0.55% YAML 61.52%

c20's Introduction

The Reclaimers Library

This repo contains the source content and build scripts for the Reclaimers Library (https://c20.reclaimers.net). It aims to document the immense tribal knowledge of the Halo modding community and covers game engine details, the Halo Editing Kit, community tools, and guides for map-making.

Contributing

The library is not directly editable by its readers. This allows the editing team to verify information before it's added. However, we want and need the community's help filling in gaps. If you want to submit information or join the editing team, see the Contributing page.

Development

The codebase is essentially a static site generator. We use Gulp as the build task runner, with various tasks to process stylesheets, render pages, bundle JS (esbuild), and copy assets. All build results go into a dist folder that is ready to serve.

Content is written in a combination of Markdoc-flavoured markdown and YAML files for structured data, which are rendered to HTML using Preact in TypeScript. Pages are also rendered in plaintext form and bundled into a client-side search index using Minisearch. We use Sass as a CSS preprocessor.

Building and testing

In order to see content as it will appear online, you can run c20 in development mode. As a pre-requisite this project requires installing at least Node.js v14+ and Git LFS.

If you have installed Git LFS after checking out the project already, you'll need to run git lfs install and git lfs pull to download the objects. If you forget to do this the build will fail because ffmpeg will be unable to read video files as videos ("Invalid data found when processing input").

Once those are installed, clone the project and run these shell commands to get the site running locally:

# install dependencies (run once)
npm ci

# start the development server
npm run dev

You can now visit http://localhost:8080/ in a browser and see the website. Edit content source files, then refresh your browser to see changes. You can run the server on a different port with C20_PORT=9001 npm run dev.

The development server renders pages on-demand, but you can also run npm run static to fully render all pages to HTML and serve them. A full static build takes longer and isn't recommended for quick content writing. You can use it as a final step to verify the build will work once changes are merged. Note: FFmpeg is an optional dependency used to generate video thumbnails during a full build. It needs to be available on your system PATH. Windows users can simply download ffmpeg.exe and place it in the project root. If you don't want to set up FFmpeg just run C20_NO_THUMBNAILS=true npm run static and thumbnails won't be used.

Releasing

The website is currently hosted as a static site in AWS S3, fronted by a CloudFront CDN distribution, managed in reclaimers-aws. To deploy a new version, simple make changes to the master branch and a build/deploy will be triggered automatically with CodeBuild.

As a backup, users with bucket permission can simply sync the dist directory to S3:

aws s3 sync --delete ./dist s3://reclaimers-wiki-files/

Because of cache TTLs, content may not appear updated immediately. An invalidation can be run in CloudFront to force updates but it will not affect clients unless they clear their browser cache. Live content can be seen by directly viewing the S3 hosting origin.

Technical goals

An explicit choice was made to avoid typical managed or self-hosted Wiki platforms for this library and instead build a static site generator with custom features for Halo. The main tenets are:

  • No API or dynamic content: the site should be easy to host and test locally with any HTTP server capable of serving files, and is easily cached on a CDN. No compute needed means low hosting costs. Even the search index is client-side.
  • Respect the time of the editors. Wiki features should empower them to write faster and easier. Nobody will write if it's a chore.
  • Semantic HTML: Page structures are document-like and use the right elements for the job to maintain accessibility.
  • Mobile-friendly: Pages should be responsive and readable on mobile.
  • The website should make minimum use of client side JavaScript unless there are interactive features needed.

Non-goals are user accounts, live editing, and on-site discussion pages. We use the pull request model and Discord discussions to ensure new information is vetted.

License

C20's codebase is licensed under version 3.0 of the GNU General Public License. A copy of its text can be found in COPYING.

The content of its pages, including articles, guides, images, tag descriptions, and other rendered metadata are available under the under the CC BY-SA 3.0 license.

c20's People

Contributors

csauve avatar num0005 avatar general-101 avatar krevil avatar mimickal avatar shellyherself avatar vennobennu avatar iloveagoodcrisp avatar samdamding avatar thechunkierbean avatar connordawn avatar pepper-man avatar kaymokay avatar bintoss avatar hellux avatar dependabot[bot] avatar 0alastair1 avatar andygmb avatar faberthecatgirl avatar kylejwatson avatar matty45 avatar s3anyboy avatar xscruffydasasquatchx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.