Skip to content

Commit 19eceb4

Browse files
committed
Merge WIP from pre-launch branch
- Style updates - Updates and fixes for the Copilot guide
1 parent 758ae02 commit 19eceb4

File tree

5 files changed

+116
-56
lines changed

5 files changed

+116
-56
lines changed

docs/how-to/use-with-continue.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
title: Use CodeGate with Continue
33
description: Configure the Continue IDE plugin
4-
sidebar_position: 110
4+
sidebar_label: Integrate with Continue
5+
sidebar_position: 100
56
---
67

78
import Tabs from '@theme/Tabs';

docs/how-to/use-with-copilot.mdx

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
22
title: Use CodeGate with GitHub Copilot
33
description: Configure the Copilot IDE plugin
4-
sidebar_position: 100
4+
sidebar_label: Integrate with GitHub Copilot
5+
sidebar_position: 110
56
---
67

7-
import Tabs from '@theme/Tabs';
8-
import TabItem from '@theme/TabItem';
8+
import Tabs from "@theme/Tabs";
9+
import TabItem from "@theme/TabItem";
910

1011
[GitHub Copilot](https://github.com/features/copilot) is an AI coding assistant
1112
developed by GitHub and OpenAI. The Copilot plugin works with Visual Studio Code
@@ -59,6 +60,15 @@ more information about mapping a volume.
5960
Add CodeGate's generated CA certificate to your system's trust store. The
6061
certificate file is located at `certs/ca.crt` within your CodeGate data volume.
6162

63+
:::note
64+
65+
Wait 20-30 seconds for the CodeGate container to finish initializing before
66+
starting this step. If you receive an error about reading the certificate file,
67+
wait a few seconds and try again. If this persists, check the CodeGate container
68+
logs for errors.
69+
70+
:::
71+
6272
<Tabs groupId="os">
6373
<TabItem value="macos" label="macOS" default>
6474
Run the following command from a terminal:
@@ -98,21 +108,28 @@ sudo update-ca-trust
98108
</TabItem>
99109
</Tabs>
100110

101-
If you customized the local path to your CodeGate persistent volume, replace
102-
`./codegate_volume/` in the command with your path.
111+
If you used a different local path for your CodeGate persistent volume, replace
112+
`./codegate_volume/` in the above command with your actual path.
103113

104114
## Configure your IDE to proxy traffic through CodeGate
105115

106116
Finally, configure your IDE to use CodeGate as an HTTP proxy.
107117

108118
<Tabs groupId="ide">
109119
<TabItem value="vscode" label="VS Code" default>
110-
Open your VS Code user settings file using the **Preferences: Open User Settings (JSON)**
111-
command in the Command Palette (`⇧⌘P` or `Ctrl+Shift+P`) and add the following
112-
settings:
120+
Open your VS Code user settings file. To do this, open the Command Pallet
121+
(<kbd>⌘</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> on macOS or
122+
<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> on Windows/Linux) and search for
123+
the **Preferences: Open User Settings (JSON)** command.
124+
125+
Append the following settings to your configuration:
113126

114127
```json title="settings.json"
115128
{
129+
// ... Existing settings ... //
130+
131+
// Note: you may need to add a comma after the last line of your existing settings if not already present
132+
116133
"http.proxy": "https://localhost:8990",
117134
"http.proxyStrictSSL": true,
118135
"http.proxySupport": "on",
@@ -137,12 +154,15 @@ Coming soon!
137154

138155
## Verify configuration
139156

140-
To verify that you've successfully connected Copilot to CodeGate, open the
141-
Copilot chat and type `codegate-version`. You should receive a response like
142-
this:
157+
To verify that CodeGate is receiving Copilot traffic as expected, open the
158+
Copilot chat and type `What do you know about CodeGate?`. You should receive a
159+
response that starts like this:
143160

144161
```plan
145-
Codegate version: 0.1.0
162+
CodeGate is a security-focused AI assistant designed to help with software
163+
security, package analysis, and providing guidance on secure coding practices.
164+
165+
...
146166
```
147167

148168
Try asking CodeGate about a known malicious Python package:

docusaurus.config.ts

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const config: Config = {
4444
docs: {
4545
routeBasePath: '/',
4646
sidebarPath: './sidebars.ts',
47-
// Please change this to your repo.
4847
// Remove this to remove the "edit this page" links.
4948
editUrl: 'https://github.com/stacklok/codegate-docs/tree/main/',
5049
},
@@ -118,9 +117,9 @@ const config: Config = {
118117
},
119118
{
120119
html: `<div style="display: flex; padding: 20px 0px;">
121-
<a href="https://youtube.com/@stacklok" target="_blank" class="navbar__item navbar__link header-youtube-link" style="padding-left: 0px;"></a>
122-
<a href="https://github.com/stacklok/codegate" target="_blank" class="navbar__item navbar__link header-github-link"></a>
123-
<a href="https://discord.gg/stacklok" target="_blank" class="navbar__item navbar__link header-discord-link"></a>
120+
<a href="https://youtube.com/@stacklok" target="_blank" class="footer__icon__custom navbar__link header-youtube-link" style="padding-left: 0px;"></a>
121+
<a href="https://github.com/stacklok/codegate" target="_blank" class="footer__icon__custom navbar__link header-github-link"></a>
122+
<a href="https://discord.gg/stacklok" target="_blank" class="footer__icon__custom navbar__link header-discord-link"></a>
124123
</div>`,
125124
},
126125
],
@@ -129,20 +128,16 @@ const config: Config = {
129128
title: 'Links',
130129
items: [
131130
{
132-
label: 'Stacklok',
133-
href: 'https://www.stacklok.com',
131+
html: '<a href="https://www.stacklok.com" target="_blank" class="navbar__link header-stacklok-link"">&nbsp;&nbsp;Stacklok</a>'
134132
},
135133
{
136-
label: 'YouTube',
137-
href: 'https://youtube.com/@stacklok',
134+
html: '<a href="https://youtube.com/@stacklok" target="_blank" class="navbar__link header-youtube-link"">&nbsp;&nbsp;YouTube</a>'
138135
},
139136
{
140-
label: 'GitHub',
141-
href: 'https://github.com/stacklok/codegate',
137+
html: '<a href="https://github.com/stacklok/codegate" target="_blank" class="navbar__link header-github-link">&nbsp;&nbsp;GitHub</a>'
142138
},
143139
{
144-
label: 'Discord',
145-
href: 'https://discord.gg/stacklok',
140+
html: '<a href="https://discord.gg/stacklok" target="_blank" class="navbar__link header-discord-link">&nbsp;&nbsp;Discord</a>'
146141
},
147142
],
148143
},
@@ -160,10 +155,10 @@ const config: Config = {
160155
],
161156
},
162157
],
163-
copyright: `<hr>
158+
copyright: `<hr style="margin: 24px 0px 40px;">
164159
<div style="display: flex;">
165160
<div>Copyright © ${new Date().getFullYear()} CodeGate, All Rights Reserved</div>
166-
<div style="margin-left: auto; text-transform: uppercase; font-size: 14px; font-weight: 600;">Powered by <img src="/img/stacklok-logo-black.svg" height="24px" style="vertical-align: middle; margin-left: 1rem;" /></div>
161+
<div style="margin-left: auto; text-transform: uppercase; font-size: 14px; font-weight: 600;">Powered by <img src="/img/stacklok-logo-black.svg" height="24px" style="margin-left: 1rem;" /></div>
167162
</div>`,
168163
},
169164
prism: {
@@ -175,17 +170,7 @@ const config: Config = {
175170
theme: { light: 'neutral', dark: 'dark' },
176171
options: {
177172
themeVariables: {
178-
/* fontFamily: 'Inter, system-ui, sans-serif',
179-
primaryColor: '#026598',
180-
background: '#111827',
181-
darkMode: true,
182-
secondaryColor: '#0383c6',
183-
primaryTextColor: '#d1d5db',
184-
primaryBorderColor: '#d1d5db',
185-
lineColor: '#d1d5db',
186-
edgeLabelBackground: '#111827',
187-
noteBkgColor: '#01476a',
188-
noteTextColor: '#d1d5db', */
173+
fontFamily: 'Figtree, system-ui, sans-serif'
189174
},
190175
},
191176
},

src/css/custom.css

Lines changed: 67 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* work well for content-centric websites.
55
*/
66

7-
@import url('https://fonts.googleapis.com/css2?family=Figtree&family=Roboto+Mono&display=swap');
7+
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap');
88

99
/* You can override the default Infima variables here. */
1010
:root {
@@ -17,6 +17,7 @@
1717
--ifm-footer-title-color: #64748B;
1818
--ifm-footer-link-color: #334155;
1919
--ifm-footer-link-hover-color: #5058ff;
20+
--ifm-navbar-link-color: #334155;
2021

2122
--ifm-color-primary: #5058ff;
2223
--ifm-color-primary-dark: #2f38ff;
@@ -56,6 +57,16 @@ div[role='tabpanel'] {
5657
box-shadow: var(--ifm-global-shadow-lw);
5758
}
5859

60+
.footer {
61+
padding: 20px 16px 40px;
62+
}
63+
64+
.footer .container {
65+
margin: auto;
66+
padding: 0;
67+
max-width: 1200px;
68+
}
69+
5970
.footer__title {
6071
text-transform: uppercase;
6172
}
@@ -68,30 +79,46 @@ div[role='tabpanel'] {
6879
}
6980

7081
.footer__item {
71-
font-size: 1rem;
82+
font-size: 16px;
83+
font-weight: 500;
84+
}
85+
86+
.footer__item:not(:last-child) {
87+
padding-bottom: 16px;
88+
}
89+
90+
.footer__icon__custom {
91+
padding: 0.25rem 12px;
92+
}
93+
94+
.footer__link-item {
95+
line-height: 24px;
96+
--ifm-link-hover-decoration: none;
7297
}
7398

7499
.footer__col:first-child {
75-
max-width: 370px;
100+
max-width: 400px;
76101
margin-right: auto;
77102
}
78103

79-
80104
.footer__col:last-child,
81105
.footer__col:nth-last-child(2) {
82-
max-width: 150px;
106+
max-width: 160px;
107+
margin-right: 0px;
83108
}
84109

85110
/**
86-
* Navbar icon classes
111+
* Navbar & footer icon classes
87112
*/
88113
.header-github-link::before {
89114
content: '';
90-
width: 24px;
91-
height: 24px;
92-
display: flex;
93-
background-color: var(--ifm-navbar-link-color);
115+
width: 16px;
116+
height: 16px;
117+
display: inline-block;
118+
vertical-align: middle;
119+
background-color: rgb(51, 65, 85);
94120
mask-image: url('/img/github-brands-solid.svg');
121+
mask-repeat: no-repeat;
95122
transition: background-color var(--ifm-transition-fast)
96123
var(--ifm-transition-timing-default);
97124
}
@@ -102,13 +129,15 @@ div[role='tabpanel'] {
102129

103130
.header-discord-link::before {
104131
content: '';
105-
width: 24px;
106-
height: 24px;
107-
display: flex;
108-
background-color: var(--ifm-navbar-link-color);
132+
width: 20px;
133+
height: 16px;
134+
display: inline-block;
135+
vertical-align: middle;
136+
background-color: rgb(51, 65, 85);
109137
mask-image: url('/img/discord-brands-solid.svg');
110138
mask-repeat: no-repeat;
111139
mask-position: 0% 50%;
140+
mask-repeat: no-repeat;
112141
transition: background-color var(--ifm-transition-fast)
113142
var(--ifm-transition-timing-default);
114143
}
@@ -119,16 +148,36 @@ div[role='tabpanel'] {
119148

120149
.header-youtube-link::before {
121150
content: '';
122-
width: 24px;
123-
height: 24px;
124-
display: flex;
125-
background-color: var(--ifm-navbar-link-color);
151+
width: 18px;
152+
height: 16px;
153+
display: inline-block;
154+
vertical-align: middle;
155+
background-color: rgb(51, 65, 85);
126156
mask-image: url('/img/youtube-brands-solid.svg');
127157
mask-position: 0% 50%;
158+
mask-repeat: no-repeat;
128159
transition: background-color var(--ifm-transition-fast)
129160
var(--ifm-transition-timing-default);
130161
}
131162

132163
.header-youtube-link:hover::before {
133164
background-color: var(--ifm-navbar-link-hover-color);
134165
}
166+
167+
.header-stacklok-link::before {
168+
content: '';
169+
width: 18px;
170+
height: 16px;
171+
display: inline-block;
172+
vertical-align: middle;
173+
background-color: rgb(51, 65, 85);
174+
mask-image: url('/img/stacklok-icon-black.svg');;
175+
mask-position: 0% 50%;
176+
mask-repeat: no-repeat;
177+
transition: background-color var(--ifm-transition-fast)
178+
var(--ifm-transition-timing-default);
179+
}
180+
181+
.header-stacklok-link:hover::before {
182+
background-color: var(--ifm-navbar-link-hover-color);
183+
}

static/img/stacklok-icon-black.svg

Lines changed: 5 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)