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

πŸ“„ New docs πŸŽ‰ #1517

Merged
merged 25 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ded7211
Introduce docsify and start `docs-new` folder.
iMacTia Jun 30, 2023
c36bcbb
Update README and CONTRIBUTING.md
iMacTia Jun 30, 2023
c416b92
Create basic structure for the new docs.
iMacTia Jun 30, 2023
9b2fc9c
Add "Edit this page on GitHub" link on all pages.
iMacTia Jul 1, 2023
190e3a9
Add "errors" page.
iMacTia Jul 1, 2023
ca46bcb
Restructure and populate "Middleware" section
iMacTia Jul 1, 2023
a696105
Restructure and populate "Adapters" section
iMacTia Jul 9, 2023
c865861
Other changes
iMacTia Jul 9, 2023
04961ff
Replace old `docs` with new ones
iMacTia Jul 9, 2023
fde3354
Remove empty page
iMacTia Jul 10, 2023
d431075
Usa tables to improve readability
iMacTia Jul 10, 2023
35f60bf
Write options docs
iMacTia Jul 10, 2023
312fd9f
[docs] Refer to correct branch in test-adapter.md
olleolleolle Jul 10, 2023
25baa45
Use package-lock.json with npmjs.org
olleolleolle Jul 10, 2023
f1fc57f
Refer to correct branch
olleolleolle Jul 10, 2023
6794ce5
Add env-object page
iMacTia Jul 10, 2023
aa5a76b
Enable automatic scroll to top on navigation
iMacTia Jul 10, 2023
a4703d8
Add search plugin
iMacTia Jul 10, 2023
4e8fa17
Add "copy to clipboard" plugin
iMacTia Jul 10, 2023
bca6054
Add errors page
iMacTia Jul 10, 2023
ea702e3
Fixes to errors pages
iMacTia Jul 11, 2023
d5ab8a2
Add "parallel requests" page
iMacTia Jul 11, 2023
b7d4a54
Apply suggestions from code review
iMacTia Jul 12, 2023
9ca049e
Address additional code review comments
iMacTia Jul 13, 2023
3409c91
Merge branch 'main' into new-docs
iMacTia Jul 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
42 changes: 4 additions & 38 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,50 +64,16 @@ We encourage adapters that:
1. have features not present in included adapters.


### Changes to the Faraday Website
### Changes to the Faraday Docs

The [Faraday Website][website] is included in the Faraday repository, under the `/docs` folder.
The Faraday Docs are included in the Faraday repository, under the `/docs` folder and deployed to [GitHub Pages][website].
If you want to apply changes to it, please test it locally before opening your PR.
You can find more information in the [Faraday Docs README][docs], including how to preview changes locally.


#### Test website changes using Docker

Start by cloning the repository and navigate to the newly-cloned directory on your computer. Then run the following:

```bash
docker container run -p 80:4000 -v $(pwd)/docs:/site bretfisher/jekyll-serve
```

And that's it! Open your browser and navigate to `http://localhost` to see the website running.
Any change done to files in the `/docs` folder will be automatically picked up (with the exception of config changes).


#### Test website changes using Jekyll

You can test website changes locally, on your machine, too. Here's how:

Navigate into the /docs folder:

```bash
$ cd docs
```

Install Jekyll dependencies, this bundle is different from Faraday's one.

```bash
$ bundle install
```

Run the Jekyll server with the Faraday website

```bash
$ bundle exec jekyll serve
```

Now, navigate to http://127.0.0.1:4000/faraday/ to see the website running.

[semver]: https://semver.org/
[changelog]: https://github.com/lostisland/faraday/releases
[faraday_middleware]: https://github.com/lostisland/faraday_middleware
[website]: https://lostisland.github.io/faraday
[docs]: ../docs/README.md
[Code of Conduct]: ./CODE_OF_CONDUCT.md
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Gemfile.lock
vendor/bundle
external

## NPM
node_modules

## PROJECT::SPECIFIC
.rbx

Expand Down
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# [![Faraday](./docs/assets/img/repo-card-slim.png)][website]
# [![Faraday](./docs/_media/home-logo.svg)][website]

