Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#13: prepare documentation #41

Merged
merged 14 commits into from
Sep 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 25 additions & 16 deletions JabberNet.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JabberNet.Netlib.Dns", "Jab
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{BBF059F0-722F-4DCC-AF7F-82054E8EF9F4}"
ProjectSection(SolutionItems) = preProject
Scripts\Build-Docs.ps1 = Scripts\Build-Docs.ps1
Scripts\Package.ps1 = Scripts\Package.ps1
Scripts\Push-Package.ps1 = Scripts\Push-Package.ps1
EndProjectSection
Expand All @@ -27,27 +28,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.travis.yml = .travis.yml
appveyor.yml = appveyor.yml
Licensing.md = Licensing.md
packages.config = packages.config
Readme.md = Readme.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{608EAD0E-6217-4700-B9C1-01488F8B5701}"
ProjectSection(SolutionItems) = preProject
docs\FAQ.md = docs\FAQ.md
docs\FAQ_GoogleTalk.md = docs\FAQ_GoogleTalk.md
docs\FAQ_License.md = docs\FAQ_License.md
docs\FAQ_More.md = docs\FAQ_More.md
docs\FAQ_Packets.md = docs\FAQ_Packets.md
docs\FAQ_Register.md = docs\FAQ_Register.md
docs\FAQ_Roster.md = docs\FAQ_Roster.md
docs\FAQ_UntrustedRootOK.md = docs\FAQ_UntrustedRootOK.md
docs\FAQ_Where.md = docs\FAQ_Where.md
docs\GettingStarted.md = docs\GettingStarted.md
docs\howto.md = docs\howto.md
docs\namespaces.md = docs\namespaces.md
docs\philosophies.md = docs\philosophies.md
docs\SendMessage.md = docs\SendMessage.md
docs\SocketErrors.md = docs\SocketErrors.md
docs\generate.fsx = docs\generate.fsx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "licenses", "licenses", "{F5D434F5-6D42-4491-85B3-6169D2F15BAE}"
Expand All @@ -57,6 +43,27 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "licenses", "licenses", "{F5
licenses\xpnet_MIT.txt = licenses\xpnet_MIT.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{48441DC4-91E5-4E2D-B2C3-10DCBFAB33E3}"
ProjectSection(SolutionItems) = preProject
docs\content\FAQ.md = docs\content\FAQ.md
docs\content\FAQ_GoogleTalk.md = docs\content\FAQ_GoogleTalk.md
docs\content\FAQ_More.md = docs\content\FAQ_More.md
docs\content\FAQ_Packets.md = docs\content\FAQ_Packets.md
docs\content\FAQ_Register.md = docs\content\FAQ_Register.md
docs\content\FAQ_UntrustedRootOK.md = docs\content\FAQ_UntrustedRootOK.md
docs\content\FAQ_Where.md = docs\content\FAQ_Where.md
docs\content\howto.md = docs\content\howto.md
docs\content\index.md = docs\content\index.md
docs\content\licensing.md = docs\content\licensing.md
docs\content\SendMessage.md = docs\content\SendMessage.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "templates", "templates", "{E6F7B01B-A762-4833-ABDF-3662E63AC63B}"
ProjectSection(SolutionItems) = preProject
docs\templates\namespaces.cshtml = docs\templates\namespaces.cshtml
docs\templates\template.cshtml = docs\templates\template.cshtml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -95,5 +102,7 @@ Global
{BBF059F0-722F-4DCC-AF7F-82054E8EF9F4} = {2C25C63F-7C2F-4025-8A4D-B85ABF2C8A34}
{608EAD0E-6217-4700-B9C1-01488F8B5701} = {2C25C63F-7C2F-4025-8A4D-B85ABF2C8A34}
{F5D434F5-6D42-4491-85B3-6169D2F15BAE} = {2C25C63F-7C2F-4025-8A4D-B85ABF2C8A34}
{48441DC4-91E5-4E2D-B2C3-10DCBFAB33E3} = {608EAD0E-6217-4700-B9C1-01488F8B5701}
{E6F7B01B-A762-4833-ABDF-3662E63AC63B} = {608EAD0E-6217-4700-B9C1-01488F8B5701}
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion Licensing.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ license. See the full license text at [licenses/xpnet_MIT.txt][xpnet-mit].

