Skip to content

Commit 075aeeb

Browse files
committed
Fixes for docs
1 parent 2b0051d commit 075aeeb

File tree

15 files changed

+105
-141
lines changed

15 files changed

+105
-141
lines changed

conf.json

+28
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,34 @@
2929
"node_modules/bson/lib/bson/min_key.js"
3030
]
3131
},
32+
"templates": {
33+
"cleverLinks": true,
34+
"monospaceLinks": true,
35+
"default": {
36+
"outputSourceFiles" : true
37+
},
38+
"applicationName": "Node.js MongoDB Driver API",
39+
"disqus": true,
40+
"googleAnalytics": "UA-29229787-1",
41+
"openGraph": {
42+
"title": "",
43+
"type": "website",
44+
"image": "",
45+
"site_name": "",
46+
"url": ""
47+
},
48+
"meta": {
49+
"title": "",
50+
"description": "",
51+
"keyword": ""
52+
},
53+
"linenums": true
54+
},
55+
"markdown": {
56+
"parser": "gfm",
57+
"hardwrap": true,
58+
"tags": ["examples"]
59+
},
3260
"examples": {
3361
"indent": 4
3462
}

docs/content/community/contributing.md

+26-38
Original file line numberDiff line numberDiff line change
@@ -12,56 +12,44 @@ title: Contributing to Hugo
1212
weight: 30
1313
---
1414

15-
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
16-
or contact [spf13](http://spf13.com) about what may make sense
17-
to do next.
15+
To contribute to the project *we encourage pull requests allowing for discussion of code changes.*
1816

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

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

22-
When you're ready to create a pull request, be sure to:
21+
* 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.
22+
* Ensure you run the tests. `node test/runner.js -t functional`
23+
* 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.
2324

24-
* Have test cases for the new code. If you have questions about how to do it, please ask in your pull request.
25-
* Run `go fmt`
26-
* Squash your commits into a single commit. `git rebase -i`. It's okay to force update your pull request.
27-
* 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.
25+
## Contribution Steps
2826

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

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

37+
## Clone repository locally
4038

41-
# Building from source
39+
git clone https://github.com/mongodb/node-mongodb-native
40+
cd node-mongodb-native
41+
npm install
4242

43-
## Clone locally (for contributors):
43+
## Running The Test Suite
4444

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

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

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

56-
## Running Hugo
51+
node test/runner.js -t functional -e replicaset
5752

58-
cd /path/to/hugo
59-
go install github.com/spf13/hugo/hugo
60-
go run main.go
61-
62-
## Building Hugo
63-
64-
cd /path/to/hugo
65-
go build -o hugo main.go
66-
mv hugo /usr/local/bin/
53+
To run the sharded test suite do
6754

55+
node test/runner.js -t functional -e sharded

docs/content/community/mailing-list.md

+5-16
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,19 @@ title: Mailing List
99
weight: 10
1010
---
1111

12-
Hugo has two mailing lists:
13-
14-
## Announcements
15-
Very low traffic. Only releases will be emailed here.
16-
17-
https://groups.google.com/forum/#!forum/hugo-announce
12+
The Node.js MongoDB driver has one main Mailing list.
1813

1914
## Discussion
2015
For all questions and discussions:
2116

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

2419
# Other Resources
2520

26-
## GoNuts
27-
28-
For general Go questions or discussion please refer to the Go mailing list.
29-
30-
https://groups.google.com/forum/#!forum/golang-nuts
31-
32-
## GitHub Issues
21+
## Issues
3322

34-
https://github.com/spf13/hugo/issues
23+
https://jira.mongodb.org/browse/NODE
3524

3625
## Twitter
3726

38-
Hugo doesn't have its own Twitter handle, but feel free to tweet [@spf13](http://twitter.com/spf13).
27+
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).

docs/content/community/press.md

-65
This file was deleted.