[![Gem Version](https://badge.fury.io/rb/faraday.svg)](https://rubygems.org/gems/faraday)
[![GitHub Actions CI](https://github.com/lostisland/faraday/workflows/CI/badge.svg)](https://github.com/lostisland/faraday/actions?query=workflow%3ACI)
[![GitHub Discussions](https://img.shields.io/github/discussions/lostisland/faraday?logo=github)](https://github.com/lostisland/faraday/discussions)

Faraday is an HTTP client library abstraction layer that provides a common interface over many
adapters (such as Net::HTTP) and embraces the concept of Rack middleware when processing the request/response cycle.
You probably don't want to use Faraday directly in your project, as it will lack an actual client library to perform
requests. Instead, you probably want to have a look at [Awesome Faraday][awesome] for a list of available adapters.
Take a look at [Awesome Faraday][awesome] for a list of available adapters and middleware.

## Getting Started

The best starting point is the [Faraday Website][website], with its introduction and explanation.

Need more details? See the [Faraday API Documentation][apidoc] to see how it works internally, or take a look at [Advanced techniques for calling HTTP APIs in Ruby](https://mattbrictson.com/blog/advanced-http-techniques-in-ruby) blog post from @mattbrictson πŸš€
Need more details? See the [Faraday API Documentation][apidoc] to see how it works internally, or take a look at [Advanced techniques for calling HTTP APIs in Ruby](https://mattbrictson.com/blog/advanced-http-techniques-in-ruby) blog post from [@mattbrictson](https://github.com/mattbrictson) πŸš€

## Supported Ruby versions

Expand Down Expand Up @@ -51,6 +50,3 @@ But before you start coding, please read our [Contributing Guide][contributing]
[contributing]: https://github.com/lostisland/faraday/blob/master/.github/CONTRIBUTING.md
[apidoc]: https://www.rubydoc.info/github/lostisland/faraday
[actions]: https://github.com/lostisland/faraday/actions
[jruby]: http://jruby.org/
[rubinius]: http://rubini.us/
[license]: LICENSE.md
3 changes: 0 additions & 3 deletions docs/.gitignore

This file was deleted.

Empty file added docs/.nojekyll
Empty file.
24 changes: 0 additions & 24 deletions docs/404.html

This file was deleted.

37 changes: 0 additions & 37 deletions docs/Gemfile

This file was deleted.

30 changes: 11 additions & 19 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
# Faraday Website
# Faraday Docs

This is the root directory of the [Faraday Website][website].
If you want to apply changes to it, please test it locally using `Jekyll`.
Faraday Docs are powered by [Docsify](https://docsify.js.org/#/).

Here is how:
## Development

```bash
# Navigate into the /docs folder
$ cd docs

# Install Jekyll dependencies, this bundle is different from Faraday's one.
$ bundle install
### Setup

# Run the Jekyll server with the Faraday website
$ bundle exec jekyll serve
From the Faraday project root, run the following:

# The site will now be reachable at http://127.0.0.1:4000/faraday/
```bash
npm install # this will install the necessary dependencies
```

On newer Ruby versions (>= 3.0) `eventmachine` needs a little help to find OpenSSL 1.1 to get compiled (see <https://github.com/eventmachine/eventmachine/issues/936>). If you're using homebrew on macOS, you can do this:
### Running the Docs Locally

To preview your changes locally, run the following:

```bash
brew install openssl@1.1
bundle config build.eventmachine --with-openssl-dir=$(brew --prefix openssl@1.1)
bundle install
npm run docs
```

[website]: https://lostisland.github.io/faraday
55 changes: 0 additions & 55 deletions docs/_config.yml

This file was deleted.

18 changes: 0 additions & 18 deletions docs/_includes/docs_nav.md

This file was deleted.

21 changes: 0 additions & 21 deletions docs/_includes/footer.html

This file was deleted.

59 changes: 0 additions & 59 deletions docs/_includes/header.html

This file was deleted.

7 changes: 0 additions & 7 deletions docs/_layouts/documentation.md

This file was deleted.

File renamed without changes
File renamed without changes
File renamed without changes
Binary file added docs/_media/overview.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
25 changes: 0 additions & 25 deletions docs/_posts/2019-03-12-welcome-to-jekyll.markdown

This file was deleted.