Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup website for SPDX Using (workflow with mkdocs) #16

Open
wants to merge 47 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
71e4a1a
Setup mkdocs
bact Sep 4, 2024
dd77568
Update publish.yml
bact Sep 4, 2024
0613647
Merge pull request #2 from bact/setup-mkdocs
bact Sep 4, 2024
d0de940
fix dir names
bact Sep 4, 2024
6ccffaf
Merge pull request #3 from bact/setup-mkdocs
bact Sep 4, 2024
fe2d7d8
Update mkdocs.yml
bact Sep 4, 2024
a0c067a
Remove extensions
bact Sep 4, 2024
fd06670
remove pdf plugin
bact Sep 4, 2024
553e7db
Fix dir names and remove PDF plugin
bact Sep 4, 2024
e94ac68
Merge pull request #4 from bact/setup-mkdocs
bact Sep 4, 2024
bb2529f
Fix title
bact Sep 4, 2024
f5bf2c3
Update mkdocs.yml
bact Sep 4, 2024
f32e2d5
Remove Annexe numbering
bact Sep 4, 2024
74c9a52
Merge branch 'main' into setup-mkdocs
bact Sep 4, 2024
f7c86b8
Merge pull request #5 from bact/setup-mkdocs
bact Sep 4, 2024
87b8d0e
Fix edit link
bact Sep 4, 2024
3aaab48
Merge branch 'setup-mkdocs' of https://github.com/bact/using into set…
bact Sep 4, 2024
0c52150
Update mkdocs.yml
bact Sep 4, 2024
798908e
Add favicon
bact Sep 4, 2024
8755789
Add build badge
bact Sep 4, 2024
3b027a7
Merge pull request #6 from bact/setup-mkdocs
bact Sep 4, 2024
5d00a17
Update logo
bact Sep 4, 2024
0ed42ab
Add tags
bact Sep 4, 2024
5dc3f11
Merge pull request #7 from bact/setup-mkdocs
bact Sep 4, 2024
a0b67b3
Add tags page
bact Sep 4, 2024
7f2f192
Update mkdocs.yml
bact Sep 4, 2024
b94880d
Enable social cards
bact Sep 4, 2024
ee13578
Change to info box
bact Sep 4, 2024
b4416b3
Merge branch 'main' into setup-mkdocs
bact Sep 4, 2024
58f1cbb
Make tags clickable
bact Sep 4, 2024
1be5edc
Merge branch 'setup-mkdocs' of https://github.com/bact/using into set…
bact Sep 4, 2024
4d10534
Add tag
bact Sep 4, 2024
477a523
Remove (Informative)
bact Sep 4, 2024
decc23b
Add social card dependency
bact Sep 4, 2024
792930d
Social card dependency
bact Sep 4, 2024
22fb591
Update publish.yml
bact Sep 4, 2024
72516ed
Update publish.yml
bact Sep 4, 2024
4def9dc
Fix logo path
bact Sep 4, 2024
4e17da3
Update tags summary
bact Sep 4, 2024
0e2c0ee
Shorten URL
bact Sep 4, 2024
d4523de
Add svg to gitattributes
bact Sep 4, 2024
46398c2
Removing build badges
bact Sep 4, 2024
6b9b074
Update numbering
bact Sep 4, 2024
a19e586
Add workflow_dispatch to publish.yml
bact Sep 5, 2024
9aea511
Add license at Markdown metadata header
bact Sep 7, 2024
e9159d1
Merge branch 'main' of https://github.com/spdx/using into spdx-main
bact Nov 13, 2024
4049a7f
Merge branch 'spdx-main' into setup-mkdocs
bact Nov 13, 2024
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
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# See also http://editorconfig.org/

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false # Markdown using two trailing spaces for <br />
16 changes: 16 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.md text eol=lf
*.py text eol=lf
*.txt text eol=lf
*.yml text eol=lf

