Skip to content

Commit

Permalink
Merge pull request #485 from rstudio/tn-update-examples
Browse files Browse the repository at this point in the history
Create documentation site
  • Loading branch information
colearendt authored Apr 2, 2024
2 parents 5fb2ad5 + 9423824 commit 564cd53
Show file tree
Hide file tree
Showing 130 changed files with 3,503 additions and 993 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ charts/**/charts/
/.cr-release-packages
bin/**
!bin/README.md

/.quarto/
_site/
_publish.yml

/.quarto/
42 changes: 42 additions & 0 deletions _extensions/posit-dev/posit-docs/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
title: posit-docs
author: Ashley Henry
version: 0.2.0
quarto-requred: ">=1.3.340"
contributes:
project:
project:
type: website
website:
title:
favicon: "assets/images/favicon.svg"
bread-crumbs: true
navbar:
pinned: true
logo: "assets/images/posit-icon-fullcolor.svg"
logo-alt: "Posit Documentation"
sidebar:
style: "floating"
collapse-level: 1
search: true
pinned: false
page-footer:
left:
- text: © 2024 Posit Software, PBC
url: "https://posit.co"
center: |
Posit Product 12345
right:
- icon: book
href: https://docs.posit.co
- icon: question-circle-fill
href: https://support.posit.co/hc/en-us
- icon: lightbulb-fill
href: https://solutions.posit.co
formats:
html:
theme: [theme.scss]
link-external-icon: true
link-external-newwindow: true
toc: true
toc-expand: true
21 changes: 21 additions & 0 deletions _extensions/posit-dev/posit-docs/assets/images/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
131 changes: 131 additions & 0 deletions _extensions/posit-dev/posit-docs/theme.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/*-- scss:defaults --*/

// import font
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

/*-- scss:variables --*/

// scss-docs-start color-variables
$posit-blue: #447099;
$posit-dark-blue-1: #305775;
$posit-dark-blue-2: #213D4F;
$posit-orange: #EE6331;
$posit-gray: #404041;
$posit-teal: #419599;
$posit-green: #72994E;
$posit-burgundy:#9A4665;
$posit-burgundy-1:#78384F;
$posit-burgundy-2:#542938;

$primary: $posit-blue;
// scss-docs-end color-variables

// Typography
// Font, line-height, and color for body text, headings, and more.

//scss-font-start font-variables
$font-family-sans-serif: "Open Sans", "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, system-ui;
$font-family-monospace: "Source Code Pro", monospace;
$font-family-emoji: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
$font-size-base: 1rem;
// scss-docs-end font-variables

$body-color: $posit-gray;

// scss-docs-start font-sizes
$h1-font-size:44px;
$h2-font-size:28px;

h1 {
size: $h1-font-size;
}
h2 {
size: $h2-font-size;
}
// scss-docs-end font-sizes


// Headings
// scss-docs-start headings-variables
$headings-font-weight: 300 !important;
// scss-docs-end headings-variables

// Customize the navbar
$navbar-bg: #ffffff;
$navbar-fg: #888888;
$navbar-hl: #000000;
$navbar-brand: $body-color;
$navbar-brand-hl: $navbar-brand;
//$navbar-brand-font-size: 14px !default;

// scss-docs-start list-group-variables
$list-group-color: $primary !default;
// scss-docs-end list-group-variables

// CSS overrides

.navbar {
box-shadow: 0 0 0.2rem #0000001a, 0 0.1rem 0.4rem #0003;
transition: transform .25s cubic-bezier(.1,.7,.1,1),box-shadow .25s;
}

.navbar-title {
font-family: $font-family-sans-serif;
font-size: $font-size-base;
font-weight: 500;
}

.nav-link {
font-family: $font-family-monospace;
text-transform: uppercase;
letter-spacing: .03em;
font-size: 14px !important;
font-weight: 500 !important;
}

.nav-footer {
font-family: $font-family-monospace;
text-transform: uppercase;
font-size: 14px;
border-top: solid #0000001a .01em;
align-items: center !important;
}

/* Tabs */

.nav-tabs .nav-link {
text-transform: none !important;
font-family: $font-family-sans-serif;
}

/* Mini TOC */
.sidebar nav[role=doc-toc]>ul li a {
text-transform: none !important;
font-family: $font-family-sans-serif;
font-size: 16px;
font-weight: 300 !important;
letter-spacing: .05em !important;
}

