Skip to content

Commit

Permalink
Merge pull request #86 from chalin/docsy
Browse files Browse the repository at this point in the history
New and improved Docsy-based version of the website
  • Loading branch information
JustinCappos authored Dec 16, 2024
2 parents a5f2b19 + 3f4f351 commit f073e46
Show file tree
Hide file tree
Showing 119 changed files with 1,416 additions and 1,069 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/check-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Files

on:
merge_group:
pull_request:
push: { branches: [main] }

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

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package.json

- name: Check file format
run: |
npm run __install:prettier
npm run check:format
28 changes: 28 additions & 0 deletions .github/workflows/check-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Links

on:
merge_group:
pull_request:
push: { branches: [main] }

jobs:
build-and-check-links:
name: BUILD and CHECK LINKS
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

- run: npm install --omit=optional

- run: npm run check:links
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@

# npm artifacts
node_modules/

# other
/tmp
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "themes/docsy"]
path = themes/docsy
url = https://github.com/google/docsy.git
10 changes: 10 additions & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
@@ -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$
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/themes
/layouts
53 changes: 1 addition & 52 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,3 @@
# Contributing to in-toto.io

Thank you for considering contributing to in-toto.io! Here are the steps to set up the project on your local machine.

## Review Contribution Guidelines

Before contributing, please review our detailed [contribution guidelines](https://github.com/in-toto/community/blob/main/CONTRIBUTING.md) to ensure that your code follows our style guidelines and is properly tested.

## Sign the Developer Certificate of Origin (DCO)

All contributors must sign the Developer Certificate of Origin (DCO) by adding a "Signed-off-by" line to their commit messages. This indicates your acceptance of the DCO. You can do this by appending the following line to each commit message (see [git commit --signoff](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff))

## Quick Start Guide

To get started with contributing to in-toto.io, follow these steps:

### 1. Clone the Repository

Clone the in-toto.io git repository to your local machine:

```sh
git clone https://github.com/in-toto/in-toto.io.git
```

### 2. Install Development Dependencies

Navigate to the project root directory and install the necessary dependencies with Yarn. If you do not have Yarn installed, please install it by following the instructions on the [Yarn installation guide](https://classic.yarnpkg.com/en/docs/install):

```sh
cd in-toto.io
npm install
```

### 3. Install Hugo

We use Hugo to build the site. Follow the [Hugo installation guide](https://gohugo.io/installation/) to install Hugo on your system.

### 4. Serve the website

Once Hugo is installed, you can locally serve the website to see your changes in
real-time:

```sh
npm run serve
```

This starts a local server. View the site at the URL displayed in your
terminal, usually <http://localhost:1313>.

## Need Help?

If you encounter any issues or have any questions, feel free to open an issue on the repository or reach out to the maintainers.

**Happy contributing!**
See our [Contributing](https://in-toto.io/docs/contributing/) webpage.
21 changes: 21 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# The in-toto website
# in-toto.io

[![Netlify Status](https://api.netlify.com/api/v1/badges/59e9b859-0349-41dc-b194-0bd636f9a8ac/deploy-status)](https://app.netlify.com/sites/in-toto/deploys)
[![Netlify Status](https://api.netlify.com/api/v1/badges/59e9b859-0349-41dc-b194-0bd636f9a8ac/deploy-status)](https://app.netlify.com/sites/in-toto/deploys)

Website repository for [in-toto.io] built with [Hugo] using the [Docsy] theme
and hosted on [Netlify].

[Docsy]: https://docsy.dev
[Hugo]: https://gohugo.io
[Netlify]: https://netlify.com
[in-toto.io]: https://in-toto.io
27 changes: 27 additions & 0 deletions assets/icons/logo.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: 0 additions & 10 deletions assets/js/app.js

This file was deleted.

103 changes: 0 additions & 103 deletions assets/sass/style.sass

This file was deleted.

31 changes: 31 additions & 0 deletions assets/scss/_csp.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Due to the site's Content-Security-Policy, we must move inline styles
// into this file. For some context, see:
// https://github.com/theupdateframework/theupdateframework.io/issues/73

// The following styles appear in the HTML generated for the ...

// Navbar

.navbar-logo > svg {
.cls-1 {
fill: #ff3800;
}
.cls-2 {
fill: #ff3800;
}
.cls-3 {
fill: #0089dd;
}
}

// Homepage: URLs below will need to be updated when the hero image changes.

#td-cover-block-0 {
background-image: url(/featured-background_hu16056391159218873026.jpg);
}

@media only screen and (min-width: 1200px) {
#td-cover-block-0 {
background-image: url(/featured-background_hu18408291696259244493.jpg);
}
}
37 changes: 37 additions & 0 deletions assets/scss/_external_link.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// Copied from https://github.com/open-telemetry/opentelemetry.io/blob/ddd8d43fff700effbe0047473071f9bab66ddb07/assets/scss/_external_link.scss
// 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();
// }
Loading

0 comments on commit f073e46

Please sign in to comment.