# Denote all files that are truly binary and should not be modified.
*.gif binary
*.jpg binary
*.pdf binary
*.png binary
*.svg binary
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
on:
push:
branches:
- main
workflow_dispatch: {}
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
container: python:3
env:
REF: "main" # source branch/tag release
GH_PAGES_BRANCH: "gh-pages" # target branch (to publish HTML to)
GIT_USER_NAME: "publish-github-actions" # for gh-pages commit
GIT_USER_EMAIL: "publish-github-actions[bot]@users.noreply.github.com" # for gh-pages commit
steps:
- name: Checkout content
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #v4.1.7
with:
ref: ${{ env.REF }}
path: using
fetch-depth: 0
- name: Install pre-requisites for MkDocs
run: pip install -r using/requirements.txt
- name: Set Git identity
working-directory: using
run: |
git config user.name ${{ env.GIT_USER_NAME }}
git config user.email ${{ env.GIT_USER_EMAIL }}
- name: Sync GitHub Pages
working-directory: using
run: git checkout ${{ env.GH_PAGES_BRANCH }} && git pull && git checkout ${{ env.REF }}
- name: Build and deploy docs
working-directory: using
run: mkdocs gh-deploy --clean --verbose --remote-branch ${{ env.GH_PAGES_BRANCH }}
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Ignore all hidden files/dirs except .gitignore
.*
!/.gitignore
!/.github

# Operating system files
.DS_Store
._*
Thumbs.db
Thumbs.db:encryptable
*.lnk

# Generated docs
*.epub
*.mobi
*.pdf

# Build output directory
dist/
site/

# Build temporary directory
logs/
__pycache__/

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# using
---
SPDX-License-Identifier: Community-Spec-1.0
---

Information on how to use the SPDX specification
# Using SPDX

