generated from errata-ai/Hugo
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
137 additions
and
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Hugo.zip | ||
MDX.zip | ||
/testdata/styles | ||
|
||
# Binaries for programs and plugins | ||
|
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
[formats] | ||
mdx = md | ||
|
||
[*.mdx] | ||
CommentDelimiters = {/*, */} | ||
|
||
# Exclude: | ||
# | ||
# `import ...`, `export ...` | ||
# `<Component ... />` | ||
# `<Component>...</Component>` | ||
# `{ ... }` | ||
TokenIgnores = (?sm)((?:import|export) .+?$), \ | ||
(<[A-Z]+ ?.+ ?\/>), \ | ||
(<[A-Z]\w+>.+?<\/[A-Z]\w+>) | ||
|
||
# Exclude: | ||
# | ||
# `<Component \n ... />` | ||
BlockIgnores = (?sm)^(<\w+\n .*\s\/>)$, \ | ||
(?sm)^({.+\n.*}) |
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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Hugo | ||
# MDX | ||
|
||
A Vale configuration for Hugo-generated static sites. | ||
A Vale configuration for sites using [MDX][1]. | ||
|
||
## Testing | ||
|
||
``` | ||
$ make test | ||
``` | ||
|
||
[1]: https://mdxjs.com |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
StylesPath = styles | ||
|
||
Packages = ../Hugo.zip | ||
Packages = ../MDX.zip | ||
|
||
[*.md] | ||
[*.mdx] | ||
BasedOnStyles = Vale |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,56 @@ | ||
# Hello, world! | ||
|
||
`import {External} from './some/place.js'` | ||
`import {Chart} from './chart.js'` | ||
`import population from './population.js'` | ||
|
||
`export const pi = 3.14` | ||
`export const Local = properties => <span style={{color: 'red'}} {...properties} />` | ||
|
||
`<Chart data={population} label={'Something with ' + pi} />` | ||
|
||
An `<External>external</External>` component and a `<Local>local one</Local>`. | ||
|
||
<div className="note"> | ||
> Some notable things in a block quote! | ||
</div> | ||
`<Welcome name="Venus" />` | ||
`<Welcome name="Mars" />` | ||
|
||
`<MyComponent id="123" />` | ||
|
||
You can also use objects with components, such as the `thisOne` component on | ||
the `myComponents` object: <myComponents.thisOne /> | ||
|
||
|
||
``` | ||
<Component | ||
open | ||
x={1} | ||
label={'this is a string, *not* markdown!'} | ||
icon={`<Icon />`} | ||
/> | ||
``` | ||
|
||
|
||
Two 🍰 is: {Math.PI * 2} | ||
|
||
|
||
``` | ||
{(function () { | ||
const guess = Math.random() | ||
if (guess > 0.66) { | ||
return <span style={{color: 'tomato'}}>Look at us.</span> | ||
} | ||
if (guess > 0.33) { | ||
return <span style={{color: 'violet'}}>Who would have guessed?!</span> | ||
} | ||
return <span style={{color: 'goldenrod'}}>Not me.</span> | ||
})()} | ||
``` | ||
|
||
|
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,47 @@ | ||
# Hello, world! | ||
|
||
import {External} from './some/place.js' | ||
import {Chart} from './chart.js' | ||
import population from './population.js' | ||
|
||
export const pi = 3.14 | ||
export const Local = properties => <span style={{color: 'red'}} {...properties} /> | ||
|
||
<Chart data={population} label={'Something with ' + pi} /> | ||
|
||
An <External>external</External> component and a <Local>local one</Local>. | ||
|
||
<div className="note"> | ||
> Some notable things in a block quote! | ||
</div> | ||
<Welcome name="Venus" /> | ||
<Welcome name="Mars" /> | ||
|
||
<MyComponent id="123" /> | ||
|
||
You can also use objects with components, such as the `thisOne` component on | ||
the `myComponents` object: <myComponents.thisOne /> | ||
|
||
<Component | ||
open | ||
x={1} | ||
label={'this is a string, *not* markdown!'} | ||
icon={<Icon />} | ||
/> | ||
|
||
Two 🍰 is: {Math.PI * 2} | ||
|
||
{(function () { | ||
const guess = Math.random() | ||
|
||
if (guess > 0.66) { | ||
return <span style={{color: 'tomato'}}>Look at us.</span> | ||
} | ||
|
||
if (guess > 0.33) { | ||
return <span style={{color: 'violet'}}>Who would have guessed?!</span> | ||
} | ||
|
||
return <span style={{color: 'goldenrod'}}>Not me.</span> | ||
})()} |