docs/content/tutorials/aggregation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ menu:
88
next: /overview/introduction
99
prev: /overview/introduction
1010
title: Aggregation
11-
weight: 20
11+
weight: 5
1212
---
1313
querying.md

docs/content/tutorials/connecting.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ menu:
88
next: /overview/introduction
99
prev: /overview/introduction
1010
title: Connecting To MongoDB
11-
weight: 20
11+
weight: 1
1212
---
1313
querying.md

docs/content/tutorials/crud_operations.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ menu:
88
next: /overview/introduction
99
prev: /overview/introduction
1010
title: CRUD Operations
11-
weight: 20
11+
weight: 3
1212
---
1313
querying.md

docs/content/tutorials/gridfs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ menu:
88
next: /overview/introduction
99
prev: /overview/introduction
1010
title: GridFS
11-
weight: 20
11+
weight: 7
1212
---
1313
querying.md

docs/content/tutorials/querying.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ menu:
88
next: /overview/introduction
99
prev: /overview/introduction
1010
title: Querying
11-
weight: 20
11+
weight: 4
1212
---
1313
querying.md

docs/content/tutorials/streams.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ menu:
88
next: /overview/introduction
99
prev: /overview/introduction
1010
title: Streams
11-
weight: 20
11+
weight: 6
1212
---
1313
querying.md

docs/content/tutorials/urls.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ menu:
88
next: /overview/introduction
99
prev: /overview/introduction
1010
title: Connection URI
11-
weight: 20
11+
weight: 2
1212
---
1313
querying.md

docs/jsdoc-template/tmpl/layout.tmpl

+21-12
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,15 @@
3434
<?js } ?>
3535

3636
<?js if (env.conf.templates.googleAnalytics) { ?>
37-
<script type="text/javascript">
38-
var _gaq = _gaq || [];
39-
_gaq.push(['_setAccount', config.googleAnalytics]);
40-
_gaq.push(['_trackPageview']);
41-
42-
(function() {
43-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
44-
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
45-
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
46-
})();
47-
</script>
37+
<script>
38+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
39+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
40+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
41+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
42+
43+
ga('create', <?js= env.conf.templates.googleAnalytics ?>, 'auto');
44+
ga('send', 'pageview');
45+
</script>
4846
<?js } ?>
4947
</head>
5048
<body>
@@ -59,8 +57,19 @@
5957
<?js if (env.conf.templates.disqus) { ?>
6058
<!-- disqus code -->
6159
<div id="disqus_thread"></div>
60+
<script type="text/javascript">
61+
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
62+
var disqus_shortname = 'nodejsmongodbdriver'; // required: replace example with your forum shortname
63+
64+
/* * * DON'T EDIT BELOW THIS LINE * * */
65+
(function() {
66+
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
67+
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
68+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
69+
})();
70+
</script>
6271
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
63-
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
72+
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
6473
<!-- // disqus code -->
6574
<?js } ?>
6675

docs/layouts/api-docs/single.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ <h1 class="nav top-menu"> {{.Title}} </h1>
5050
{{ partial "menu.html" . }}
5151

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

5656
<div class="row">

docs/layouts/partials/footer.html

+15
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
1+
<!-- disqus code -->
2+
<div id="disqus_thread"></div>
3+
<script type="text/javascript">
4+
/* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
5+
var disqus_shortname = 'nodejsmongodbdriver'; // required: replace example with your forum shortname
16

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

docs/layouts/partials/menu.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
{{end}}
3030
</li>
3131
{{end}}
32-
<li> <a href="https://github.com/spf13/hugo/issues" target="blank"><i class='fa fa-life-ring'></i>Issues & Help</a> </li>
32+
<li> <a href="https://jira.mongodb.org/browse/NODE" target="blank"><i class='fa fa-life-ring'></i>Issues & Help</a> </li>
3333
{{ if .IsPage }}
34-
{{ $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}}
34+
{{ $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}}
3535
{{ end }}
3636
</ul>
3737
<!-- sidebar menu end-->

0 commit comments

Comments
 (0)