Skip to content

Commit

Permalink
New docs structure
Browse files Browse the repository at this point in the history
  • Loading branch information
thewebartisan7 committed Oct 30, 2022
1 parent b0e4e0c commit 9a89c02
Show file tree
Hide file tree
Showing 35 changed files with 14 additions and 2,287 deletions.
2 changes: 1 addition & 1 deletion .clintonrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tmp/**",
"src/**",
"lib/**",
"examples/**",
"docs-src/**",
"docs/**",
".idea/**",
"*.{html,jpg}",
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
node_modules
coverage
examples
docs-src
docs
test
.gitignore
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 4 additions & 6 deletions examples/index.js → docs-src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,13 @@ const markdownItToc = require('markdown-it-toc-done-right');
// const {render} = require('posthtml-render');
// const hljs = require('highlight.js');

const src = './examples/src/pages/';
const dist = './examples/dist/';
const md = './examples/src/md';
const docs = './docs/';
const src = './docs-src/pages/';
const dist = './docs/';
const md = './docs-src/md';

const plugins = [
components({
root: './examples/src',
root: './docs-src',
folders: ['components', 'layouts'],
strict: true,
expressions: {
Expand Down Expand Up @@ -74,7 +73,6 @@ readdirSync(src).forEach(file => {
.process(html, options)
.then(result => {
writeFileSync(path.resolve(`${dist}${file}`), result.html, 'utf-8');
writeFileSync(path.resolve(`${docs}${file}`), result.html, 'utf-8');
});
});

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ This is where your content will be injected.

In next section you can find all available options and then more examples.

See also the `examples` folder. You can run `npm run build-examples` to compile them.
See also the `docs-src` folder. You can run `npm run build` to compile them.

## Options

Expand Down Expand Up @@ -752,7 +752,7 @@ You can add custom rules how attributes are parsed, as behind the scene it's use
## Examples

You can work with `<slot>` and `<fill>` or you can create component for each "block" of your component, and you can also support both of them.
You can find an example of this inside `examples/components/modal`. Below is a short explanation about the both approach.
You can find an example of this inside `docs-src/components/modal`. Below is a short explanation about the both approach.

### Using slots

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ <h2 id="basic-example" tabindex="-1">
<p>In next section you can find all available options and then more examples.</p>
<p>
See also the
<code>examples</code>
<code>docs-src</code>
folder. You can run
<code>npm run build-examples</code>
<code>npm run build</code>
to compile them.
</p>
<h2 id="options" tabindex="-1">
Expand Down Expand Up @@ -1231,7 +1231,7 @@ <h2 id="examples" tabindex="-1">
<code>&lt;fill&gt;</code>
or you can create component for each &quot;block&quot; of your component, and you can also support both of them.
You can find an example of this inside
<code>examples/components/modal</code>
<code>docs-src/components/modal</code>
. Below is a short explanation about the both approach.
</p>
<h3 id="using-slots" tabindex="-1">
Expand Down
180 changes: 0 additions & 180 deletions examples/dist/demo.html

This file was deleted.

Loading

0 comments on commit 9a89c02

Please sign in to comment.