Skip to content

Commit

Permalink
Updated the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Fischer committed Mar 19, 2019
1 parent 7989441 commit 8b31a5f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ As a sub project, NitroNet was extended to be used in the WCMS [Sitecore](http:/
## Future roadmap
[Please look at the milestones regarding the features and time frames of future releases.](https://github.com/namics/NitroNet/milestones)

**Important features planned for 2018:**
- Auto generation of model classes [(done, needs review)](https://github.com/namics/NitroNet/tree/feature/%2320-generate-jsonschema-model-classes)
**Important features planned in the near future:**
- [Auto generation of model classes](https://github.com/namics/NitroNet/issues/20)
- Alternative to the underlying Veil parser?
- Youtube tutorial videos
- Demo solution/integration -> [here](https://github.com/namics/NitroNet.Demo) (almost done)
- Extending the documentation
- File system can be more flexible

## Contact / Contributing
If you want to submit a bug or request a feature please feel free to open an issue.
Expand Down
18 changes: 10 additions & 8 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,34 +84,36 @@ Explanation to the individual settings/properties:
* **filters**: File paths which match with the `filters` regex are being ignored

### *Optional:* Add and register your own custom helpers
As mentioned before NitroNet comes with support for the [Nitro](https://github.com/namics/generator-nitro/) custom handlebars helpers by default.
As mentioned before, NitroNet comes with support for the [Nitro](https://github.com/namics/generator-nitro/) custom handlebars helpers by default.

But you can add your own helpers as well. You can achieve this by doing the following steps (the instructions are shown using the Unity IoC framework):

1.) Create your own helpers by implementing the `Veil.Helper.IHelperHandler`. See the classes in `NitroNet.ViewEngine.TemplateHandler` for reference.

2.) Create your own implementation of the `Veil.Helper.IHelperHandlerFactory`. You can take the `NitroNet.ViewEngine.TemplateHandler.DefaultRenderingHelperHandlerFactory` as a basis for your code.
2) Inherit from the existing `NitroNet.ViewEngine.TemplateHandler.DefaultRenderingHelperHandlerFactory`. Then you can add your own helpers like this:

```csharp
public class YourOwnHelperHandlerFactory : IHelperHandlerFactory
public class YourOwnHelperHandlerFactory : DefaultRenderingHelperHandlerFactory
{
public IEnumerable<IHelperHandler> Create()
{
//your own helpers
{
var helpers = base.Create().ToList();

helpers.Add(new CacheBusterHandler());
helpers.Add(new ContextLanguageHandler());
return helpers;
}
}
}
```

3.) Register your implementation of `IHelperHandlerFactory` to your IoC container. The following example is for Unity and is added to the `RegisterTypes()` method in the `UnityConfig` class:

```csharp
container.RegisterType<IHelperHandlerFactory, YourOwnHelperHandlerFactory>(new ContainerControlledLifetimeManager());

```

after the following line:


```csharp
new DefaultUnityModule(basePath).Configure(container);
```
4 changes: 2 additions & 2 deletions docs/releases/1.1.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- Documentation update
- Updated Roadmap
- Fixes in the `nitronet-config.json.example`
- General documentation enhancements

### Fixed Issues
- A *NullReferenceException* was frequently thrown when developing locally. This was due to the `_fileInfoCache` in `NitroNet.ViewEngine/IO/FileSystem.cs` being reset before the new fileInfo was read from disk (which could take 2-3 minutes in large projects) - PR [25](https://github.com/namics/NitroNet/pull/25), thanks [Mark Lowe](https://github.com/lowedown) for this contribution.
- NuGet.exe was updated to v4.5.1
- A *NullReferenceException* was frequently thrown when developing locally. This was due to the `_fileInfoCache` in `NitroNet.ViewEngine/IO/FileSystem.cs` being reset before the new fileInfo was read from disk (which could take 2-3 minutes in large projects) - PR [25](https://github.com/namics/NitroNet/pull/25), thanks [Mark Lowe](https://github.com/lowedown) for this contribution.

0 comments on commit 8b31a5f

Please sign in to comment.