Contributing to Ionic docs site v2


#1

I have the ionic v2 docs locally. https://github.com/driftyco/ionic-site#local-build
I have changes I wish to propose, namely, https://github.com/driftyco/ionic/blob/2.0/ionic/decorators/page.ts#L38-L43

Since the app has already been bootstrapped with Ionic’s core directives, it
is not needed to include IONIC_DIRECTIVES in the directives property. Additionally,
Angular’s CORE_DIRECTIVES
and FORM_DIRECTIVES,
are also already provided, so you only need to supply any custom components and directives
to your pages:

The above statement isn’t true. Without doing import { FORM_DIRECTIVES } from 'angular2/common, I am slapped with a app.bundle.js:95 Uncaught ReferenceError: FORM_DIRECTIVES is not defined error in browser console.

Now to the actual question. How do I make changes to the ionic site documentations, if the actual documentation is in the source codes? Will that involve adding the change to Ionic source code so that it is propagated to docs, then I update my local build to reflect the change or how?

I’m new to contributing to this, so happy to be enlightened. I hope this was the right place to ask.

My system information:

Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Framework Version: 2.0.0-beta.6
Ionic CLI Version: 2.0.0-beta.25
Ionic App Lib Version: 2.0.0-beta.15
Node Version: v5.11.1


#2

I think you’re misunderstanding the docs. What it’s saying is that as long as you decorate something with @Page, you don’t have to worry at all about FORM_DIRECTIVES. The identifier FORM_DIRECTIVES need not ever appear in your code. You are apparently using it but not defining it. That’s not Ionic’s fault. Take all references to it out and your code should work fine.


#3

So if I get your point right, then it means what I did here is redundant?

https://github.com/seanmavley/ionic2-forms/blob/master/app/pages/hello-ionic/hello-ionic.js


#4

Yes, you don’t need to pass FORM_DIRECTIVES in directives since IONIC_DIRECTIVES is provided to all components (which includes FORM_DIRECTIVES) as of beta.5:

Here is the export for IONIC_DIRECTIVES:

https://github.com/driftyco/ionic/blob/2.0/ionic/config/directives.ts#L142-L145

To answer your question about contributing to the docs, check out our contributing file here: https://github.com/driftyco/ionic/blob/2.0/CONTRIBUTING.md

The section on Adding Documentation goes over the steps to modify the API docs and view the changes on the site locally.

Hope that helps! Please let me know if you have any questions or ways we can improve this documentation. :slight_smile: