Skip to content

Commit

Permalink
Move docs from DocPress to VuePress
Browse files Browse the repository at this point in the history
Add CHANGELOG.md
Clean up package.json
Clean up .gitignore and .gitattributes
Fix a couple typos within the documentation
  • Loading branch information
Log1x committed May 12, 2019
1 parent a2a397f commit 541e6db
Show file tree
Hide file tree
Showing 20 changed files with 3,285 additions and 4,755 deletions.
1 change: 0 additions & 1 deletion .gitattributes
@@ -1,5 +1,4 @@
/.gitattributes export-ignore
/docs export-ignore
/package.json export-ignore
/webpack.mix.js export-ignore
/yarn.lock export-ignore
12 changes: 1 addition & 11 deletions .gitignore
@@ -1,13 +1,3 @@
# Vendor (e.g. Composer)
vendor
node_modules

# Documentation
_docpress
docs/dist

# Visual Studio
.vscode

# macOS
.DS_Store
docs/.vuepress/dist
95 changes: 95 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,95 @@
## v1.0.9 (05-12-2019)

### Enhancements
- Move docs from DocPress to VuePress (woo-hoo search!)
- Add CHANGELOG.md
- Clean up `package.json`
- Clean up `.gitignore` and `.gitattributes`

### Bug Fixes
- Fix various typo's within the documentation.

## v1.0.8 (05-03-2019)

### Enhancements
- Use a better method of getting Sage 10's Blade compiler.

### Bug Fixes
- Remove an unused `@asset` implementation that clashes with Sage 10.

## v1.0.7 (04-30-2019)

### Enhancements
- Add Sage 10 support 🎈
- `@sub` and `@hassub` can now accept a third parameter for deeper nested arrays (e.g. `@sub('images', 'sizes', 'thumbnail')`). (Fixes #12)
- New `@permalink`, `@categories`, `@category`, `@term`, `@role`, and `@endrole` directives.

### Bug Fixes
- Change `get()` to a protected function.
- Fix a few typos in the docs. (Fixes #13)

## v1.0.6 (03-02-2019)

### Enhancements
- Change namespace to `Log1x\SageDirectives`
- The project README was getting a little insane with the amount of Directives currently in the project. They now have a new home: https://log1x.github.io/sage-directives-docs/

### Bug Fixes
- Set `ignore_sticky_posts` to `true` when passing an array of post IDs/objects to `@posts`
- Properly return the collection array when passing post IDs/objects to `@posts`

## v1.0.5 (02-13-2019)

### Bug Fixes
- Change `is_number()` to `is_numeric()` (oops)
- Fix `@published` typo on README

## v1.0.4 (02-11-2019)

### Features
- Added 12+ new helper directives: `@istrue`, `@isfalse`, `@isnull`, `@isnotnull`, `@instanceof`, `@typeof`, `@repeat`, `@style`, `@script`, `@js`, `@inline`, `@fa`
- Added 6 new WordPress directives: `@author`, `@authorurl`, `@published`, `@modified`, `@wpautop`, `@wpautokp`
- Refactored `@posts` allowing it to accept post ID's, `WP_Post` instances, or an array with a combination of the two (#8)
- Refactored source code DocBlocks and formatting of directives
- Improved formatting and examples for documentation

### Bug Fixes
- Fix missing closing parenthesis in fields directive (#7)
- Added missing parameters to allow passing an array key to `@isfield`, `@issub`, and `@isoption`

### Breaking Change
- `@condition` has been replaced with `@istrue` / `@isfalse`

## v1.0.3 (01-30-2019)

### Bug Fixes
- Add a `function_exists()` check for `add_action()` to prevent issues in scenarios where WordPress core is not loaded (e.g. Composer).

## v1.0.2 (12-07-2018)

### Features
- Add usage documentation with examples.
- Allow `@posts` to accept a custom WP_Query instance as a variable as well as return the main loop if `$query` is undefined and no variable is passed. (Thanks to @mmirus on #1)
- Add `@title`, `@content`, and `@excerpt` WordPress directives.
- Allow `@option` to accept a second parameter to return a value in an array.

### Enhancements
- Clean up `@sub`, `@hassub`, and `@issub` (were mistakenly accepting unusable param's originally from `@field`).
- Clean up `@condition` syntax to be more uniform with the other directives.

### Bug Fixes
- Add missing `@isoption` directive.
- Fix `@options` param typo.

## v1.0.1 (10-29-2018)

### Enhancements
- Rewrite utility methods making use of `collect()` and allowing easier argument splitting.
- Refactor directives using new utility methods as well as allowing additional arguments to be passed for ACF directives such as post ID.
- Make directive source code more readable.
- Remove `@getsub`, `@getfield`, `@dump`, and `@console`.
- Various miscellaneous clean up.

## v1.0.0 (10-17-2018)

Initial release
14 changes: 8 additions & 6 deletions README.md
Expand Up @@ -4,27 +4,29 @@

Sage Directives is a simple Composer package adding a variety of useful Blade directives for use with Sage 9 including directives for WordPress, ACF, and various miscellaneous helpers.

## Getting Started

### Requirements
## Requirements

- [Sage](https://github.com/roots/sage) >= 9.0
- [PHP](https://secure.php.net/manual/en/install.php) >= 7.1.3
- [Composer](https://getcomposer.org/download/)

### Installation
## Installation

Install via Composer:

```sh
composer require log1x/sage-directives
```bash
$ composer require log1x/sage-directives
```

## Support

- [Documentation](https://log1x.github.io/sage-directives-docs/)
- [Discourse](https://discourse.roots.io/t/blade-directives-for-sage/14301)

## Bug Reports

If you discover a bug in Sage Directives, please [open an issue](https://github.com/log1x/sage-directives/issues).

## Contributing

Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated. When contributing code, please follow the existing directive format.
Expand Down
48 changes: 48 additions & 0 deletions docs/.vuepress/config.js
@@ -0,0 +1,48 @@
module.exports = {
title: 'Sage Directives',
description: 'Empower your Roots Sage workflow',
base: '/sage-directives-docs/',

head: [
[
"link",
{
href:
"https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,800,800i,900,900i",
rel: "stylesheet",
type: "text/css"
}
]
],

themeConfig: {
sidebarDepth: 2,

nav: [
{ text: 'Discourse', link: 'https://discourse.roots.io/' },
{ text: 'Changelog', link: 'https://github.com/log1x/sage-directives/blob/master/CHANGELOG.md' },
{ text: 'GitHub', link: 'https://github.com/log1x/sage-directives' }
],

sidebar: [
{
title: 'Getting Started',
collapsable: false,
children: ['installation'],
},
{
title: 'Usage',
collapsable: false,
children: prefix('usage', [
'wordpress',
'acf',
'helpers'
])
}
]
}
}

function prefix(prefix, children) {
return children.map(child => `${prefix}/${child}`);
}
1 change: 1 addition & 0 deletions docs/.vuepress/override.styl
@@ -0,0 +1 @@
$accentColor = #525ddc
26 changes: 26 additions & 0 deletions docs/.vuepress/style.styl
@@ -0,0 +1,26 @@
body
font-family: Nunito, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif

h1, h2, h3, h4, h5, h6
font-weight 300

.navbar .site-name
color: #525ddc
font-weight: 500
font-size: 1.1em

&::after
content: ' Documentation'
color: #999

.page
padding-left: 13rem

.sidebar
width: 13rem

.sidebar-heading
color: #999 !important
font-size: 0.8em
font-weight: 500
text-transform: uppercase
6 changes: 1 addition & 5 deletions docs/README.md
@@ -1,5 +1 @@
* [Sage Directives](../README.md)
* Usage
* [WordPress](usage/wordpress.md)
* [ACF](usage/acf.md)
* [Helpers](usage/helpers.md)
<meta http-equiv="refresh" content="0;url=/sage-directives-docs/installation.html" />
5 changes: 0 additions & 5 deletions docs/assets/styles/config/fonts.scss

This file was deleted.

45 changes: 0 additions & 45 deletions docs/assets/styles/config/mixins.scss

This file was deleted.

53 changes: 0 additions & 53 deletions docs/assets/styles/config/variables.scss

This file was deleted.

11 changes: 0 additions & 11 deletions docs/assets/styles/main.scss

This file was deleted.

0 comments on commit 541e6db

Please sign in to comment.