Giter Club home page Giter Club logo

phonegap-docs's Introduction

PhoneGap Documentation Travis Badge

Available for your viewing pleasure at docs.phonegap.com.

Installation

npm install

Running Local Server

npm start

This will start a local server in development mode. The server will generate all of the documentation to /out and watch for file changes. When a file is changed, BrowserSync will regenerate the file and refresh your browser.

Running markdownlint

Running markdownlint will return a list of syntax errors that should be fixed before deployment.

npm run lint

Tests

Requirements

A running ruby environment is a must, along with a working gem command. Ensure you have the bundle command available by installing bundler, then also retrieve all test-running dependencies via bundle install:

gem install bundler
bundle install

Running Tests

The tests check the generated documentation, so ensure you are either running the local server or have manually generated the documentation via a npm run build before running the tests!

npm run test

Named Anchors

If you want to use in-page navigation you should use named anchors, and not the id property of html elements.

* [A link to a different place in the page](#different-place)

<a name="different-place" class="anchor"></a>

Directory Structure

\
 phonegap-docs/
 |
 |__ assets/      # Assets that need to be rendered
 |   |
 |   |__ styles/  # Stylus files rendered to /out/styles/**/*.css
 |
 |__ docs/        # Markdown documents rendered to /out/**/*.html
 |
 |__ drafts/      # ???
 |
 |__ layouts/     # Layouts and view templates
 |
 |__ out/         # Outputted static website
 |
 |__ public/      # Static assets copied to /out/**/*
 |
 |__ scripts/     # ???
 |
 |__ spec/        # Tests?
 |
 |__ vendor/      # ???
 |
 |__ docpad.json  # Configuration

Deployment

Production

Each commit to the master branch is deployed to docs.phonegap.com.

Staging

Each commit to the stage branch is deployed to stage.docs.phonegap.com.

Commits to master do not need to be staged. Staging is intended to test work that may cause issues in production, in particular design focused changes. For this reason, the stage branch is mutable. Feel free to delete it or force push over its history.

FAQ

Generator error from the "next" article returning a null object.

You may see an error such as :

error: Something went wrong while rendering: /Users/mwbrooks/Development/lib/phonegap-docs/docs/tutorials/optimize/index.html.pug
The error follows:

TypeError: /Users/mwbrooks/Development/lib/phonegap-docs/layouts/tutorialspage.html.pug:21
    19|       .prev &nbsp;
    20|     -if(document.next)
  > 21|       - var next = getCollection("html").findOne({url:document.next}).toJSON();
    22|       a.page__navigation--next(href=next.url)!= "Next: "+next.title
    23|     -else
    24|       .prev &nbsp;

Cannot read property 'toJSON' of null

This is because you are linking directly to the HTML document instead of it's clean URL directory path. Our generator uses the Clean URL plugin, which transforms each file.html into file/index.html. The original file.html continues to exist but will redirect to file/index.html.

When referencing a file, you should reference path/to/file instead of path/to/file.html. Referencing the HTML document will generate the error above.

phonegap-docs's People

Contributors

agrieve avatar alharding avatar alunny avatar becka11y avatar brianleroux avatar brycecurtis avatar cfjedimaster avatar cmarcelk avatar devicewall avatar filmaj avatar garthdb avatar goya avatar hermwong avatar hollyschinsky avatar imhotep avatar infil00p avatar jcesarmobile avatar keiko713 avatar keitam avatar macdonst avatar maverickmishra avatar mike-sierra avatar mmocny avatar mwbrooks avatar purplecabbage avatar shazron avatar sintaxi avatar stevengill avatar surajpindoria avatar timkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phonegap-docs's Issues

Add Tabbed Navigation for Getting Started

Problem

The Getting Started guides are broken into multiple scenarios:

  • OS X or Windows
  • CLI or Desktop
  • Android or iOS or Windows Phone

Solution

We can either break these out into separate articles or we can provide a dynamic tabbed navigation.

I'm happy with either solution as long as it's straight-forward for the user and supports perma-linking.

Refactor the documentation and generator

As it stands, the PhoneGap Documentation is adding very little value, since it's a mirror of the Cordova documentation. When Cordova was first donated to Apache, this made sense. However, now that Cordova is maturing as a product and defining it's boundaries, the PhoneGap Documentation must adapt.

This is a large over-arching issue that can be broken down as we tackle. The short list is to refactor the documentation, so that we can properly reference Cordova and set the stage for more useful PhoneGap documentation.

Add PhoneGap-Specific Template Assets

Currently, the only approach is to replace the existing assets. This is effective but makes upgrading the documentation tedious because Cordova also updates the assets.

Add a PhoneGap-specific directory that can override the default template assets.

localhost:3000 loads endlessly

git clone ...
cd phonegap-docs/
npm install
npm start

Opens my browser to localhost:3000 but never loads the page. However, I can manually access Docpad's served content from locahost:9778.

This seems to be an issue with BrowserSync. We'd like to use the library if possible, so let's look into this issue a little more.

Clean output before a build

Problem

By default, DocPad persists the outPath directory between builds. This means deleted files are persisted and included in new builds.

Docs Styles Wish List

  1. Callouts (shaded text or otherwise marked) for notes, warnings and tips with a sidebar color / title or icon.

    Reference ideas:

  2. Panels for Examples - a titled boxed border with a space for a screenshot and example code
    Reference ideas:

  3. Code highlighting by language except for terminal (see Joni’s original mock-up).

  4. Button styles for Prev / Next (float left / right in a shape that looks like an arrow or otherwise)

  5. Highlight the current section of the article in the sidebar navigation when scrolling thru content

Add tabs at the page level

This request is based on the IA design requirement to allow for us to break down a page into different instructions by tab either due to tool or platform.

For example: Writing a Plugin would have tabs for iOS, Android and Windows.

Phonegap CLI doc missing replaced with cordova cli docs

Phonegap CLI docs available on 3.2 but not available on latest 3.4

Talks about phonegap (i.e. phonegap local build)
http://docs.phonegap.com/en/3.2.0/guide_cli_index.md.html#The%20Command-Line%20Interface

Talks about cordova
http://docs.phonegap.com/en/3.4.0/guide_cli_index.md.html#The%20Command-Line%20Interface

We have some folks confuse that phonegap cli is not longer supported and people suggesting to uninstall phonegap and install cordova.
http://stackoverflow.com/questions/23190127/what-happen-to-phonegap-3-4-3-3-command-line-interface

Allow sidebar to scroll

The Tutorials sidebar has enough items that it requires some scrolling if we keep this as the main point of navigation.

Unpublish content not included in first release

Problem

The current docs include a lot of great content. However, we do not plan to publish most of these articles on our first release. As the content is reviewed and polished, then we can release it.

We do not want to lose this content. We simply want to avoid including it in the production site.

Articles to consider

  • Tutorials/Configure Guides
  • Tutorials/Develop Guides
  • Tutorials/Optimize Guides
  • Tutorials/Distribute Guides

Solution

I see a few possible solutions:

  1. Create a branch to backup the existing articles.
  2. Move existing articles into a folder that is not rendered and published
  3. Add a YAML Frontmatter option to flag drafts. published: false or draft: true.

Add HTML Proofer Support

Add HTML Proofer tests to the #44 rewrite branch.

If anyone knows of a node.js version of HTML Proofer, please let me know!

3.4.0 docs are in need of update

PhoneGap docs list Apache as the copyright holder and Cordova as the platform under discussion.

many parts to this issue, tracking them here:

config_ref/images.md
config_ref/index.md

Critical Updates for PhoneGap Documentation

While most of the Cordova documentation is relevant to PhoneGap, there are a few areas that must be updated.

Let's list those areas here and update the generator to correct the references.

Note: this is meant to be a short-term solution. Shortly, the documentation structure and generator will be refactored.

3.2.0 docs incomplete

  1. The index page (http://docs.phonegap.com/en/3.2.0/index.html) has a reference to "The Command Line Interface" but there's no link. On the other hand, the Overview page (http://docs.phonegap.com/en/3.2.0/guide_overview_index.md.html#Overview) does have a link to that page, and it works.
  2. On "The Command Line Interface" (http://docs.phonegap.com/en/3.2.0/guide_cli_index.md.html#The%20Command-line%20Interface), there's no mention of how to add a platform to your project. So
  3. When I create an app, the www/config.xml file has entries like and gap:splash. But the "Icons and Splash Screens" page (http://docs.phonegap.com/en/3.2.0/config_ref_images.md.html#Icons%20and%20Splash%20Screens) makes no mention of these. Neither do the "Android Configuration" or "iOS Configuration" pages.

Add PhoneGap-Specific Documentation

We need to add the ability to inject PhoneGap specific documentation.

Since Apache Cordova will be implementing a new documentation generator soon, we do not want to spend too much time engineering a solution. Something quick and dirty should suffice.

Code Snippets

Code highlighting by language except for terminal (see Joni’s original mock-up).

Breaking up #47

Add another level to side navigation

It would be great if we could add one more level of navigation to be possible from the left side menu so the content can be broken down one step further in certain cases. This 3rd level could be collapsed initially to save screen real estate and expandable from an icon.

See this document for details of content hierarchy: https://docs.google.com/document/d/1jb5Ts6tvVt-W3mIWmSrjz8DkF73ODs2a4pBN055FM6w

This new addition would allow the Getting Started-->PhoneGap CLI-->Install/Create/Run level for instance.

Database: undocumented changeVersion signature

http://docs.phonegap.com/en/edge/cordova_storage_storage.md.html#Database

1 - The changeVersion is almost NOT documented and explained in day-by-day usage
2 - the changeVersion has a differente signature call like this

db.changeVersion(oldversion, newversion, alterfunc, errorfunc, successfunc)

I learn from this blog post [http://www.raymondcamden.com/index.cfm/2013/8/14/Updating-PhoneGap-Databases] that apple website is more well documented about this method

See http://developer.apple.com/library/safari/documentation/iphone/conceptual/safarijsdatabaseguide/UsingtheJavascriptDatabase/UsingtheJavascriptDatabase.html#//apple_ref/doc/uid/TP40007256-CH3-XSW1

Quality of your doc is growing every day, please keep it growing, and update this one !
Thanks for all of your work

geolocation Android wrong path

In documention 3.1 feature "android-package" refer to "org.apache.cordova.GeoBroker" instead of "org.apache.cordova.geolocation.GeoBroker";

Rebrand Theme to PhoneGap

This is minor task to update the theme's Apache Cordova reference to PhoneGap.

We will hold off on updating the visual theme to match phonegap.com until later.

Add support for clean URLs

Clean URLs allow: path/to/file.md and path/to/file.html to become path/to/file/. This is accomplished by creating path/to/file/index.html.

Using a clean url makes referencing the documents a lot nicer, since we can drop the extension.

Review iOS Getting Started Documentation

On Twitter, Lee Marrett reported that the iOS Getting Started Documentation cannot be followed step-by-step.

This could be due to differences in the PhoneGap and Apache Cordova distribution or simply that the documentation is incomplete or out-of-date.

@shazron can you review the PhoneGap documentation using the PhoneGap binary. If you discover the issue is with Apache Cordova, then we can create a JIRA issue and reference it here for tracking purposes.

Remove homepage link from sidebar

Problem

The top of the sidebar navigation includes a link to the homepage. Previously, it was Docs Home and now it's PhoneGap Documentation.

Unless there is a reason to include this, it would be nice to have it removed. The top-left Adobe PhoneGap logo also links to the homepage, so users can still navigate back.

screen shot 2015-05-11 at 2 41 56 pm

[minor] items that scroll in mobile, have a different background color when hidden area is revealed

Environment:

Mobile Safari
iOS 8.2
iPhone 6 Plus

Steps to repro:

  1. Go to the route "/guides/create" (in staging)
  2. Find the first scrollable code snippet
  3. Swipe it to the left to scroll the area

Expected result:

The hidden scrollable area, when revealed, is the same color as the displayed scrollable area

Actual result:

The hidden scrollable area, when revealed, is a different color from the displayed scrollable area

Screenshot

img_5729

Do navigation headers have landing pages?

Problem

When you click on a navigation header such as Getting Started then you are taken to a page such as:

http://stage.docs.phonegap.com/getting-started

The page itself has very little content, because there are articles that describe the section in detail.

Solutions

Let's wait until the navigation is more fleshed out because it may define a simple solution. Otherwise, we can tackle it in this issue.

Device screenshot images too big for content

The sizing of the device images is too large for the docs content if left at full size.

screen shot 2015-05-06 at 11 16 48 am

Below is a screenshot from an Android Nexus 6 device using basic image markdown:
screen shot 2015-04-28 at 6 10 39 am

And a screenshot from an iPhone 6 device in the content using basic image markdown:
screen shot 2015-04-28 at 6 12 22 am

However, here's how a desktop screenshot image appears
screen shot 2015-04-28 at 6 13 38 am

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.