/* Left nav - letter spacing */
.sidebar-navigation li a {
letter-spacing: .03em;
font-size: 16px;
}


/* Posit logo - footer */
#footer-logo {
width: 70px;
min-width: 70px;
}

/* Footer */
.nav-footer .nav-footer-center {
min-height: min-content;
}

/* List disc colors */
li::marker {
color: $primary;
}
9 changes: 9 additions & 0 deletions _extensions/quarto-ext/include-code-files/_extension.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
title: Include Code Files
author: Bruno Beaufils
version: 1.0.0
quarto-required: ">=1.2"
contributes:
filters:
- include-code-files.lua


63 changes: 63 additions & 0 deletions _extensions/quarto-ext/include-code-files/include-code-files.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
--- include-code-files.lua – filter to include code from source files
---
--- Copyright: © 2020 Bruno BEAUFILS
--- License: MIT – see LICENSE file for details

--- Dedent a line
local function dedent (line, n)
return line:sub(1,n):gsub(" ","") .. line:sub(n+1)
end

--- Filter function for code blocks
local function transclude (cb)
if cb.attributes.include then
local content = ""
local fh = io.open(cb.attributes.include)
if not fh then
io.stderr:write("Cannot open file " .. cb.attributes.include .. " | Skipping includes\n")
else
local number = 1
local start = 1

-- change hyphenated attributes to PascalCase
for i,pascal in pairs({"startLine", "endLine"})
do
local hyphen = pascal:gsub("%u", "-%0"):lower()
if cb.attributes[hyphen] then
cb.attributes[pascal] = cb.attributes[hyphen]
cb.attributes[hyphen] = nil
end
end

if cb.attributes.startLine then
cb.attributes.startFrom = cb.attributes.startLine
start = tonumber(cb.attributes.startLine)
end
for line in fh:lines ("L")
do
if cb.attributes.dedent then
line = dedent(line, cb.attributes.dedent)
end
if number >= start then
if not cb.attributes.endLine or number <= tonumber(cb.attributes.endLine) then
content = content .. line
end
end
number = number + 1
end
fh:close()
end
-- remove key-value pair for used keys
cb.attributes.include = nil
cb.attributes.startLine = nil
cb.attributes.endLine = nil
cb.attributes.dedent = nil
-- return final code block
return pandoc.CodeBlock(content, cb.attr)
end
end

return {
{ CodeBlock = transclude }
}

71 changes: 71 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
project:
type: posit-docs
render:
- charts/rstudio-workbench/README.md
- charts/rstudio-workbench/NEWS.md
- charts/rstudio-connect/README.md
- charts/rstudio-connect/NEWS.md
- charts/rstudio-pm/README.md
- charts/rstudio-pm/NEWS.md
- charts/posit-chronicle/README.md
- charts/posit-chronicle/NEWS.md
- examples/auto-scaling/README.md
- examples/rbac/README.md
- examples/workbench/README.md
- examples/connect/README.md
- docs/customize.md
- "*.qmd"

filters:
- include-code-files

format:
posit-docs-html:
toc: true

website:
title: Posit Helm Charts
bread-crumbs: true
repo-url: https://github.com/rstudio/helm
repo-actions: [edit, issue]
page-footer:
center: Posit Helm Charts
sidebar:
style: "floating"
collapse-level: 1
search: true
pinned: false
contents:
- text: Overview
file: index.qmd
- section: "Posit Workbench"
contents:
- text: Overview
file: charts/rstudio-workbench/README.md
- text: Changelog
file: charts/rstudio-workbench/NEWS.md
- text: Examples
file: examples/workbench/index.qmd

- section: "Posit Connect"
contents:
- text: Overview
file: charts/rstudio-connect/README.md
- text: Changelog
file: charts/rstudio-connect/NEWS.md
- text: Examples
file: examples/connect/index.qmd
- section: "Posit Package Manager"
contents:
- text: Overview
file: charts/rstudio-pm/README.md
- text: Changelog
file: charts/rstudio-pm/NEWS.md
- text: Examples
file: examples/package-manager/index.qmd
- section: "Posit Chronicle"
contents:
- text: Overview
file: charts/posit-chronicle/README.md
- text: Changelog
file: charts/posit-chronicle/NEWS.md
Loading

0 comments on commit 564cd53

Please sign in to comment.