Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial docs site update for Witness with new Docusaurus stack. --------- Signed-off-by: chaosinthecrd <tom@tmlabs.co.uk> Signed-off-by: John Kjell <john@testifysec.com> Co-authored-by: John Kjell <john@testifysec.com>
- Loading branch information
1 parent
a4c4029
commit 910d630
Showing
29 changed files
with
9,139 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
REACT_APP_IN_TOTO_SITE=witness // or 'archivista' based on your configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
// @ts-check | ||
// `@type` JSDoc annotations allow editor autocompletion and type checking | ||
// (when paired with `@ts-check`). | ||
// There are various equivalent ways to declare your Docusaurus config. | ||
// See: https://docusaurus.io/docs/api/docusaurus-config | ||
|
||
import {themes as prismThemes} from 'prism-react-renderer'; | ||
|
||
/** @type {import('@docusaurus/types').Config} */ | ||
const config = { | ||
title: 'In-toto Witness', | ||
tagline: 'Documentation for the Witness Project', | ||
favicon: '/static/img/favicon.ico', | ||
|
||
// Set the production url of your site here | ||
url: 'https://witness.dev', | ||
// Set the /<baseUrl>/ pathname under which your site is served | ||
// For GitHub pages deployment, it is often '/<projectName>/' | ||
baseUrl: '/', | ||
|
||
// GitHub pages deployment config. | ||
// If you aren't using GitHub pages, you don't need these. | ||
organizationName: 'in-toto', // Usually your GitHub org/user name. | ||
projectName: 'witness', // Usually your repo name. | ||
|
||
onBrokenLinks: 'warn', | ||
onBrokenMarkdownLinks: 'warn', | ||
|
||
// Even if you don't use internationalization, you can use this field to set | ||
// useful metadata like html lang. For example, if your site is Chinese, you | ||
// may want to replace "en" with "zh-Hans". | ||
i18n: { | ||
defaultLocale: 'en', | ||
locales: ['en'], | ||
}, | ||
|
||
presets: [ | ||
[ | ||
'classic', | ||
/** @type {import('@docusaurus/preset-classic').Options} */ | ||
({ | ||
docs: { | ||
path: "..", | ||
include: [ | ||
"README.md", | ||
"docs/**/*.{md,mdx}", | ||
"CONTRIBUTING.md", | ||
"CODE_OF_CONDUCT.md", | ||
], | ||
sidebarPath: 'sidebars.js', | ||
routeBasePath: "/docs", | ||
}, | ||
blog: false, | ||
theme: { | ||
customCss: './src/css/custom.css', | ||
}, | ||
}), | ||
], | ||
], | ||
|
||
themeConfig: | ||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */ | ||
({ | ||
// Replace with your project's social card | ||
image: 'img/witness-og.png', | ||
navbar: { | ||
title: 'Witness', | ||
logo: { | ||
alt: 'Witness Project Logo', | ||
src: 'img/logo.png', | ||
}, | ||
items: [ | ||
{ | ||
type: "search", | ||
position: "right", | ||
}, | ||
{ | ||
type: "doc", | ||
docId: "README", | ||
position: "left", | ||
label: "About", | ||
}, | ||
{ | ||
type: "doc", | ||
docId: "docs/tutorials/getting-started", | ||
position: "left", | ||
label: "Tutorials", | ||
}, | ||
{ | ||
type: "doc", | ||
docId: "docs/concepts/attestor", | ||
position: "left", | ||
label: "Concepts", | ||
}, | ||
{ | ||
href: "https://github.com/in-toto/witness", | ||
position: "right", | ||
className: "header-github-link", | ||
"aria-label": "GitHub repository", | ||
}, | ||
{ | ||
href: "https://communityinviter.com/apps/cloud-native/cncf", | ||
position: "right", | ||
className: "header-slack-link", | ||
"aria-label": "Slack Invite Link", | ||
}, | ||
|
||
], | ||
}, | ||
announcementBar: { | ||
id: 'support_us', | ||
content: | ||
'We are looking to revamp our docs, please fill <a target="_blank" rel="noopener noreferrer" href="https://forms.gle/Pcgo45TABFYvfQX47">this survey</a>', | ||
textColor: 'white', | ||
backgroundColor: '#333385', | ||
isCloseable: false, | ||
}, | ||
footer: { | ||
style: 'dark', | ||
links: [ | ||
{ | ||
title: 'Docs', | ||
items: [ | ||
{ | ||
label: 'Tutorials', | ||
to: 'docs/docs/tutorials/getting-started', | ||
}, | ||
], | ||
}, | ||
{ | ||
title: 'Community', | ||
items: [ | ||
{ | ||
label: 'Slack', | ||
href: 'https://slack.cncf.io/', | ||
}, | ||
{ | ||
label: 'Github', | ||
href: 'https://github.com/in-toto/witness', | ||
}, | ||
], | ||
}, | ||
], | ||
copyright: `Copyright © ${new Date().getFullYear()} The Witness Contributors, Inc. Built with Docusaurus.`, | ||
}, | ||
prism: { | ||
theme: prismThemes.github, | ||
darkTheme: prismThemes.dracula, | ||
}, | ||
}), | ||
}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"name": "witness-website", | ||
"version": "0.0.0", | ||
"private": true, | ||
"scripts": { | ||
"docusaurus": "docusaurus", | ||
"start": "docusaurus start", | ||
"build": "docusaurus build", | ||
"swizzle": "docusaurus swizzle", | ||
"deploy": "docusaurus deploy", | ||
"clear": "docusaurus clear", | ||
"serve": "docusaurus serve", | ||
"write-translations": "docusaurus write-translations", | ||
"write-heading-ids": "docusaurus write-heading-ids" | ||
}, | ||
"dependencies": { | ||
"@docusaurus/core": "3.1.1", | ||
"@docusaurus/preset-classic": "3.1.1", | ||
"@mdx-js/react": "^3.0.0", | ||
"clsx": "^2.0.0", | ||
"docusaurus-plugin-remote-content": "^4.0.0", | ||
"prism-react-renderer": "^2.3.0", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-snowfall": "^1.2.1" | ||
}, | ||
"devDependencies": { | ||
"@docusaurus/module-type-aliases": "3.1.1", | ||
"@docusaurus/types": "3.1.1" | ||
}, | ||
"browserslist": { | ||
"production": [ | ||
">0.5%", | ||
"not dead", | ||
"not op_mini all" | ||
], | ||
"development": [ | ||
"last 3 chrome version", | ||
"last 3 firefox version", | ||
"last 5 safari version" | ||
] | ||
}, | ||
"engines": { | ||
"node": ">=18.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/** | ||
* Copyright 2024 The Witness Contributors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
// @ts-check | ||
|
||
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ | ||
const sidebars = { | ||
docsSidebar: [ | ||
{ | ||
type: 'doc', | ||
label: 'About', | ||
id: 'README', | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'Tutorials', | ||
items: [ | ||
{ | ||
type: 'autogenerated', | ||
dirName: 'docs/tutorials', | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'Concepts', | ||
items: [ | ||
{ | ||
type: 'autogenerated', | ||
dirName: 'docs/concepts', | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'Attestor Types', | ||
items: [ | ||
{ | ||
type: 'autogenerated', | ||
dirName: 'docs/attestors', | ||
}, | ||
], | ||
}, | ||
{ | ||
type: 'doc', | ||
label: 'Command Line Reference', | ||
id: 'docs/commands', | ||
}, | ||
{ | ||
type: 'doc', | ||
label: 'New Contributor Guide', | ||
id: 'CONTRIBUTING', | ||
}, | ||
{ | ||
type: 'doc', | ||
label: 'Code of Conduct', | ||
id: 'CODE_OF_CONDUCT', | ||
}, | ||
], | ||
} | ||
|
||
module.exports = sidebars | ||
|
Oops, something went wrong.