[bedrock-net-certutil]: https://github.com/ForNeVeR/Jabber-Net/blob/develop/bedrock/net/CertUtil.cs
[gplv2]: http://www.fsf.org/licensing/licenses/info/GPLv2.html
[header-sample]: https://github.com/ForNeVeR/Jabber-Net/blob/develop/ConsoleClient/Main.cs#L1-L13
[header-sample]: https://github.com/ForNeVeR/Jabber-Net/blob/71e48fbaf4e4408e44734861c8ce1d436aeee2a4/JabberNet.ConsoleClient/Main.cs#L1-L13
[josl]: http://archive.jabber.org/core/JOSL.pdf
[netlib-dns]: https://github.com/ForNeVeR/Jabber-Net/tree/develop/netlib.Dns
[stringprep-unicode]: https://github.com/ForNeVeR/Jabber-Net/tree/develop/stringprep/unicode
Expand Down
21 changes: 20 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,29 @@ $ xbuild /p:Configuration=Debug jabber-net.sln
$ mono ./packages/NUnit.ConsoleRunner.3.4.1/tools/nunit3-console.exe ./test/bin5/Debug/test.dll
```

Documentation
-------------

The documentation is placed in the `docs` directory. To build HTML
documentation, invoke the following commands (PowerShell syntax):

```powershell
$env:JABBER_NET_ROOT = 'https://fornever.github.io/Jabber-Net'
$fsi = 'C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Fsi.exe'
Remove-Item -Recurse .\docs\output
& $fsi docs\generate.fsx
docs\output\index.html
```

There's a convenience script `Scripts/Build-Docs.ps1` for that.

You may then publish the `docs/output` directory through a Web server, or just
read the documentation from your local drive.

Packaging
---------

To build [NuGet][nuget] package for Jabber.Net, use the script
To build [NuGet][nuget] package for Jabber-Net, use the script
`Scripts/Package.ps1`. If you want to push this package to the Nuget feed, use
`Scripts/Push-Package.ps1`.

Expand Down
11 changes: 11 additions & 0 deletions Scripts/Build-Docs.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
param (
$fsi = 'C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Fsi.exe',
$Root = 'https://fornever.github.io/Jabber-Net',
$Output = "$PSScriptRoot/../../Jabber-Net_docs"
)

$localOutput = "$PSScriptRoot/../docs/output"
$env:JABBER_NET_ROOT = $Root
Remove-Item -Recurse $localOutput
& $fsi docs\generate.fsx
Copy-Item -Recurse -Force "$localOutput/*" $Output
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ build:
project: JabberNet.sln
after_test:
- ps: ./Scripts/Package.ps1
- ps: |
$fsi = 'C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\Fsi.exe'
& $fsi docs\generate.fsx
45 changes: 0 additions & 45 deletions docs/FAQ_License.md

This file was deleted.

7 changes: 0 additions & 7 deletions docs/FAQ_More.md

This file was deleted.

8 changes: 0 additions & 8 deletions docs/FAQ_Roster.md

This file was deleted.

29 changes: 0 additions & 29 deletions docs/FAQ_Where.md

This file was deleted.

40 changes: 0 additions & 40 deletions docs/GettingStarted.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/SocketErrors.md

This file was deleted.

3 changes: 1 addition & 2 deletions docs/FAQ.md → docs/content/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
**Frequently-Asked Questions about Jabber-Net**

* [How come I get a certificate error?](./FAQ_UntrustedRootOK.md)
* [How do I modify the roster?](./FAQ_Roster.md)
* [How do I add my own packet types?](./FAQ_Packets.md)
* [How do I register a new user?](./FAQ_Register.md)
* [How do I find out more information?](./FAQ_More.md)
* [Where do I find Jabber-Net?](./FAQ_Where.md)
* [How is Jabber-Net licensed?](./FAQ_License.md)
* [How is Jabber-Net licensed?](./licensing.md)
* [How do I connect to GoogleTalk?](./FAQ_GoogleTalk.md)
23 changes: 11 additions & 12 deletions docs/FAQ_GoogleTalk.md → docs/content/FAQ_GoogleTalk.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
**How to connect to GoogleTalk**
How to connect to GoogleTalk
============================

TODO: This section is outdated; needs to be updated.

Introduction
============
------------

There are two use cases for connecting to GoogleTalk. In the first, you have
your email address is @gmail.com. The second is Gmail for domains. The first is
Expand Down Expand Up @@ -54,7 +57,7 @@ _xmpp-client._tcp.gmail.com SRV service location:
```

