diff --git a/.github/workflows/check-format.yml b/.github/workflows/check-format.yml new file mode 100644 index 0000000..47a3e51 --- /dev/null +++ b/.github/workflows/check-format.yml @@ -0,0 +1,32 @@ +name: Files + +on: + pull_request: + +jobs: + # check-filenames: + # name: FILENAME check + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # - run: npm run check:filenames + + check-formatting: + name: FILE FORMAT + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Create NPM cache-hash input file + run: | + mkdir -p tmp + jq '{devDependencies, engines, gitHubActionCacheKey}' package.json > tmp/package-ci.json + + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + cache-dependency-path: tmp/package-ci.json + + - name: Check file format + run: npm run check:format --ignore-scripts diff --git a/.gitignore b/.gitignore index 914bffb..31647e2 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,6 @@ # npm artifacts node_modules/ + +# other +/tmp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..b76244d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "themes/docsy"] + path = themes/docsy + url = https://github.com/google/docsy.git diff --git a/.htmltest.yml b/.htmltest.yml new file mode 100644 index 0000000..68c9899 --- /dev/null +++ b/.htmltest.yml @@ -0,0 +1,10 @@ +DirectoryPath: public +CheckDoctype: false # Sadly, this is false only because of `static/google*.html` +IgnoreAltMissing: true # FIXME +IgnoreDirectoryMissingTrailingSlash: true # FIXME +IgnoreDirs: [_print] # FIXME +IgnoreEmptyHref: true # FIXME +IgnoreInternalEmptyHash: true # FIXME +IgnoreInternalURLs: # list of paths +IgnoreURLs: # list of regexs of paths or URLs to be ignored + - ^https://twitter.com/docsydocs$ diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..b009dfb --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +lts/* diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..be9db56 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +# Temporary: ignore top-level *.md until docsy branch is merged into main +CONTRIBUTING.md +README.md + +/themes +/layouts \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7a4aa11 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +HTMLTEST_DIR=tmp +HTMLTEST?=htmltest # Specify as make arg if different +HTMLTEST_ARGS?=--skip-external + +# Use $(HTMLTEST) in PATH, if available; otherwise, we'll get a copy +ifeq (, $(shell which $(HTMLTEST))) +override HTMLTEST=$(HTMLTEST_DIR)/bin/htmltest +ifeq (, $(shell which $(HTMLTEST))) +GET_LINK_CHECKER_IF_NEEDED=get-link-checker +endif +endif + +check-links: $(GET_LINK_CHECKER_IF_NEEDED) + $(HTMLTEST) $(HTMLTEST_ARGS) + +clean: + rm -rf $(HTMLTEST_DIR) public/* resources + +get-link-checker: + rm -Rf $(HTMLTEST_DIR)/bin + curl https://htmltest.wjdp.uk | bash -s -- -b $(HTMLTEST_DIR)/bin diff --git a/assets/icons/logo.svg b/assets/icons/logo.svg new file mode 100644 index 0000000..1adb67a --- /dev/null +++ b/assets/icons/logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/assets/js/app.js b/assets/js/app.js deleted file mode 100644 index 84cc571..0000000 --- a/assets/js/app.js +++ /dev/null @@ -1,10 +0,0 @@ -function navbarToggle() { - $(".navbar-burger").click(function() { - $(".navbar-burger").toggleClass("is-active"); - $(".navbar-menu").toggleClass("is-active"); - }); -} - -$(function() { - navbarToggle(); -}); diff --git a/assets/sass/style.sass b/assets/sass/style.sass deleted file mode 100644 index db47758..0000000 --- a/assets/sass/style.sass +++ /dev/null @@ -1,103 +0,0 @@ -{{- $fonts := site.Params.fonts }} -{{- $fontSlice := (slice) }} -{{- range $fonts }} -{{- $fontSlice = $fontSlice | append (printf "%s:%s" (replace .name " " "+") (delimit .sizes ",")) }} -{{- end }} -{{- $fontsUrl := printf "https://fonts.googleapis.com/css?family=%s" (delimit $fontSlice "|") }} -{{- $sansSerifFont := (index (where site.Params.fonts ".type" "sans_serif") 0).name }} -{{- $fontAwesomeVersion := site.Params.fontawesomeversion }} -{{- $fontAwesomeUrl := printf "https://use.fontawesome.com/releases/v%s/css/all.css" $fontAwesomeVersion }} - -@charset "utf-8" -@import url("{{ $fontsUrl }}") -@import url({{ $fontAwesomeUrl }}) - -// in-toto variables -$in-toto-orange: #ed4b27 -$in-toto-blue: #3688d6 - -@import "bulma/sass/utilities/initial-variables" -@import "bulma/sass/utilities/functions" -@import "bulma/sass/utilities/mixins" - -// Bulma variable overrides -$primary: $in-toto-blue -$secondary: $in-toto-orange -$family-sans-serif: '{{ $sansSerifFont }}', BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif - -$link: $primary -$navbar-dropdown-radius: none -$navbar-dropdown-arrow: $secondary - -@import "bulma/sass/utilities/derived-variables" - -$colors: mergeColorMaps(("secondary": ($secondary, $white)), $colors) - -@import "bulma/bulma" - -=responsive-img($mobile, $tablet) - +mobile - width: $mobile - +tablet - width: $tablet - -.hero-logo - +responsive-img(100%, 70%) - -.footer-logo - +responsive-img(20%, 30%) - -.feature-image - max-height: 10rem - -hr.thick-hr - width: 5rem - background-color: $secondary - height: .2rem - -.feature-columns - & + & - margin-top: 3rem - -// Make footer stick to the bottom -.page - display: flex - flex-direction: column - min-height: 100vh - - .main - flex: 1 - -.bottom-padding - margin-bottom: 8rem - -.pad-left - padding-left: 1rem - -.integration-logo - max-width: 7rem - width: auto - -.integration-column - & + & - margin-top: 2rem - -.faq - & + & - margin-top: 2.5rem - - .question - +desktop - font-size: 1.5rem - +mobile - font-size: 1.2rem - - .answer - +desktop - padding-left: 5rem - +touch - padding-left: 2rem - -.main-content - +desktop - width: 80% diff --git a/assets/scss/_external_link.scss b/assets/scss/_external_link.scss new file mode 100644 index 0000000..d0e4dd6 --- /dev/null +++ b/assets/scss/_external_link.scss @@ -0,0 +1,36 @@ +// External-link icon after an external link +// +// To ensure that the external-link icon word-wraps along with the preceding +// word, rather than by itself, we (1) start content with $nbsp, and (2) ensure +// that `display` is 'inline'. +// +// For a discussion concerning this topic, see +// https://stackoverflow.com/questions/16100956/prevent-after-element-from-wrapping-to-next-line. + +$nbsp: \00A0; + +@mixin external-link-icon() { + @extend .fas; + display: inline; + @include font-size(60%); + opacity: 0.8; + vertical-align: text-top; + content: fa-content($nbsp + $fa-var-external-link-alt); +} + +.td-sidebar-nav a[target='_blank']:after, +a.external-link:after { + @include external-link-icon(); +} + +.td-footer a.external-link:after { + display: none !important; +} + +// Can't quite use this yet since (1) breadcrumbs currently use external links, +// (2) we can't currently easily turn this off for footer icons. +// +// a[href^="http://"]:not(.btn):not(.external-link):after, +// a[href^="https://"]:not(.btn):not(.external-link):after { +// @include external-link-icon(); +// } diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss new file mode 100644 index 0000000..0067861 --- /dev/null +++ b/assets/scss/_styles_project.scss @@ -0,0 +1,35 @@ +@import 'external_link'; +@import 'td/code-dark'; + +.td-navbar { + background-color: $primary !important; + opacity: 1; +} + +.td-navbar .navbar-brand { + svg { + height: 3rem; + margin-left: 5rem; + } +} + +.td-home { + .cncf { + text-align: center; + + p { + font-size: 1.2rem; + margin-bottom: 0; + } + + img { + width: 20rem; + padding-top: 1rem; + max-width: 80%; + } + + a.external-link:after { + display: none; + } + } +} diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss new file mode 100644 index 0000000..f5d1054 --- /dev/null +++ b/assets/scss/_variables_project.scss @@ -0,0 +1,10 @@ +$in-toto-colors: ( + 'orange': #ed4b27, + 'orange-light': #f47a39, + 'blue': #1b2838, + 'blue-light': #a3b5c8, +); + +$primary: map-get($in-toto-colors, 'blue'); +$secondary: map-get($in-toto-colors, 'orange'); +$td-enable-google-fonts: false; diff --git a/config.toml b/config.toml deleted file mode 100644 index 0866b74..0000000 --- a/config.toml +++ /dev/null @@ -1,126 +0,0 @@ -baseURL = "https://in-toto.io" -languageCode = "en-us" -title = "in-toto" -pygmentsUseClasses = true -pygmentsCodefences = true -enableRobotsTXT = true -disableKinds = ["taxonomy", "taxonomyTerm"] - -[params] -description = "A framework to secure the integrity of software supply chains" -fontAwesomeVersion = "5.3.1" -vimeo_id = "237799749" -github_repo = "in-toto/community" - -[params.logos] -navbar = "in-toto-horizontal-color.png" -hero = "in-toto-horizontal-color.png" -footer = "in-toto-stacked-white.png" - -[[params.fonts]] -name = "Noto Sans" -sizes = [300,400,600,700] -type = "sans_serif" - -[[params.features]] -title = "Software supply chain protection" -description = "Supply chain compromises are becoming a frequent occurrence. in-toto can help you protect your software supply chain." -button_url = "/in-toto" -button_text = "Read more" -img = "layout.png" - -[[params.features]] -title = "Open, extensible standard" -description = "in-toto is an open metadata standard that you can implement in your software's supply chain toolchain." -button_url = "/specs" -button_text = "Read the specifications" -img = "metadata.png" - -[[params.features]] -title = "Extensive tooling" -description = "You can use in-toto today by using our Apache-licensed libraries and tools." -button_url = "https://github.com/in-toto" -button_text = "Tools" -img = "gears.png" - -[[menu.main]] -identifier = "about" -name = "About" -weight = 1 - -[[menu.main]] -parent = "about" -name = "What is in-toto?" -url = "/in-toto" -weight = 1 - -[[menu.main]] -parent = "about" -name = "Adoptions and Integrations" -url = "https://github.com/in-toto/friends" -weight = 2 - -[[menu.main]] -identifier = "community" -name = "Community" -weight = 2 - -[[menu.main]] -parent = "community" -name = "Contact" -url = "/contact" -weight = 1 - -[[menu.main]] -parent = "community" -name = "Contribute" -url = "https://github.com/in-toto/community/" -weight = 2 - -[[menu.main]] -identifier = "get-started" -name = "Get started" -weight = 3 - -[[menu.main]] -parent = "get-started" -name = "Try it out" -url = "https://github.com/in-toto/demo" -weight = 1 - -[[menu.main]] -parent = "get-started" -name = "Metadata examples" -url = "/metadata-examples" -weight = 2 - -[[menu.main]] -parent = "get-started" -name = "Specifications" -url = "/specs" -weight = 3 - -[[menu.main]] -identifier = "learn" -name = "Learn more" -weight = 4 - -[[menu.main]] -parent = "learn" -name = "News" -url = "/news" -weight = 1 - -[[menu.main]] -parent = "learn" -name = "Security audit '23" -url = "/security-audit-23" -weight = 2 - -[[menu.main]] -parent = "learn" -name = "Frequently asked questions" -url = "/faq" -weight = 3 - - diff --git a/content/contact.md b/content/contact.md deleted file mode 100644 index d1128b9..0000000 --- a/content/contact.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -title: Contact ---- - -Medium | How -:------|:--- -Email the Developers | [in-toto-dev@googlegroups.com](mailto:in-toto-dev@googlegroups.com) -Join the Mailing List | [in-toto-public@googlegroups.com](https://groups.google.com/g/in-toto-public) -Slack | #in-toto on [CNCF Slack Workspace](https://slack.cncf.io/) -GitHub | [in-toto/community](https://github.com/in-toto/community) -IRC | [#in-toto](https://web.libera.chat/#in-toto) on [libera](https://libera.chat) diff --git a/content/en/_index.md b/content/en/_index.md new file mode 100644 index 0000000..c3b2957 --- /dev/null +++ b/content/en/_index.md @@ -0,0 +1,60 @@ +--- +title: in-toto +description: A framework to secure the integrity of software supply chains +--- + +{{% blocks/cover image_anchor="top" height="max" %}} + + + +
- {{ .Title }} -
-- -
- -- {{ $desc }} -
-{{ T "community_introduce" . }}
+ +## {{ T "community_learn" }} + +{{ T "community_using" . }} + +{{ with index $links "user"}} + {{ template "community-links-list" . }} +{{ end }} + +## {{ T "community_develop" }} + +{{ T "community_contribute" . }} + +{{ with index $links "developer"}} + {{ template "community-links-list" . }} +{{ end }} + +{{ T "community_how_to" . }} {{ T "community_guideline" }}. + +{{ define "community-links-list" -}} +{{ range . }} +- [ {{ .name }}]({{ .url }}): {{ .desc -}} +{{ end -}} +{{ end -}} diff --git a/layouts/shortcodes/faq.html b/layouts/shortcodes/faq.html deleted file mode 100644 index 09cf296..0000000 --- a/layouts/shortcodes/faq.html +++ /dev/null @@ -1,13 +0,0 @@ -{{ $faq := site.Data.faq }} -{{ range $idx, $qa := $faq }} -{{ $num := add $idx 1 }} -- {{ $num }}. {{ .q | markdownify }} -
- -- {{ .a | markdownify }} -
-- Version - | -- Description - | -
---|---|
- - {{ .version }} - - | -- {{ .description | markdownify }} - | -