Skip to content

Commit

Permalink
add documentation pages
Browse files Browse the repository at this point in the history
Took 36 minutes
  • Loading branch information
fabio-ivona committed Nov 21, 2021
1 parent faa7213 commit 72dcb66
Show file tree
Hide file tree
Showing 26 changed files with 30,183 additions and 14 deletions.
23 changes: 13 additions & 10 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.php_cs.dist export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
/testbench.yaml export-ignore
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/docs export-ignore
/.editorconfig export-ignore
/.php-cs-fixer.dist.php export-ignore
/psalm.xml export-ignore
/psalm.xml.dist export-ignore
/phpstan.neon export-ignore
/phpunit.xml export-ignore
/testbench.yaml export-ignore
31 changes: 31 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy Docs

on:
push:
tags:
- v*

jobs:
docs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Setup node env
uses: actions/[email protected]
with:
node-version: 14

- name: Install dependencies
run: cd docs && yarn

- name: Generate
run: cd docs && yarn run generate

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/dist
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
build
composer.lock
coverage
docs
testbench.yaml
vendor
node_modules
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ All notable changes to `laravel-telegraph` will be documented in this file.

## Unreleased

- initial release
- added documentation pages
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# A laravel facade to interact with Telegram Bots
![Pest Laravel Expectations](https://banners.beyondco.de/Laravel%20Telegraph.png?theme=light&packageManager=composer+require&packageName=defstudio%2Flaravel-telegraph&pattern=architect&style=style_1&description=Telegram+bots+made+easy&md=1&showWatermark=1&fontSize=100px&images=phone-outgoing)

[![Latest Version on Packagist](https://img.shields.io/packagist/v/defstudio/laravel-telegraph.svg?style=flat-square)](https://packagist.org/packages/defstudio/laravel-telegraph)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/def-studio/laravel-telegraph/run-tests?label=tests)](https://github.com/def-studio/laravel-telegraph/actions?query=workflow%3Arun-tests+branch%3Amain)
Expand All @@ -7,7 +7,7 @@

---

**Telegraph** is a Laravel package that enables Telegram Bots interaction
**Telegraph** is a Laravel package that enables easy Telegram Bots interaction

```php
Telegraph::message('this is great')->send();
Expand Down Expand Up @@ -53,6 +53,7 @@ Please review [our security policy](../../security/policy) on how to report secu
## Credits

- [Fabio Ivona](https://github.com/def:studio)
- [BeyondCode Banners](https://banners.beyondco.de/)
- [All Contributors](../../contributors)

## License
Expand Down
3 changes: 3 additions & 0 deletions docs/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

# Create one with no scope selected on https://github.com/settings/tokens/new
GITHUB_TOKEN=
11 changes: 11 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
node_modules
*.iml
.idea
*.log*
.nuxt
.vscode
.DS_Store
coverage
dist
sw.*
.env
35 changes: 35 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Laravel Telegraph Docs

## Setup

Install dependencies:

```bash
npm install
```

## Development

```bash
npm run dev
```

## Static Generation

This will create the `dist/` directory for publishing to static hosting:

```bash
npm run generate
```

To preview the static generated app, run `npm run start`

## Deployment to Github Pages

This will copy the `dist/` directory with static files to Github Pages branch and push it:

```bash
npm run deploy
```

For detailed explanation on how things work, checkout [nuxt/content](https://content.nuxtjs.org) and [@nuxt/content theme docs](https://content.nuxtjs.org/themes-docs).
10 changes: 10 additions & 0 deletions docs/content/en/about-us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: About def:studio
description: ''
position: 6
fullscreen: true
---

We are [def:studio](https://github.com/def-studio), a web and software agency located in Bari, Apulia, south of Italy.

This package was made and is actively maintained by [Daniele Romeo](mailto:[email protected]) and [Fabio Ivona]([email protected]), along with of our staff and [many other contributors](https://github.com/def-studio/pest-plugin-laravel-expectations/graphs/contributors).
15 changes: 15 additions & 0 deletions docs/content/en/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: Changelog
description: ''
position: 5
fullscreen: false
---

All notable changes to this project will be documented in this file. For a full understanding of what changed and the PR that where merged, see also the [releases page](/releases)

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

### [v0.0.1](https://github.com/def-studio/laravel-telegraph/tree/v0.0.1) - 2021-11-21

- initial release
17 changes: 17 additions & 0 deletions docs/content/en/developers/bot-setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Bot Setup description: ''
category: 'Telegram Bots' fullscreen: true position: 20
---

## Creating a new Telegram Bot

1. Go to [@BotFather](https://t.me/botfather) on Telegram.

2. Send `/newbot`, to start creating a new Bot.

3. Set the bot's username and username.

4. Now you need to allow your Bot to send direct messages, so send `/setjoingroups` to @BotFather, select your Bot and click Enable:

5. Get the Bot token and add it to your .env file.

43 changes: 43 additions & 0 deletions docs/content/en/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: 'Laravel Telegraph'
menuTitle: 'Introduction'
description: 'Telegraph is a Laravel package that enables easy Telegram Bots interaction'
position: 1
fullscreen: true
---

<img src="https://banners.beyondco.de/Laravel%20Telegraph.png?theme=light&packageManager=composer+require&packageName=defstudio%2Flaravel-telegraph&pattern=architect&style=style_1&description=Telegram+bots+made+easy&md=1&showWatermark=1&fontSize=100px&images=phone-outgoing" class="light-img" alt=""/>
<img src="https://banners.beyondco.de/Laravel%20Telegraph.png?theme=dark&packageManager=composer+require&packageName=defstudio%2Flaravel-telegraph&pattern=architect&style=style_1&description=Telegram+bots+made+easy&md=1&showWatermark=1&fontSize=100px&images=phone-outgoing" class="dark-img" alt=""/>


<a href="https://packagist.org/packages/defstudio/laravel-telegraph" target="_blank">
<img style="display: inline-block; margin-top: 0.5em; margin-bottom: 0.5em" src="https://img.shields.io/packagist/v/defstudio/laravel-telegraph.svg?style=flat-square" alt="Latest Version on Packagist">
</a>

<a href="https://github.com/def-studio/laravel-telegraph/actions?query=workflow%3Arun-tests+branch%3Amain" target="_blank">
<img style="display: inline-block; margin-top: 0.5em; margin-bottom: 0.5em" src="https://img.shields.io/github/workflow/status/def-studio/laravel-telegraph/run-tests?label=tests" alt="GitHub Tests Action Status">
</a>

<a href="https://github.com/def-studio/laravel-telegraph/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain" target="_blank">
<img style="display: inline-block; margin-top: 0.5em; margin-bottom: 0.5em" src="https://img.shields.io/github/workflow/status/def-studio/laravel-telegraph/Check%20&%20fix%20styling?label=code%20style" alt="GitHub Code Style Action Status">
</a>

<a href="https://packagist.org/packages/defstudio/laravel-telegraph" target="_blank">
<img style="display: inline-block; margin-top: 0.5em; margin-bottom: 0.5em" src="https://img.shields.io/packagist/dt/defstudio/laravel-telegraph.svg?style=flat-square" alt="Total Downloads">
</a>

<a href="https://packagist.org/packages/defstudio/laravel-telegraph" target="_blank">
<img style="display: inline-block; margin-top: 0.5em; margin-bottom: 0.5em" src="https://img.shields.io/packagist/l/defstudio/laravel-telegraph" alt="License">
</a>


#### Telegraph is a Laravel package that enables easy Telegram Bots interaction

```php
Telegraph::message('this is great')->send();
```

Get the full source code at [https://github.com/def-studio/laravel-telegraph](https://github.com/def-studio/laravel-telegraph)


This plugin is powered by [def:studio](https://github.com/def-studio)
20 changes: 20 additions & 0 deletions docs/content/en/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Installation & Configuration
menuTitle: 'Installation'
description: ''
position: 2
fullscreen: true
---

You can install the package via composer:

``` bash
composer require defstudio/laravel-telegraph
```

You can publish the config file with:
```bash
php artisan vendor:publish --tag="telegraph-config"
```

TODO
12 changes: 12 additions & 0 deletions docs/content/en/issues.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Questions and Issues
menuTitle: 'Questions and Issues'
description: ''
position: 4
fullscreen: true
---

Have you any issue our package? Any bug comes up? Do you have any question or want to suggest an improvement? feel free to [create a new issue](https://github.com/def-studio/laravel-telegraph/issues) and we will take the best efforts to help you


If you have found any issue regarding security, please email [[email protected]](mailto:[email protected]) instead of using the issue tracker.
9 changes: 9 additions & 0 deletions docs/content/en/support-us.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Support Us
description: ''
position: 7
fullscreen: true
---

We at [def:studio](https://github.com/def-studio) strongly believe that open source is the foundation of all our business and we try to cotribute to it by helping other projects to grow along with developing and maintaining our packages. You can support our work by sponsoring us on [github](https://github.com/sponsors/def-studio)!

11 changes: 11 additions & 0 deletions docs/content/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "Laravel Telegrpah",
"url": "https://def-studio.github.io/laravel-telegraph/",
"logo": {
"light": "logo-wide-light.png",
"dark": "logo-wide-dark.png"
},
"github": "def-studio/laravel-telegraph",
"twitter": "@FabioIvona",
"defaultDir": "/docs"
}
14 changes: 14 additions & 0 deletions docs/nuxt.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import theme from '@nuxt/content-theme-docs'

export default theme({
docs: {
primaryColor: '#1093ff'
},
target: 'static',
content: {
liveEdit: false
},
router: {
base: '/laravel-telegraph'
}
})
Loading

0 comments on commit 72dcb66

Please sign in to comment.