Skip to content

Commit 65af21a

Browse files
authored
Merge branch 'main' into add-alias-commands
2 parents 518b90d + 2bb4003 commit 65af21a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1491
-2437
lines changed

packages/example/content/docs/examples.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,13 @@ Second Tab Three
7575
</tab>
7676

7777
</toggle>
78+
79+
## Skip code with hash
80+
81+
```cli
82+
$ gto assign cv-class --version v0.1.13 --stage dev
83+
Created git tag 'cv-class#dev#1' that assigns stage to version 'v0.1.13'
84+
To push the changes upstream, run:
85+
git push origin cv-class#dev#1 #this is a comment
86+
#This is a comment
87+
```
Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,39 @@
11
import React from 'react'
2-
import { Link } from 'gatsby'
2+
import cn from 'classnames'
3+
import { PageProps } from 'gatsby'
4+
import MainLayout from '@dvcorg/gatsby-theme-iterative/src/components/MainLayout'
5+
import Link from '@dvcorg/gatsby-theme-iterative/src/components/Link'
36

4-
export default function Home() {
7+
export default function Home({ location }: PageProps) {
58
return (
6-
<div>
7-
<h1>Gatsby Theme: Iterative</h1>
8-
<p>
9-
Welcome to the documentation and example website for Iterative&apos;s
10-
website engine!
11-
</p>
12-
<p>
13-
This theme is primarily related to adding a documentation engine, which
14-
you can see <Link to="/doc">here!</Link>
15-
</p>
16-
</div>
9+
<MainLayout location={location}>
10+
<div
11+
className={cn(
12+
'container',
13+
'mx-auto',
14+
'mt-14',
15+
'px-4',
16+
'py-14',
17+
'flex',
18+
'flex-col',
19+
'justify-center',
20+
'items-center'
21+
)}
22+
>
23+
<h1 className={cn('text-2xl', 'font-bold', 'text-center', 'mb-5')}>
24+
Gatsby Theme: Iterative
25+
</h1>
26+
<section className="text-lg">
27+
<p>
28+
Welcome to the documentation and example website for
29+
Iterative&apos;s website engine!
30+
</p>
31+
<p>
32+
This theme is primarily related to adding a documentation engine,
33+
which you can see <Link href="/doc">here!</Link>
34+
</p>
35+
</section>
36+
</div>
37+
</MainLayout>
1738
)
1839
}
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
1+
const themeConfig = require('@dvcorg/gatsby-theme-iterative/tailwind.config')
2+
13
module.exports = {
2-
content: ['./src/**/*.{js,jsx,ts,tsx}'],
4+
...themeConfig,
5+
content: [...themeConfig.content, './src/**/*'],
36
theme: {
4-
extend: {}
5-
},
6-
plugins: []
7+
...themeConfig.theme,
8+
fontFamily: {
9+
sans: ['Tahoma', 'Arial', 'sans-serif'],
10+
mono: ['Consolas', '"Liberation Mono"', 'Menlo', 'Courier', 'monospace']
11+
}
12+
}
713
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const path = require('path')
2+
module.exports = {
3+
glossaryPath: path.resolve('content', 'docs', 'user-guide', 'basic-concepts'),
4+
docsPath: path.resolve('content', 'docs'),
5+
glossaryInstanceName: 'iterative-glossary',
6+
docsInstanceName: 'iterative-docs',
7+
argsLinkerPath: ['command-reference', `ref`, 'cli-reference']
8+
}

packages/gatsby-theme-iterative/config/postcss/media.d.ts

Lines changed: 0 additions & 2 deletions
This file was deleted.

packages/gatsby-theme-iterative/config/postcss/media.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/gatsby-theme-iterative/config/postcss/mixins.js

Lines changed: 0 additions & 115 deletions
This file was deleted.

packages/gatsby-theme-iterative/config/prismjs/dvc.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ Prism.languages.cli = {
7676
...bash
7777
}
7878
},
79-
comment: bash.comment
79+
comment: {
80+
pattern: /(^|[\s^"{\\$])#.*/,
81+
lookbehind: true
82+
}
8083
}
8184

8285
Prism.languages.dvc = Prism.languages.cli

packages/gatsby-theme-iterative/createPages.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ const GithubSlugger = require('github-slugger')
33
const slugger = new GithubSlugger()
44
const SLUG_REGEXP = /\s+{#([a-z0-9-]*[a-z0-9]+)}\s*$/
55

6+
const path = require('path')
7+
68
const extractSlugFromTitle = title => {
79
// extracts expressions like {#too-many-files} from the end of a title
810
const meta = title.match(SLUG_REGEXP)
@@ -34,7 +36,7 @@ const parseHeadings = text => {
3436

3537
const createPages = async (
3638
{ graphql, actions },
37-
{ defaultTemplate, getTemplate, disable }
39+
{ defaultTemplate, getTemplate, disable, docsPrefix }
3840
) => {
3941
if (disable) return
4042
const docsResponse = await graphql(
@@ -73,14 +75,13 @@ const createPages = async (
7375
} = doc
7476
const headings = parseHeadings(rawMarkdownBody)
7577

76-
if (slug) {
78+
if (slug !== undefined) {
7779
actions.createPage({
7880
component: getTemplate(template, defaultTemplate),
79-
path: slug,
81+
path: path.posix.join(docsPrefix, slug),
8082
context: {
8183
id,
8284
slug,
83-
isDocs: true,
8485
headings
8586
}
8687
})

packages/gatsby-theme-iterative/gatsby-browser.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)