gmail.com JIDs
==============
--------------

* If you're on Windows, and on a late-model version of Jabber-Net, it should
"just work".
Expand All @@ -74,17 +77,15 @@ jc.NetworkHost = "talk.l.google.com"; // Note: that's an "L", not a "1".
```

Google for Domains
==================
------------------

Turn on Chat
------------
### Turn on Chat

From your mail page, go to "Manage this domain", then "Chat", then make sure it
says "Disable Chat" at the bottom. You obviously must be an administrator of
your domain to do this.

DNS
---
### DNS

If you have your own domain hosted on Google Mail, you can use the XMPP service
for that domain as well. For everything to work correctly, you'll need the
Expand All @@ -104,8 +105,7 @@ If you just want to get up and running quickly, don't put in the SRV records,
and set the `NetworkHost` property to "talk.l.google.com". (Note that they used
an "L", not a "1").

Certificates
------------
### Certificates

The certificate that comes on the SSL/TLS handshake will be invalid, in that the
name will not match your domain. The best way to deal with this is to catch the
Expand All @@ -131,8 +131,7 @@ The concern here is that there is a man in the middle of your conversation with
Google, that is offering you a certificate with a bad name, signed by a
Certificate Authority that you trust. Take appropriate security precautions.

Connections
-----------
### Connections

Now, continue along as above, for gmail.com addresses, but use *your* domain
name instead of gmail.com:
Expand Down
8 changes: 8 additions & 0 deletions docs/content/FAQ_More.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Where do I get more information about Jabber-Net?
=================================================

Join the [codingteam](xmpp:codingteam@conference.jabber.ru) XMPP conference or
contact the maintainer through [email](friedrich@fornever.me).

If you have found an issue in the code, please file it
[here](https://github.com/ForNeVeR/Jabber-Net/issues).
5 changes: 4 additions & 1 deletion docs/FAQ_Packets.md → docs/content/FAQ_Packets.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
**How do I add my own packet types?**
How do I add my own packet types?
=================================

(thanks to Tom Waters for the genesis for this)

TODO: This section is outdated; needs to be updated.

Say you want to use a new packet type like this:

```xml
Expand Down
3 changes: 2 additions & 1 deletion docs/FAQ_Register.md → docs/content/FAQ_Register.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**How do I register a new user?**
How do I register a new user?
=============================

For background, see [XEP-0077](http://www.xmpp.org/extensions/xep-0077.html).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**How come I get a certificate error?**
How come I get a certificate error?
===================================

In Mono, you get this error:

Expand All @@ -14,6 +15,5 @@ certificate problem (preferred), or set:
bedrock.net.AsyncSocket.UntrustedRootOK = true;
```

UntrustedRootOK is now obsolete in the head of subversion. The default behavior
is to pop up an ugly dialog box to allow the certificate. If you want to build a
better dialog box, catch OnIvalidCertificate.
`UntrustedRootOK` is now obsolete in the main development branch. If you want to
handle the error with your own code, please handle `OnIvalidCertificate` event.
Loading