Skip to content

Commit

Permalink
📄 New docs 🎉 (#1517)
Browse files Browse the repository at this point in the history
  • Loading branch information
iMacTia committed Jul 13, 2023
1 parent 1578811 commit 17d586c
Show file tree
Hide file tree
Showing 64 changed files with 3,368 additions and 1,273 deletions.
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/main/.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.

0 comments on commit 17d586c

Please sign in to comment.