Skip to content

Commit

Permalink
Add Github Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthoDingo committed Jul 29, 2024
1 parent 39ae71c commit ce4208d
Show file tree
Hide file tree
Showing 16 changed files with 233 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/gh-page.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Your GitHub workflow file under .github/workflows/
# Trigger the action on push to main
on:
push:
branches:
- main

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
actions: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
publish-docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Dotnet Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x

- run: dotnet tool update -g docfx
- run: docfx Net.VCards.Docs/docfx.json

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'Net.VCards.Docs/_site'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,7 @@ $RECYCLE.BIN/
*.msp

# Windows shortcuts
*.lnk
*.lnk

*/_site
*/api
47 changes: 47 additions & 0 deletions Net.VCards.Docs/docfx.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"metadata": [
{
"src": [
{
"src": "../Net.VCards",
"files": [
"**/*.csproj"
]
}
],
"dest": "api"
}
],
"build": {
"content": [
{
"files": [
"**/*.{md,yml}"
],
"exclude": [
"_site/**"
]
}
],
"resource": [
{
"files": [
"images/**"
]
}
],
"output": "_site",
"template": [
"default",
"modern"
],
"globalMetadata": {
"_appName": "Net.VCards",
"_appTitle": "docs/getting-started.md",
"_appLogoPath": "images/logo.png",
"_enableSearch": true,
"pdf": false
}
},
"redirect_url": ["/docs/introduction.html"]
}
23 changes: 23 additions & 0 deletions Net.VCards.Docs/docs/basic-usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Basic Usage

**Create a vCard**

```csharp
var vcard = new VCard
{
Version = VCardVersion.V4,
FormattedName = "John Doe",
FirstName = "John",
LastName = "Doe",
Classification = ClassificationType.Confidential,
Categories = new[] {"Friend", "Fella", "Amsterdam"},
//...
};
```
**Serialize a vCard and Save as a VCF File**

```
string serialized = vcard.Serialize();
string path = Path.Combine("C:\", "JohnDoe.vcf");
File.WriteAllText(path, serialized);
```
7 changes: 7 additions & 0 deletions Net.VCards.Docs/docs/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Getting Started

[Download Nuget Package](https://www.nuget.org/packages/FrApp42.Net.VCards)

```nuget
Install-Package FrApp42.Net.VCards
```
10 changes: 10 additions & 0 deletions Net.VCards.Docs/docs/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Introduction

Based on project [MixERP.Net.VCards](https://github.com/mixerp/MixERP.Net.VCards)


VCards is a standard-compliant, lightweight, and forgiving vCard parser written in C# which supports parsing and serializing vCards. The following versions are supported:

- [Version 2.1](/docs/version-2.1.html)
- [Version 3.0](/docs/version-3.html)
- [Version 4.0](/docs/version-4.html)
12 changes: 12 additions & 0 deletions Net.VCards.Docs/docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: Introduction
href: introduction.md
- name: Getting Started
href: getting-started.md
- name: Basic Usage
href: basic-usage.md
- name: Version 2.1
href: version-2.1.md
- name: Version 3
href: version-3.md
- name: Version 4
href: version-4.md
29 changes: 29 additions & 0 deletions Net.VCards.Docs/docs/version-2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Supported V2 Features:
For more info, please see the [specifications here](https://www.imc.org/pdi/vcard-21.txt)

- Formatted Name (`FN` string)
- Last Name (`N` string)
- First Name (`N` string)
- Middle Name (`N` string)
- Prefix (`N` string)
- Suffix (`N` string)
- BirthDay (`BDAY` string)
- Addresses (`ADR` complex enumerable)
- Delivery Address (`LABEL` complex)
- Telephones (`TEL` complex enumerable)
- Emails (`EMAIL` complex enumerable)
- Mailer (`MAILER` string)
- Title (`TITLE` string)
- Role (`ROLE` string)
- Time Zone (`TITLE` TimeZoneInfo)
- Logo (`LOGO` string, Base64 Encoded)
- Photo (`PHOTO` string, Base64 Encoded)
- Note (`NOTE` string)
- Last Revision (`REV` DateTime?)
- Url (`URL` Uri)
- Unique Identifier (`UID` string)
- Version (`VERSION` enum)
- Organization (`ORG` string)
- Organizational Unit (`ORG` string)
- Longitude (`GEO` double)
- Latitude (`GEO` double)
9 changes: 9 additions & 0 deletions Net.VCards.Docs/docs/version-3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Supported V3 Features:

For more info, please see the [RFC 2426 specifications here](https://www.ietf.org/rfc/rfc2426.txt)
- Nick Name (`NICKNAME` string)
- Categories (`CATEGORIES` string[])
- Sort String (`SORT-STRING` string)
- Sound (`SOUND` string, Base64 Encoded)
- Key (`KEY` string, Base64 Encoded)
- Classification (`CLASS` enum)
13 changes: 13 additions & 0 deletions Net.VCards.Docs/docs/version-4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Supported V4 Features:

For more info, please see the [RFC 6350 specifications here](https://www.ietf.org/rfc/rfc6350.txt)

- Source (`SOURCE` Uri)
- Kind (`KIND` enum)
- Anniversary (`ANNIVERSARY` DateTime?)
- Gender (`GENDER` enum)
- Impps (`IMPP` complex ienumerable)
- Languages (`LANG` complex enumerable)
- Relations (`RELATED` complex enumerable)
- Calendar User Addresses (`CALADRURI` Uri enumerable)
- Calendar Addresses (`CALURI` complex enumerable)
Binary file added Net.VCards.Docs/images/Logo Inversed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Net.VCards.Docs/images/logo.github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Net.VCards.Docs/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions Net.VCards.Docs/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions Net.VCards.Docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
_layout: landing
---

<meta http-equiv="refresh" content="0; url=docs/introduction.html" />

Net.VCards helps you easily create VCard.

It can be generate a single VC ard or multiple VCards in single request.
4 changes: 4 additions & 0 deletions Net.VCards.Docs/toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- name: Docs
href: docs/
- name: API
href: api/

0 comments on commit ce4208d

Please sign in to comment.