Skip to content

Commit 1785ad4

Browse files
committed
improve docs
1 parent b810297 commit 1785ad4

File tree

9 files changed

+51
-13
lines changed

9 files changed

+51
-13
lines changed

.github/workflows/build-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
# Or use mhausenblas/mkdocs-deploy-gh-pages@nomaterial to build without the mkdocs-material theme
2424
env:
2525
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
EXTRA_PACKAGES: build-base pygments
2627
#CUSTOM_DOMAIN: optionaldomain.com
2728
#CONFIG_FILE: folder/mkdocs.yml
28-
#EXTRA_PACKAGES: build-base
2929
# GITHUB_DOMAIN: github.myenterprise.com

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ vendor/
55
.php-cs-fixer.cache
66
phpunit.xml
77
.vscode/
8-
phpstan.neon
8+
phpstan.neon
9+
# mkdocs
10+
site

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# feed-io
22

33
[![Packagist](https://img.shields.io/packagist/v/php-feed-io/feed-io.svg)](https://packagist.org/packages/php-feed-io/feed-io)
4+
[![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://php-feed-io.github.io/feed-io/)
5+
6+
**📖 [Read the full documentation](https://php-feed-io.github.io/feed-io/)**
47

58
[feed-io](https://github.com/php-feed-io/feed-io) is a PHP library built to consume and serve news feeds. It features:
69

doc/specifications-support.md renamed to docs/specifications-support.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This document explains which attributes are supported by feed-io and how to acce
44

55
## top level document : feed (atom) / channel (rss) / top-level (json)
66

7-
interface : FeedInterface
7+
**interface : FeedInterface**
88

99
| atom | rss | json | getter | setter |
1010
| --------------- | ----------------------- | ------------- | --------------- | --------------- |
@@ -36,7 +36,7 @@ interface : FeedInterface
3636

3737
## entry (atom) / item (rss) / item (json)
3838

39-
Interface : ItemInterface
39+
**Interface : ItemInterface**
4040

4141
| atom | rss | json | getter | setter |
4242
| ------------------- | ----------- | --------------------------- | --------------- | --------------- |

UPGRADE-3.0.md renamed to docs/upgrades/UPGRADE-3.0.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ In version 2.x FeedIo::format() returned a DomDocument. Now that feed-io support
77
Before :
88

99
```php
10+
<?php
11+
1012
// Feed creation
1113
$feed = new \FeedIo\Feed();
1214

@@ -27,6 +29,8 @@ Now you get the string :
2729

2830

2931
```php
32+
<?php
33+
3034
// Feed creation
3135
$feed = new \FeedIo\Feed();
3236

@@ -43,6 +47,8 @@ Instead of a DomDocument.
4347
Before :
4448

4549
```php
50+
<?php
51+
4652
$feedIo = \FeedIo\Factory::create()->getFeedIo();
4753

4854
$result = $feedIo->read('http://php.net/feed.atom');
@@ -54,6 +60,8 @@ $dom = $result->getDocument();
5460
After :
5561

5662
```php
63+
<?php
64+
5765
$feedIo = \FeedIo\Factory::create()->getFeedIo();
5866

5967
$result = $feedIo->read('http://php.net/feed.atom');
@@ -62,7 +70,7 @@ $dom = $result->getDocument()->getDOMDocument();
6270

6371
```
6472

65-
This is because Result::getDocument()'s return value is a wrapper for both XML and JSON streams.
73+
This is because `Result::getDocument()`'s return value is a wrapper for both XML and JSON streams.
6674

6775
### That's it
6876

UPGRADE-4.0.md renamed to docs/upgrades/UPGRADE-4.0.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@ The major change in version 4.0 is the full migration to PHP 7.1. It has an impa
66

77
From now on, all types are explicits in method signatures. It has an impact on classes that implements :
88

9-
- \FeedIo\FeedInterface
10-
- \FeedIo\Feed\ItemInterface
11-
- \FeedIo\Feed\NodeInterface
12-
- \FeedIo\Feed\ElementsAwareInterface
13-
- \FeedIo\Feed\Item\AuthorInterface
14-
- \FeedIo\Feed\Item\MediaInterface
15-
- \FeedIo\Feed\Node\CategoryInterface
16-
- \FeedIo\Feed\Node\ElementInterface
9+
- `\FeedIo\FeedInterface`
10+
- `\FeedIo\Feed\ItemInterface`
11+
- `\FeedIo\Feed\NodeInterface`
12+
- `\FeedIo\Feed\ElementsAwareInterface`
13+
- `\FeedIo\Feed\Item\AuthorInterface`
14+
- `\FeedIo\Feed\Item\MediaInterface`
15+
- `\FeedIo\Feed\Node\CategoryInterface`
16+
- `\FeedIo\Feed\Node\ElementInterface`
1717

1818
For instance, `FeedIo\FeedInterface::setUrl($url)` becomes :
1919

2020
```php
21+
<?php
22+
2123
/**
2224
* @param string $url
2325
* @return FeedInterface
@@ -27,6 +29,8 @@ For instance, `FeedIo\FeedInterface::setUrl($url)` becomes :
2729
As a consequence, you need to adapt any class that implements `FeedIo\FeedInterface` according to the new signature :
2830

2931
```php
32+
<?php
33+
3034
/**
3135
* @param string $url
3236
* @return FeedInterface
@@ -41,6 +45,8 @@ As a consequence, you need to adapt any class that implements `FeedIo\FeedInterf
4145
becomes :
4246

4347
```php
48+
<?php
49+
4450
/**
4551
* @param string $url
4652
* @return FeedInterface
File renamed without changes.
File renamed without changes.

mkdocs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
11
site_name: feed-io Documentation
22
theme:
33
name: material
4+
features:
5+
- content.code.copy
6+
47

58
nav:
69
- Home: index.md
710
- Code Quality: codecontributions.md
11+
- Specification: specifications-support.md
12+
- Upgrade:
13+
- Upgrade to v3: upgrades/UPGRADE-3.0.md
14+
- Upgrade to v4: upgrades/UPGRADE-4.0.md
15+
- Upgrade to v5: upgrades/UPGRADE-5.0.md
16+
- Upgrade to v6: upgrades/UPGRADE-6.0.md
17+
18+
markdown_extensions:
19+
- pymdownx.highlight:
20+
use_pygments: true
21+
anchor_linenums: true
22+
line_spans: __span
23+
pygments_lang_class: true
24+
- pymdownx.inlinehilite
25+
- pymdownx.snippets
26+
- pymdownx.superfences

0 commit comments

Comments
 (0)