Information on how to use the
[SPDX specification](https://spdx.dev/use/specifications/).

This is not part of the specification.

Everything in this repository is for informative purpose only.

Copyright © 2024, The Linux Foundation and its Contributors.

This work is licensed under the
[Community Specification License 1.0](./LICENSE)
(Community-Spec-1.0).
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Using SPDX to comply with Norms, Standards and Regulation
---
SPDX-License-Identifier: Community-Spec-1.0
tags:
- compliance
- v3.0
---

# Using SPDX to comply with norms, standards and regulation

## Satisfying NTIA Minimum Elements for an SBOM using SPDX / US Executive Order 14028

Expand Down
9 changes: 8 additions & 1 deletion docs/cross-reference.md → docs/cross-ref.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
---
SPDX-License-Identifier: Community-Spec-1.0
tags:
- reference
- v3.0
---

# Cross referencing in SPDX 3

This document will walk though how to refer to SPDX Elements across documents
Expand All @@ -7,7 +14,7 @@ If you do would like to construct the complete example documents from this
Markdown file, use the following command:

```shell
cat cross-reference.md | awk 'BEGIN{flag=0} /^```json/, $0=="```" { if (/^---$/){flag++} else if ($0 !~ /^```.*/ ) print $0 > "doc-" flag ".spdx.json"}'
cat cross-ref.md | awk 'BEGIN{flag=0} /^```json/, $0=="```" { if (/^---$/){flag++} else if ($0 !~ /^```.*/ ) print $0 > "doc-" flag ".spdx.json"}'
```

## Linking via spdxId
Expand Down
15 changes: 14 additions & 1 deletion docs/diffs-from-previous-editions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Annex A: Differences from previous editions (Informative)
---
SPDX-License-Identifier: Community-Spec-1.0
tags:
- v3.0
- v2.3
- v2.2.2
- v2.2.1
- v2.2
- v2.1
- v2.0
- v1.2
---

# Differences from previous editions

## A.1 Differences between V3.0 and V2.3 <a name="A.1"></a>

Expand Down
8 changes: 7 additions & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
---
SPDX-License-Identifier: Community-Spec-1.0
tags:
- v3.0
---

# Getting started writing SPDX 3

## (a.k.a My First SPDX File)
(a.k.a My First SPDX File)

This guide is designed to walk you through the concepts behind an SPDX
document, by walking through writing one by hand. While it is possible to write
Expand Down
Binary file added docs/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions docs/images/logo-color.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions docs/images/logo-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
SPDX-License-Identifier: Community-Spec-1.0
---

# Using SPDX

Information on how to use the
[SPDX specification](https://spdx.dev/use/specifications/).

Copyright © 2024, The Linux Foundation and its Contributors.

This work is licensed under the
[Community Specification License 1.0](https://spdx.org/licenses/Community-Spec-1.0.html)
(Community-Spec-1.0).

!!! info

This is not part of the specification.

Everything on this website is for informative purpose only.
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Using SPDX license list short identifiers in source files
---
SPDX-License-Identifier: Community-Spec-1.0
tags:
- license
- compliance
---

# Using SPDX License List short identifiers in source files

TODO: update for SPDXv3

Expand All @@ -8,23 +15,27 @@ Identifying the license for open source software is critical for both reporting

[Short identifiers](https://spdx.org/licenses/) from the SPDX License List can be used to indicate license info at the file level. The advantages of doing this are numerous but include:

* It is precise.
* It is concise.
* It is language neutral.
* It is easy and more reliable to machine process.
* Leads to code that is easier to reuse.
* The license information travels with the file (as sometimes not entire projects are used or license files are removed).
* It is a standard and can be universal. There is no need for variation.
* An SPDX short identifier is immutable.
* Easy look-ups and cross-references to the SPDX License List website.
- It is precise.
- It is concise.
- It is language neutral.
- It is easy and more reliable to machine process.
- Leads to code that is easier to reuse.
- The license information travels with the file (as sometimes not entire projects are used or license files are removed).
- It is a standard and can be universal. There is no need for variation.
- An SPDX short identifier is immutable.
- Easy look-ups and cross-references to the SPDX License List website.

If using SPDX short identifiers in individual files, it is recommended to reproduce the full license in the projects LICENSE file and indicate that SPDX short identifiers are being used to refer to it. For links to projects illustrating these scenarios, see <https://spdx.dev/ids-where>.

## Format for `SPDX-License-Identifier`

The `SPDX-License-Identifier` tag declares the license the file is under and should be placed at or near the top of the file in a comment.
The `SPDX-License-Identifier` tag declares the license the file is under and should be placed at or near the top of the file in a comment.

The SPDX License Identifier syntax may consist of a single license (represented by a short identifier from the [SPDX license list](https://spdx.org/licenses/)) or a compound set of licenses (represented by joining together multiple licenses using the license expression syntax).
The SPDX License Identifier syntax may consist of a single license
(represented by a short identifier from the
[SPDX License List](https://spdx.org/licenses/)) or a compound set of licenses
(represented by joining together multiple licenses using the license expression
syntax).

The tag should appear on its own line in the source file, generally as part of a comment.

Expand All @@ -34,7 +45,9 @@ SPDX-License-Identifier: <SPDX License Expression>

## Representing single license

A single license is represented by using the short identifier from [SPDX license list](https://spdx.org/licenses/), optionally with a unary "+" operator following it to indicate "or later" versions may be applicable.
A single license is represented by using the short identifier from
[SPDX License List](https://spdx.org/licenses/), optionally with a unary "+"
operator following it to indicate "or later" versions may be applicable.

Examples:

Expand Down Expand Up @@ -71,4 +84,3 @@ SPDX-License-Identifier: LicenseRef-my-special-license
```

The `LicenseRef-` format is defined in the SPDX specification Annex defining license expressions. When using a custom `LicenseRef-` identifier, you will also need to provide a way for others to determine what license text corresponds to it. The [REUSE Software Specification](https://reuse.software/spec/) provides a standardized format that can optionally be used for providing the corresponding license text for these identifiers.

Loading