Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Deploy
on: [push]
on:
pull_request:
push:
merge_group:

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
exclude: 'docs|node_modules|migrations|.git|.tox|.xml'
default_stages: [pre-commit]
fail_fast: true
autofix_commit: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
70 changes: 70 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# STIG A View Static Contributors Guide

Thanks for your interest in contributing to STIG A View.
This document has a few notes that should help you with contributing.


## Development Environment setup
Requirements
* Python 3.11+
* Python venv module
* Make
* GNU Sed

### Fedora

```bash
sudo dnf install python3 make sed
```

### Debian/Ubuntu
```bash
sudo apt install python3 python3-venv make sed
```

### macOS
GNU Sed is needed for sitemaps generation.
```bash
brew install gnu-sed make
```

Create a virtual environment (venv), activate the venv, and install the Python dependencies.

```
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install -r requirements.txt
```

To build the site run:
```
$ make
```

### Windows
Native Windows development isn't fully supported.
It is sugguested that you use [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install) (WSL).
Setting that up is out-of-scope for this document.

However, you can follow the steps above to install Python dependencies (assume you have working Python installation on Windows) then run the cli using `python -m stigaview`.

Pre-commit also runs in CI so you can use those results if don't want to install the pre-commit hooks.

Install the pre-commit hooks if so desired by running the following command:

```bash
pre-commit install
```

## Make a Contribution
1. [Fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) [this repo](https://github.com/stigaview/stigaview-static)
2. Create a branch
1. `git checkout -b my_cool_feature`
3. Do your changes
4. Format your code
1. This project uses the [black formatter](https://black.readthedocs.io/en/stable/). Please use pre-commit or run black on your own.
5. Commit your changes
1. Please follow [How to Write a Git Commit Message](https://cbea.ms/git-commit/) by [cbeams](https://cbea.ms/) when writing commit messages
2. All commits must be GPG signed. GitHub as a [good guide](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) on how to set this up.
3. Please sign off (using `-s or `--sign-off`)
6. Open a pull reqeust on [the repo](https://github.com/stigaview/stigaview-static)
34 changes: 34 additions & 0 deletions DCO
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# STIG A View Static
This custom static site generator for [stigaview.com](https://stigaview.com).
This is a custom static site generator for [stigaview.com](https://stigaview.com).

## Input
```
Expand All @@ -18,7 +18,7 @@ products

## Usage
You will need Python 3.11+.
On macOS the provided BSD sed will not work for the site maps.
On macOS, the provided BSD sed will not work for the site maps.
You will need to install GNU sed.

```
Expand All @@ -38,13 +38,20 @@ To build the site run
$ make
```


### Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.

By contributing to this project you agree that your contributions follow the [Developer Certificate of Origin](https://developercertificate.org/).


## License
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
See COPYING for more details.

The STIG content is the public domain.
The STIG content is in the public domain.

This program uses code from the Django version of STIG-A-View.
This code is used by permission.