Skip to content

Commit

Permalink
Fixes for docs
Browse files Browse the repository at this point in the history
  • Loading branch information
christkv committed Sep 16, 2014
1 parent 2b0051d commit 075aeeb
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 141 deletions.
28 changes: 28 additions & 0 deletions conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,34 @@
"node_modules/bson/lib/bson/min_key.js"
]
},
"templates": {
"cleverLinks": true,
"monospaceLinks": true,
"default": {
"outputSourceFiles" : true
},
"applicationName": "Node.js MongoDB Driver API",
"disqus": true,
"googleAnalytics": "UA-29229787-1",
"openGraph": {
"title": "",
"type": "website",
"image": "",
"site_name": "",
"url": ""
},
"meta": {
"title": "",
"description": "",
"keyword": ""
},
"linenums": true
},
"markdown": {
"parser": "gfm",
"hardwrap": true,
"tags": ["examples"]
},
"examples": {
"indent": 4
}
Expand Down
64 changes: 26 additions & 38 deletions docs/content/community/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,56 +12,44 @@ title: Contributing to Hugo
weight: 30
---

All contributions to Hugo are welcome. Whether you want to scratch an itch, or simply contribute to the project, feel free to pick something from the roadmap
or contact [spf13](http://spf13.com) about what may make sense
to do next.
To contribute to the project *we encourage pull requests allowing for discussion of code changes.*

You should fork the project and make your changes. *We encourage pull requests to discuss code changes.*
## Contributing

When you are ready to send us a pull request make sure you perform the following steps first.

When you're ready to create a pull request, be sure to:
* Ensure you have at least one test case that covers the new code. If you are wondering how to do this please feel free to ask in the pull request for help.
* Ensure you run the tests. `node test/runner.js -t functional`
* Squash all your commits into a single commit. `git rebase -i`. You can force update your pull request as history for it is not important for us to keep.

* Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
* Run `go fmt`
* Squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request.
* Make sure `go test ./...` passes, and `go build` completes. Our Travis CI loop will catch most things that are missing. The exception: Windows. We run on Windows from time to time, but if you have access, please check on a Windows machine too.
## Contribution Steps

## Contribution Overview
1. Fork the Node.js driver from https://github.com/mongodb/node-mongodb-native
2. Create a new feature branch (`git checkout -b feature`)
3. Commit your changes using git (`git commit -a -m 'My changes'`)
4. Run tests suite (ensure mongodb is in path) (`node test/runner.js -t functional`)
5. Squash the commits (`git rebase -i`)
6. Push the new branch to your github fork (`git push origin feature`)
7. Create a new Pull Request on github.

1. Fork Hugo from https://github.com/spf13/hugo
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Commit passing tests to validate changes.
5. Run `go fmt`
6. Squash commits into a single (or logically grouped) commits (`git rebase -i`)
7. Push to the branch (`git push origin my-new-feature`)
8. Create new Pull Request
# Running Tests

## Clone repository locally

# Building from source
git clone https://github.com/mongodb/node-mongodb-native
cd node-mongodb-native
npm install

## Clone locally (for contributors):
## Running The Test Suite

git clone https://github.com/spf13/hugo
cd hugo
go get
Make sure the *mongod* executable is in your shell or command line *path*. Then run the functional test suite.

Because Go expects all of your libraries to be found in either
$GOROOT or $GOPATH, it's helpful to symlink the project to one
of the following paths:
node test/runner.js -t functional

* ln -s /path/to/your/hugo $GOPATH/src/github.com/spf13/hugo
* ln -s /path/to/your/hugo $GOROOT/src/pkg/github.com/spf13/hugo
To run the replicaset test suite do

## Running Hugo
node test/runner.js -t functional -e replicaset

cd /path/to/hugo
go install github.com/spf13/hugo/hugo
go run main.go

## Building Hugo

cd /path/to/hugo
go build -o hugo main.go
mv hugo /usr/local/bin/
To run the sharded test suite do

node test/runner.js -t functional -e sharded
21 changes: 5 additions & 16 deletions docs/content/community/mailing-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,19 @@ title: Mailing List
weight: 10
---

Hugo has two mailing lists:

## Announcements
Very low traffic. Only releases will be emailed here.

https://groups.google.com/forum/#!forum/hugo-announce
The Node.js MongoDB driver has one main Mailing list.

## Discussion
For all questions and discussions:

https://groups.google.com/forum/#!forum/hugo-discuss
https://groups.google.com/forum/#!forum/node-mongodb-native

# Other Resources

## GoNuts

For general Go questions or discussion please refer to the Go mailing list.

https://groups.google.com/forum/#!forum/golang-nuts

## GitHub Issues
## Issues

https://github.com/spf13/hugo/issues
https://jira.mongodb.org/browse/NODE

## Twitter

Hugo doesn't have its own Twitter handle, but feel free to tweet [@spf13](http://twitter.com/spf13).
The Node.js driver doesn't have its own Twitter handle, but feel free to tweet it's main developer at [@christkv](http://twitter.com/christkv).
65 changes: 0 additions & 65 deletions docs/content/community/press.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/content/tutorials/aggregation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ menu:
next: /overview/introduction
prev: /overview/introduction
title: Aggregation
weight: 20
weight: 5
---
querying.md
2 changes: 1 addition & 1 deletion docs/content/tutorials/connecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ menu:
next: /overview/introduction
prev: /overview/introduction
title: Connecting To MongoDB
weight: 20
weight: 1
---
querying.md
2 changes: 1 addition & 1 deletion docs/content/tutorials/crud_operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ menu:
next: /overview/introduction
prev: /overview/introduction
title: CRUD Operations
weight: 20
weight: 3
---
querying.md
2 changes: 1 addition & 1 deletion docs/content/tutorials/gridfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ menu:
next: /overview/introduction
prev: /overview/introduction
title: GridFS
weight: 20
weight: 7
---
querying.md
2 changes: 1 addition & 1 deletion docs/content/tutorials/querying.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ menu:
next: /overview/introduction
prev: /overview/introduction
title: Querying
weight: 20
weight: 4
---
querying.md
2 changes: 1 addition & 1 deletion docs/content/tutorials/streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ menu:
next: /overview/introduction
prev: /overview/introduction
title: Streams
weight: 20
weight: 6
---
querying.md
2 changes: 1 addition & 1 deletion docs/content/tutorials/urls.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ menu:
next: /overview/introduction
prev: /overview/introduction
title: Connection URI
weight: 20
weight: 2
---
querying.md
33 changes: 21 additions & 12 deletions docs/jsdoc-template/tmpl/layout.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,15 @@
<?js } ?>

<?js if (env.conf.templates.googleAnalytics) { ?>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', config.googleAnalytics]);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

ga('create', <?js= env.conf.templates.googleAnalytics ?>, 'auto');
ga('send', 'pageview');
</script>
<?js } ?>
</head>
<body>
Expand All @@ -59,8 +57,19 @@
<?js if (env.conf.templates.disqus) { ?>
<!-- disqus code -->
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'nodejsmongodbdriver'; // required: replace example with your forum shortname

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<!-- // disqus code -->
<?js } ?>

Expand Down
2 changes: 1 addition & 1 deletion docs/layouts/api-docs/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1 class="nav top-menu"> {{.Title}} </h1>
{{ partial "menu.html" . }}

<!--main content start-->
<section id="main-content" style="margin-left:75px">
<section id="main-content" style="margin-left:150px">
<section class="wrapper">

<div class="row">
Expand Down
15 changes: 15 additions & 0 deletions docs/layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<!-- disqus code -->
<div id="disqus_thread"></div>
<script type="text/javascript">
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
var disqus_shortname = 'nodejsmongodbdriver'; // required: replace example with your forum shortname

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
<!-- // disqus code -->
</div>
</section>
</div>
Expand Down
4 changes: 2 additions & 2 deletions docs/layouts/partials/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
{{end}}
</li>
{{end}}
<li> <a href="https://github.com/spf13/hugo/issues" target="blank"><i class='fa fa-life-ring'></i>Issues & Help</a> </li>
<li> <a href="https://jira.mongodb.org/browse/NODE" target="blank"><i class='fa fa-life-ring'></i>Issues & Help</a> </li>
{{ if .IsPage }}
{{ $File := .File }} {{with $File.FileName }}<li><a href="https://github.com/spf13/hugo/edit/master/docs/content/{{ $File.Dir }}{{ $File.FileName }}" target="blank"><i class='fa fa-edit'></i> Refine this Page</a> </li>{{end}}
{{ $File := .File }} {{with $File.FileName }}<li><a href="https://github.com/mongodb/node-mongodb-native/docs/content/{{ $File.Dir }}{{ $File.FileName }}" target="blank"><i class='fa fa-edit'></i> Refine this Page</a> </li>{{end}}
{{ end }}
</ul>
<!-- sidebar menu end-->
Expand Down

0 comments on commit 075aeeb

Please sign in to comment.