creativecommons / creativecommons.github.io-source

Source files for CC Open Source website
https://opensource.creativecommons.org/
MIT License
77 stars 161 forks source link
creative-commons hacktoberfest hacktoberfest2020 lektor open-source

creativecommons.github.io-source

Source for creativecommons.github.io

Overview

:warning: DO NOT MAKE CHANGES TO THE creativecommons/creativecommons.github.io REPO DIRECTLY.

This site is built using Lektor. All changes to opensource.creativecommons.org (creativecommons.github.io) must be made here and deployed via lektor (see Deployment, below).

Code of conduct

CODE_OF_CONDUCT.md:

The Creative Commons team is committed to fostering a welcoming community. This project and all other Creative Commons open source projects are governed by our Code of Conduct. Please report unacceptable behavior to conduct@creativecommons.org per our reporting guidelines.

Contributing

See CONTRIBUTING.md.

Installation

Prerequisites

Make sure you have:

To install these, execute the following commands:

Installing Project Requirements

  1. Clone this repository.
  2. Open your command line interface change directories to the repository root directory.
  3. Create a Python virtual environment and install the requirements for this project:
    pipenv install --dev

pipenv Troubleshooting

pipenv doesn't always provide the best error messages (Provide better error message if the project’s virtual environment is broken). If all else fails, try removing the virtual environment and reinstalling:

  1. Remove virtual environment:
    pipenv --rm
  2. Install virtual environment (including dev packages):
    pipenv install --dev

Development

Troubleshooting Possible Errors

Deployment

We have continuous deployment set up. To deploy, push your code to the main branch (or make a pull request against the main branch. GitHub Actions builds and deploys the site whenever it detects new commits on the main branch.

The GitHub Actions configuration is located at .github/workflows/lektor-build-deploy.yml.

Manual Deployment

:warning: For reference only, you should not need to not do this.

When you are ready to deploy a new version of the site, run lektor deploy (assuming you have your GitHub SSH key already set up and you have access to the creativecommons/creativecommons.github.io repository). That's it, it's live on production!

Project Structure

Here's how the code is structured in the top level of the repository:

Lektor Plugins

Redirects

External Data

The following load external data:

License

Code

Content

CC BY 4.0 license button

All the content within this repository is licensed under a Creative Commons Attribution 4.0 International License unless otherwise specified.

Font Awesome

This repository contains PNG icons that were converted from Font Awesome SVGs:

Font Awesome Free is free, open source, and GPL friendly. You can use it for commercial projects, open source projects, or really almost whatever you want. (Full Font Awesome Free license: https://fontawesome.com/license/free)

Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) In the Font Awesome Free download, the CC BY 4.0 license applies to all icons packaged as SVG and JS file types.