Update docs with Forem instead of dev.to (#9316)
* Rename all GitHub links from thepracticaldev/dev.to to forem/forem * Use new site name * Rename to Forem * Rename more dev.to to forem * Remove unnecessary redirects * Rename DEV to Forem * Use Forem instead of DEV for branding * Use Forem instead of DEV for licensing * Use seedling instead of DEV logo
This commit is contained in:
parent
7475716662
commit
955bdcb2bc
54 changed files with 266 additions and 301 deletions
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "DEV Docs",
|
||||
"name": "Forem Docs",
|
||||
"root": "./",
|
||||
"logo": "devblacksquarelogo.svg",
|
||||
"logo": "seedling.png",
|
||||
"host": "0.0.0.0",
|
||||
"header_links": [
|
||||
{
|
||||
"title": "Repo",
|
||||
"href": "https://github.com/thepracticaldev/dev.to",
|
||||
"href": "https://github.com/forem/forem",
|
||||
"target": "_blank",
|
||||
"rel": "noopener noreferrer nofollow"
|
||||
},
|
||||
|
|
@ -18,13 +18,13 @@
|
|||
},
|
||||
{
|
||||
"title": "Ruby doc",
|
||||
"href": "http://docs.dev.to/ruby-doc",
|
||||
"href": "http://docs.forem.com/ruby-doc",
|
||||
"target": "_blank",
|
||||
"rel": "noopener noreferrer nofollow"
|
||||
},
|
||||
{
|
||||
"title": "API doc",
|
||||
"href": "http://docs.dev.to/api",
|
||||
"href": "http://docs.forem.com/api",
|
||||
"target": "_blank",
|
||||
"rel": "noopener noreferrer nofollow"
|
||||
}
|
||||
|
|
|
|||
BIN
docs/.static/seedling.png
Normal file
BIN
docs/.static/seedling.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
|
|
@ -11,7 +11,7 @@
|
|||
<meta name="description" content="DEV REST API documentation">
|
||||
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="og:url" content="https://docs.dev.to/api" />
|
||||
<meta property="og:url" content="https://docs.forem.com/api" />
|
||||
<meta property="og:title" content="DEV API (beta)" />
|
||||
|
||||
{{! needed for adaptive design }}
|
||||
|
|
|
|||
|
|
@ -1692,7 +1692,7 @@ paths:
|
|||
|
||||
### Additional resources
|
||||
|
||||
- [Rails tests for Articles API](https://github.com/thepracticaldev/dev.to/blob/master/spec/requests/api/v0/articles_spec.rb)
|
||||
- [Rails tests for Articles API](https://github.com/forem/forem/blob/master/spec/requests/api/v0/articles_spec.rb)
|
||||
tags:
|
||||
- articles
|
||||
requestBody:
|
||||
|
|
@ -1854,7 +1854,7 @@ paths:
|
|||
|
||||
### Additional resources
|
||||
|
||||
- [Rails tests for Articles API](https://github.com/thepracticaldev/dev.to/blob/master/spec/requests/api/v0/articles_spec.rb)
|
||||
- [Rails tests for Articles API](https://github.com/forem/forem/blob/master/spec/requests/api/v0/articles_spec.rb)
|
||||
tags:
|
||||
- articles
|
||||
requestBody:
|
||||
|
|
@ -2407,7 +2407,7 @@ paths:
|
|||
|
||||
### Additional resources
|
||||
|
||||
- [Rails tests for Listings API](https://github.com/thepracticaldev/dev.to/blob/master/spec/requests/api/v0/listings_spec.rb)
|
||||
- [Rails tests for Listings API](https://github.com/forem/forem/blob/master/spec/requests/api/v0/listings_spec.rb)
|
||||
tags:
|
||||
- listings
|
||||
requestBody:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: Audit Log
|
|||
|
||||
# Audit Log
|
||||
|
||||
To help maintain accountability for users with elevated permissions the DEV
|
||||
To help maintain accountability for users with elevated permissions the Forem
|
||||
application has a special model that records certain actions.
|
||||
|
||||
For example, when a user with the `trusted` role creates a negative reaction on
|
||||
|
|
|
|||
|
|
@ -4,16 +4,15 @@ title: GitHub Authentication
|
|||
|
||||
# GitHub App and Authentication
|
||||
|
||||
DEV allows you to authenticate using GitHub. To use this authentication method
|
||||
Forem allows you to authenticate using GitHub. To use this authentication method
|
||||
in local development, you will need to set up a GitHub App and retrieve its
|
||||
keys. Then you'll need to provide these keys to the Rails application.
|
||||
|
||||
1. [Click this link to create a new OAuth application in your Github
|
||||
account](https://github.com/settings/applications/new) - you will be
|
||||
redirected to sign in to Github account if you have not already.
|
||||
1. [Click this link to create a new OAuth application in your Github account](https://github.com/settings/applications/new) -
|
||||
you will be redirected to sign in to Github account if you have not already.
|
||||
|
||||
2. Fill in the form with an application name, description, and the URL
|
||||
`http://localhost:3000/`. Replace the port `3000` if you run DEV on another
|
||||
`http://localhost:3000/`. Replace the port `3000` if you run Forem on another
|
||||
port.
|
||||
|
||||

|
||||
|
|
@ -28,5 +27,5 @@ keys. Then you'll need to provide these keys to the Rails application.
|
|||
```
|
||||
|
||||

|
||||
|
||||
|
||||
4. Done.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: Twitter Authentication
|
|||
|
||||
# Twitter App and Authentication
|
||||
|
||||
DEV allows you to authenticate using Twitter. In order to use this
|
||||
Forem allows you to authenticate using Twitter. In order to use this
|
||||
authentication method in local development, you will need to setup a Twitter App
|
||||
and retrieve its keys. Then you'll need to provide these keys to the Rails
|
||||
application.
|
||||
|
|
@ -29,7 +29,7 @@ application.
|
|||
|
||||

|
||||
|
||||
5. Write down the reasons that you want to use Twitter API. Mention DEV's
|
||||
5. Write down the reasons that you want to use Twitter API. Mention Forem's
|
||||
community and describe the issues and tests and things that you want to work
|
||||
on. Copy it, you might use it later ;)
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ application.
|
|||
|
||||
4. Check the **Enable Sign in with Twitter** option and fill in the Callback URL
|
||||
`http://localhost:3000/users/auth/twitter/callback` (or whatever port you run
|
||||
DEV on).
|
||||
Forem on).
|
||||
|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,12 @@ title: Authentication
|
|||
Authentication is handled by [Devise](https://github.com/plataformatec/devise)
|
||||
and [OmniAuth](https://github.com/omniauth/omniauth).
|
||||
|
||||
On DEV you can only authenticate through GitHub or Twitter. Please check out the
|
||||
respective guides on how to authenticate:
|
||||
On Forem you can only authenticate through GitHub or Twitter. Please check out
|
||||
the respective guides on how to authenticate:
|
||||
|
||||
- [Github authentication](/backend/auth-github)
|
||||
- [Twitter authentication](/backend/auth-twitter)
|
||||
|
||||
We may add other authentication providers in the future. Please check back
|
||||
again, or search
|
||||
[our GitHub repository's issues.](https://github.com/forem/forem/issues)
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ credentials and third party services. Examples:
|
|||
- `STRIPE_SECRET_KEY`
|
||||
|
||||
Settings managed via ENVied can be found in
|
||||
[`Envfile`](https://github.com/thepracticaldev/dev.to/blob/master/Envfile) (see
|
||||
[`Envfile`](https://github.com/forem/forem/blob/master/Envfile) (see
|
||||
[Configuring Environment Variables](../getting-started/config-env.md)) and
|
||||
viewed at `/internal/config` (see [Accessing the admin panel](./admin.md)):
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ Examples:
|
|||
- `suggested_tags`
|
||||
|
||||
These settings can be accessed via the
|
||||
[`SiteConfig`](https://github.com/thepracticaldev/dev.to/blob/master/app/models/site_config.rb)
|
||||
[`SiteConfig`](https://github.com/forem/forem/blob/master/app/models/site_config.rb)
|
||||
object and viewed / modified via `/internal/config` (see
|
||||
[Accessing the admin panel](./admin.md)).
|
||||
|
||||
|
|
|
|||
|
|
@ -5,17 +5,17 @@ title: Data Update Scripts
|
|||
## What are Data Update Scripts?
|
||||
|
||||
Data Update Scripts were introduced in
|
||||
[this PR](https://github.com/thepracticaldev/dev.to/pull/6025) and allow us to
|
||||
run any data updates we might need. For example, if we added a column to the
|
||||
database and then wanted to backfill that column with data, rather than going
|
||||
and manually doing it in a console, we would use a DataUpdateScript. Another
|
||||
example might be adding a new attribute to Elasticsearch. We could then use a
|
||||
DataUpdateScript to reindex all of our models.
|
||||
[this PR](https://github.com/forem/forem/pull/6025) and allow us to run any data
|
||||
updates we might need. For example, if we added a column to the database and
|
||||
then wanted to backfill that column with data, rather than going and manually
|
||||
doing it in a console, we would use a DataUpdateScript. Another example might be
|
||||
adding a new attribute to Elasticsearch. We could then use a DataUpdateScript to
|
||||
reindex all of our models.
|
||||
|
||||
## How it works
|
||||
|
||||
First off, we added a
|
||||
[DataUpdateScript model](https://github.com/thepracticaldev/dev.to/blob/master/app/models/data_update_script.rb)
|
||||
[DataUpdateScript model](https://github.com/forem/forem/blob/master/app/models/data_update_script.rb)
|
||||
to Rails and a corresponding database table. This table is what we use to keep
|
||||
track of what scripts have been run and which ones have not/still need to be.
|
||||
|
||||
|
|
@ -42,9 +42,9 @@ end
|
|||
|
||||
Once your script is in place then you can either run `rails data_updates:run`
|
||||
manually or you can let our setup script handle it. In our local
|
||||
[bin/setup](https://github.com/thepracticaldev/dev.to/blob/master/bin/setup)
|
||||
script you will see we have added an additional task to update data. This kicks
|
||||
off the rake task `data_updates:run` for you.
|
||||
[bin/setup](https://github.com/forem/forem/blob/master/bin/setup) script you
|
||||
will see we have added an additional task to update data. This kicks off the
|
||||
rake task `data_updates:run` for you.
|
||||
|
||||
The rake task itself will check the `lib/data_update_scripts` folder to see if
|
||||
there are any new scripts that need to be run. It does this by reading all of
|
||||
|
|
@ -57,5 +57,5 @@ script.
|
|||
|
||||
DataUpdateScripts are also run automatically when a production deploy goes out.
|
||||
However, to ensure the new code they need to use has been deployed we use a
|
||||
[`DataUpdateWorker`](https://github.com/thepracticaldev/dev.to/blob/master/app/workers/data_update_worker.rb)
|
||||
[`DataUpdateWorker`](https://github.com/forem/forem/blob/master/app/workers/data_update_worker.rb)
|
||||
via Sidekiq and set it to run 10 minutes after the deploy script has completed.
|
||||
|
|
|
|||
|
|
@ -9,11 +9,11 @@ title: Elasticsearch
|
|||
> unstructured. Elasticsearch is built on Apache Lucene and was first released
|
||||
> in 2010 by Elastic.
|
||||
|
||||
# How DEV uses Elasticsearch
|
||||
# How Forem uses Elasticsearch
|
||||
|
||||
### Searchable Models
|
||||
|
||||
At DEV we use Elasticsearch for all of our user-facing searching needs. Models
|
||||
At Forem we use Elasticsearch for all of our user-facing searching needs. Models
|
||||
that are searched using Elasticsearch are:
|
||||
|
||||
- Tags
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ parameters, you'll need to update Fastly.
|
|||
|
||||
The reason we have a safe list of parameters in Fastly this way is so we don't
|
||||
have to consider junk parameters when busting the caches. Check out our
|
||||
[`CacheBuster`](https://github.com/thepracticaldev/dev.to/blob/master/app/labor/cache_buster.rb)
|
||||
[`CacheBuster`](https://github.com/forem/forem/blob/master/app/labor/cache_buster.rb)
|
||||
to see examples of this.
|
||||
|
||||
Previously this was a manual process done by an internal team member. Now we do
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ the administrative overhead.
|
|||
Some bugs can only be seen for users with specific roles. You will need to
|
||||
change the role to reproduce a problem.
|
||||
|
||||
## How do we implement roles in DEV.to?
|
||||
## How do we implement roles in Forem?
|
||||
|
||||
Roles are implemented in this application using [Rolify][1]. The list of roles
|
||||
can be found in [app/models/role.rb][2] and you can search for [has_role in the
|
||||
|
|
@ -69,8 +69,7 @@ User.joins(:roles).order(:id).group(:id).pluck(:id, :username, Arel.sql("array_a
|
|||
3. [Admin][5]
|
||||
|
||||
[1]: https://github.com/RolifyCommunity/rolify
|
||||
[2]: https://github.com/thepracticaldev/dev.to/blob/master/app/models/role.rb
|
||||
[3]:
|
||||
https://github.com/thepracticaldev/dev.to/search?q=has_role&unscoped_q=has_role
|
||||
[2]: https://github.com/forem/forem/blob/master/app/models/role.rb
|
||||
[3]: https://github.com/forem/forem/search?q=has_role&unscoped_q=has_role
|
||||
[4]: https://stackoverflow.com/a/16096790/1511504
|
||||
[5]: /backend/admin
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@ title: Scheduled Jobs
|
|||
|
||||
# Scheduled Jobs
|
||||
|
||||
As in the [Technical Overview](/technical-overview), We use [Heroku
|
||||
Scheduler](https://devcenter.heroku.com/articles/scheduler) for scheduled jobs.
|
||||
As the name suggests, this is for regularly recurring tasks that need to be run
|
||||
every day, week, month, year, decade, and century.
|
||||
As in the [Technical Overview](/technical-overview), We use
|
||||
[Heroku Scheduler](https://devcenter.heroku.com/articles/scheduler) for
|
||||
scheduled jobs. As the name suggests, this is for regularly recurring tasks that
|
||||
need to be run every day, week, month, year, decade, and century.
|
||||
|
||||
Tasks are implemented in `dev.to/lib/tasks/fetch.rake`, typically in the form
|
||||
of:
|
||||
Tasks are implemented in `forem/lib/tasks/fetch.rake`, typically in the form of:
|
||||
|
||||
```
|
||||
task some_unique_task_name:, [optional_arg] => :environment do |optional_arg|
|
||||
|
|
@ -18,11 +17,11 @@ task some_unique_task_name:, [optional_arg] => :environment do |optional_arg|
|
|||
end
|
||||
```
|
||||
|
||||
You can explore the [official Heroku
|
||||
documentation](https://devcenter.heroku.com/articles/scheduler#defining-tasks)
|
||||
You can explore the
|
||||
[official Heroku documentation](https://devcenter.heroku.com/articles/scheduler#defining-tasks)
|
||||
for defining tasks and read through tasks we have implemented for busting cache,
|
||||
awarding badges, and more.
|
||||
|
||||
In your Pull Request, communicate with a DEV Core Team Member to discuss at what
|
||||
frequency and ensure your task is scheduled on Heroku once your code is
|
||||
In your Pull Request, communicate with a Forem Core Team Member to discuss at
|
||||
what frequency and ensure your task is scheduled on Heroku once your code is
|
||||
reviewed, approved, and merged.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
title: Contributing to the Docs
|
||||
---
|
||||
|
||||
# Contributing to DEV's developer documentation
|
||||
# Contributing to Forem's developer documentation
|
||||
|
||||
Contributions to the documentation are always appreciated! Thank you for making
|
||||
an effort to improve the developer experience of contributing to the DEV
|
||||
|
|
@ -31,7 +31,7 @@ Alternatively, you can use Yarn:
|
|||
yarn global add gitdocs
|
||||
```
|
||||
|
||||
Once installed, you should run `gitdocs serve` from the root of the dev.to
|
||||
Once installed, you should run `gitdocs serve` from the root of the `forem`
|
||||
project or from the `/docs` directory.
|
||||
|
||||
```shell
|
||||
|
|
@ -84,7 +84,7 @@ lost over time.
|
|||
For more information on effective technical writing, check out
|
||||
[writethedocs.org][writethedocs].
|
||||
|
||||
[docs]: https://github.com/thepracticaldev/dev.to/tree/master/docs/
|
||||
[docs]: https://github.com/forem/forem/tree/master/docs/
|
||||
[gitdocs]: https://www.npmjs.com/package/gitdocs/
|
||||
[markdown]: https://en.wikipedia.org/wiki/Markdown
|
||||
[frontmatter]: https://jekyllrb.com/docs/front-matter/
|
||||
|
|
|
|||
|
|
@ -19,20 +19,20 @@ contact the team with our [abuse report form](https://dev.to/report-abuse).
|
|||
|
||||
### Where to contribute
|
||||
|
||||
All [issues](https://github.com/thepracticaldev/dev.to/issues) labeled
|
||||
[ready for dev](https://github.com/thepracticaldev/dev.to/issues?q=is%3Aissue+is%3Aopen+label%3A%22ready+for+dev%22)
|
||||
All [issues](https://github.com/forem/forem/issues) labeled
|
||||
[ready for dev](https://github.com/forem/forem/issues?q=is%3Aissue+is%3Aopen+label%3A%22ready+for+dev%22)
|
||||
and
|
||||
[type: bug](https://github.com/thepracticaldev/dev.to/issues?q=is%3Aissue+is%3Aopen+label%3A%22type%3A+bug%22)
|
||||
[type: bug](https://github.com/forem/forem/issues?q=is%3Aissue+is%3Aopen+label%3A%22type%3A+bug%22)
|
||||
are up for grabs.
|
||||
|
||||
- [good first issue](https://github.com/thepracticaldev/dev.to/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+)
|
||||
- [good first issue](https://github.com/forem/forem/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+)
|
||||
issues are meant for newer developers.
|
||||
- [difficulty: easy](https://github.com/thepracticaldev/dev.to/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+easy%22)
|
||||
- [difficulty: easy](https://github.com/forem/forem/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+easy%22)
|
||||
issues are usually confined to isolated areas of existing code.
|
||||
- [difficulty: medium](https://github.com/thepracticaldev/dev.to/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+medium%22)
|
||||
- [difficulty: medium](https://github.com/forem/forem/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+medium%22)
|
||||
issues sometimes entail new features and might affect a significant area of
|
||||
the codebase, but aren't overly complex.
|
||||
- [difficulty: hard](https://github.com/thepracticaldev/dev.to/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+hard%22)
|
||||
- [difficulty: hard](https://github.com/forem/forem/issues?q=is%3Aopen+is%3Aissue+label%3A%22difficulty%3A+hard%22)
|
||||
issues are typically far-reaching, and might need architecture decisions
|
||||
during implementation. This label might also denote highly complex issues.
|
||||
|
||||
|
|
@ -41,14 +41,14 @@ focus on changes that solve existing issues. We strongly encourage creating an
|
|||
issue before working on a PR!
|
||||
|
||||
When in doubt, ask a
|
||||
[core team member](https://github.com/thepracticaldev/dev.to/#core-team) by
|
||||
mentioning us on the issue.
|
||||
[core team member](https://github.com/forem/forem/#core-team) by mentioning us
|
||||
on the issue.
|
||||
|
||||
**Documentation** is almost always a great place to start contributing to a new
|
||||
project. Forem is an Open Source, community-driven project. Therefore, providing
|
||||
and maintaining quality documentation is one of our most important jobs. You can
|
||||
find more information in our
|
||||
[docs guide](https://docs.dev.to/contributing/docs)!
|
||||
[docs guide](https://docs.forem.com/contributing/docs)!
|
||||
|
||||
**Refactoring**, which involves improving the code without modifying behavior,
|
||||
is a great place to help out! Generally speaking, you can rely on existing tests
|
||||
|
|
@ -71,17 +71,17 @@ helpful. As always, when in doubt, ask!
|
|||
|
||||
### How to contribute
|
||||
|
||||
1. [Fork the project](https://docs.dev.to/getting-started/forking/) and clone it
|
||||
to your local machine. Follow the
|
||||
[installation guide](https://docs.dev.to/installation/)!
|
||||
1. [Fork the project](https://docs.forem.com/getting-started/forking/) and clone
|
||||
it to your local machine. Follow the
|
||||
[installation guide](https://docs.forem.com/installation/)!
|
||||
2. Create a branch with your GitHub username and the ID of the
|
||||
[issue](https://github.com/thepracticaldev/dev.to/issues), for example:
|
||||
[issue](https://github.com/forem/forem/issues), for example:
|
||||
`git checkout -b USERNAME/some-new-feature-1234`
|
||||
3. Code and commit your changes. Bonus points if you write a
|
||||
[good commit message](https://chris.beams.io/posts/git-commit/):
|
||||
`git commit -m 'Add some feature'`
|
||||
4. Push to the branch: `git push -u origin USERNAME/some-new-feature-1234`
|
||||
5. [Create a pull request](https://docs.dev.to/getting-started/pull-request/)
|
||||
5. [Create a pull request](https://docs.forem.com/getting-started/pull-request/)
|
||||
for your branch. 🎉
|
||||
|
||||
## Contribution guidelines
|
||||
|
|
@ -100,7 +100,7 @@ discussion._
|
|||
|
||||
Some areas of the project could use updated tests, and new features should
|
||||
always include test coverage. Please give our
|
||||
[testing guide](https://docs.dev.to/tests/) a read!
|
||||
[testing guide](https://docs.forem.com/tests/) a read!
|
||||
|
||||
### Code quality
|
||||
|
||||
|
|
@ -133,7 +133,7 @@ encourages more thoughtful code!
|
|||
[Draft PR](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
|
||||
feature.
|
||||
- Make sure all tests pass and add additional tests for the code you submit.
|
||||
[More info here](https://docs.dev.to/tests/).
|
||||
[More info here](https://docs.forem.com/tests/).
|
||||
- Document your reasoning behind the changes. Explain why you wrote the code in
|
||||
the way you did. The code should explain what it does.
|
||||
- If there's an existing issue, reference to it by adding something like
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ title: Branding Guidelines
|
|||
|
||||
# Branding Guidelines
|
||||
|
||||
## DEV Theme
|
||||
## Forem Theme
|
||||
|
||||
DEV's design inspiration is meant to be a throwback. In personality and design,
|
||||
it is ATARI inspired. Magazines like PAPER are also an inspiration in terms of
|
||||
being a
|
||||
Forem's design inspiration is meant to be a throwback. In personality and
|
||||
design, it is ATARI inspired. Magazines like PAPER are also an inspiration in
|
||||
terms of being a
|
||||
[bold contrast with some more indy](https://www.google.com/search?biw=1440&bih=780&tbm=isch&sa=1&ei=KSN8W5WVLoy55gLI77TgBA&q=paper+magazine+cover&oq=paper+magazine+cover).
|
||||
|
||||
We also think in terms of how people use the DEV brand for their own purposes.
|
||||
We also think in terms of how people use the Forem brand for their own purposes.
|
||||
Profiles are very much public-facing records of what people have put out into
|
||||
the world. `dev.to/{username}` is your dev identity.
|
||||
the world. `dev.to/{username}` is your developer identity.
|
||||
|
||||
Imagine a developer's face with the DEV heading above them. If we existed in the
|
||||
80's, we would have been "DEV MAGAZINE," with the exact same branding.
|
||||
|
|
@ -23,12 +23,12 @@ Imagine a developer's face with the DEV heading above them. If we existed in the
|
|||
- [Joystick](http://www.pixelsagas.com/?download=joystick) should be used for
|
||||
logos, not for headlines/phrases.
|
||||
- Black and white is our default logo, but the logo can be drawn in any color.
|
||||
- DEV is "old school cool."
|
||||
- Forem/DEV is "old school cool."
|
||||
- We use bold shadows (no gradient) for boxes.
|
||||
- We have a minimal approach to importing dependencies, so few if any custom
|
||||
fonts on-site for that reason.
|
||||
- Refer to the `variables.scss`
|
||||
[file in our main repo](https://github.com/thepracticaldev/dev.to/blob/master/app/assets/stylesheets/variables.scss)
|
||||
[file in our main repo](https://github.com/forem/forem/blob/master/app/assets/stylesheets/variables.scss)
|
||||
to reference commonly-used colors and fonts.
|
||||
|
||||
## Design License Info
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: Theming Guidelines
|
|||
|
||||
# Theming Guidelines
|
||||
|
||||
DEV supports different themes, such as Default, Night, Pink.
|
||||
Forem supports different themes, such as Default, Night, Pink.
|
||||
|
||||
You can switch the theme at <http://localhost:3000/settings/ux> in the "Style
|
||||
Customization" section.
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ you debug your web application. Consider learning how to use them.
|
|||
[Visual Studio Code](https://code.visualstudio.com) (VS Code) is a popular
|
||||
editor that allows you to debug many languages including JavaScript. Thanks to
|
||||
remote debugging technologies, we can debug our frontend code in VS Code. When
|
||||
you clone the DEV repository and open the project in VS Code, you will be
|
||||
you clone the Forem repository and open the project in VS Code, you will be
|
||||
prompted to install recommended extensions which include the
|
||||
[Chrome Debugger](https://code.visualstudio.com/blogs/2016/02/23/introducing-chrome-debugger-for-vs-code)
|
||||
and the
|
||||
|
|
@ -28,8 +28,8 @@ Setup:
|
|||
|
||||
- Refer to the respective debugger extension documentation above to ensure that
|
||||
your browser is running with remote debugging enabled.
|
||||
- Once you have your local installation of DEV running, you can attach to either
|
||||
the Chrome or Edge Debugger.
|
||||
- Once you have your local installation of Forem running, you can attach to
|
||||
either the Chrome or Edge Debugger.
|
||||
|
||||

|
||||
|
|
@ -51,6 +51,6 @@ Preact has their
|
|||
of a browser extension. These tools are currently supported for Preact version
|
||||
10.x and up.
|
||||
|
||||
DEV currently uses Preact 8.x so the Preact developer tools are not an option,
|
||||
Forem currently uses Preact 8.x so the Preact developer tools are not an option,
|
||||
however Preact 8.x+ is compatible with the React developer tools extension which
|
||||
is available for Chrome and Firefox.
|
||||
|
|
|
|||
|
|
@ -7,23 +7,23 @@ title: Dynamic Imports
|
|||
[Dynamic imports](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/#Dynamic_Imports)
|
||||
are supported in all major browsers except for Edge
|
||||
([EdgeHTML](https://en.wikipedia.org/wiki/EdgeHTML) version) and Internet
|
||||
Explorer which are both unsupported browsers for DEV. They allow you to import
|
||||
Explorer which are both unsupported browsers for Forem. They allow you to import
|
||||
JavaScript dynamically instead of statically. Why is this important?
|
||||
Performance.
|
||||
|
||||
Should you use them everywhere? No. They are a great tool when you need to load a
|
||||
JavaScript module on the fly for functionality that is not needed immediately
|
||||
Should you use them everywhere? No. They are a great tool when you need to load
|
||||
a JavaScript module on the fly for functionality that is not needed immediately
|
||||
for the page to be usable.
|
||||
|
||||
Here are a couple of examples of dynamic import usage on DEV:
|
||||
Here are a couple of examples of dynamic import usage on Forem:
|
||||
|
||||
- The
|
||||
[Onboarding flow](https://github.com/thepracticaldev/dev.to/blob/master/app/javascript/packs/Onboarding.jsx#L28).
|
||||
[Onboarding flow](https://github.com/forem/forem/blob/master/app/javascript/packs/Onboarding.jsx#L28).
|
||||
- In
|
||||
[connect](https://github.com/thepracticaldev/dev.to/blob/master/app/javascript/chat/codeEditor.jsx#L11)
|
||||
[connect](https://github.com/forem/forem/blob/master/app/javascript/chat/codeEditor.jsx#L11)
|
||||
(chat)
|
||||
|
||||
DEV uses [webpacker](frontend/webpacker) (webpack), so what webpack will do is
|
||||
Forem uses [webpacker](frontend/webpacker) (webpack), so what webpack will do is
|
||||
create separate bundles for code that is dynamically imported. So not only do we
|
||||
end up loading code only when we need it, we also end up with smaller bundle
|
||||
sizes in the frontend.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Aside from prefetching pages, InstantClick also allows you to customize what
|
|||
happens when an InstantClick page changes.
|
||||
|
||||
```javascript
|
||||
// Found in https://github.com/thepracticaldev/dev.to/blob/master/app/javascript/packs/githubRepos.jsx#L11)
|
||||
// Found in https://github.com/forem/forem/blob/master/app/javascript/packs/githubRepos.jsx#L11)
|
||||
window.InstantClick.on('change', () => {
|
||||
loadElement();
|
||||
});
|
||||
|
|
@ -24,7 +24,7 @@ You can also decide whether or not to reevaluate a script in an InstantClick
|
|||
loaded page via the `data-no-instant` attribute.
|
||||
|
||||
```javascript
|
||||
// Found in https://github.com/thepracticaldev/dev.to/blob/master/app/assets/javascripts/utilities/buildCommentHTML.js.erb#L80
|
||||
// Found in https://github.com/forem/forem/blob/master/app/assets/javascripts/utilities/buildCommentHTML.js.erb#L80
|
||||
function actions(comment) {
|
||||
if (comment.newly_created) {
|
||||
return '<div class="actions" data-comment-id="'+comment.id+'" data-path="'+comment.url+'">\
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ handles linting, but eslint rules related to code formatting, they get handled
|
|||
by prettier. For the most part, out of the box rules provided by the
|
||||
configurations that are extended are used but there are some tweaks.
|
||||
|
||||
DEV also has some objects that live in the global scope, e.g. Pusher. The eslint
|
||||
globals section of the eslint configuration is what enables these to be reported
|
||||
as existing when eslint runs.
|
||||
Forem also has some objects that live in the global scope, e.g. Pusher. The
|
||||
eslint globals section of the eslint configuration is what enables these to be
|
||||
reported as existing when eslint runs.
|
||||
|
||||
```javascript
|
||||
globals: {
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ title: Liquid Tags
|
|||
# Liquid Tags
|
||||
|
||||
Liquid tags are special elements of the
|
||||
[DEV Markdown editor](https://dev.to/new).
|
||||
[Forem Markdown editor](https://dev.to/new).
|
||||
|
||||
They are custom embeds that are added via a `{% %}` syntax.
|
||||
[Liquid](https://shopify.github.io/liquid/) is a templating language developed
|
||||
by Shopify.
|
||||
|
||||
Liquid embeds are for tweets, like `{% tweet 765282762081329153 %}` or a DEV
|
||||
Liquid embeds are for tweets, like `{% tweet 765282762081329153 %}` or a Forem
|
||||
user profile preview, like `{% user jess %}` etc.
|
||||
|
||||
They make for good community contributions because they can be extended and
|
||||
|
|
@ -27,7 +27,7 @@ arguments they take. Currently, this could use improvements.
|
|||
_Note: Liquid tags are "compiled" when an article is saved. So you will need to
|
||||
re-save articles to see HTML changes._
|
||||
|
||||
Here is a bunch of liquid tags supported on DEV:
|
||||
Here is a bunch of liquid tags supported on Forem:
|
||||
|
||||
```liquid
|
||||
{% link https://dev.to/kazz/boost-your-productivity-using-markdown-1be %}
|
||||
|
|
@ -37,7 +37,7 @@ Here is a bunch of liquid tags supported on DEV:
|
|||
{% podcast https://dev.to/basecspodcast/s2e2--queues-irl %}
|
||||
{% twitter 834439977220112384 %}
|
||||
{% glitch earthy-course %}
|
||||
{% github thepracticaldev/dev.to %}
|
||||
{% github forem/forem %}
|
||||
{% youtube dQw4w9WgXcQ %}
|
||||
{% vimeo 193110695 %}
|
||||
{% slideshare rdOzN9kr1yK5eE %}
|
||||
|
|
@ -107,7 +107,7 @@ classes should generally be prepended by `ltag__`. e.g. `ltag__tag__content`
|
|||
etc.
|
||||
|
||||
Here is an example of a good Liquid Tag pull request...
|
||||
https://github.com/thepracticaldev/dev.to/pull/3801
|
||||
https://github.com/forem/forem/pull/3801
|
||||
|
||||
### Restricting liquid tags by roles
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: JavaScript and Initializers
|
|||
|
||||
# JavaScript and Initializers
|
||||
|
||||
DEV has two JavaScript codebases.
|
||||
Forem has two JavaScript codebases.
|
||||
|
||||
One is located in the directory `app/assets/javascripts` and contains plain
|
||||
JavaScript (mostly ES5+) being served using
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ That is a bit of refactoring that needs to be done. PRs welcome!
|
|||
Important files when working with SASS in the project:
|
||||
|
||||
- variables:
|
||||
[/app/assets/stylesheets/variables.scss](https://github.com/thepracticaldev/dev.to/blob/master/app/assets/stylesheets/variables.scss)
|
||||
[/app/assets/stylesheets/variables.scss](https://github.com/forem/forem/blob/master/app/assets/stylesheets/variables.scss)
|
||||
- mixins:
|
||||
[/app/assets/stylesheets/_mixins.scss](https://github.com/thepracticaldev/dev.to/blob/master/app/assets/stylesheets/_mixins.scss)
|
||||
[/app/assets/stylesheets/\_mixins.scss](https://github.com/forem/forem/blob/master/app/assets/stylesheets/_mixins.scss)
|
||||
|
||||
SASS is compiled and served using
|
||||
[Sprockets](https://github.com/rails/sprockets-rails) which packages static
|
||||
assets in Rails.
|
||||
|
||||
For more about branding, theming or design in general in regards to DEV, refer
|
||||
For more about branding, theming or design in general in regards to Forem, refer
|
||||
to the [Design Guide](/design) documentation.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: Webpacker
|
|||
|
||||
# Webpacker
|
||||
|
||||
DEV has two JavaScript codebases.
|
||||
Forem has two JavaScript codebases.
|
||||
|
||||
One contains plain JavaScript,
|
||||
[which you can read more about in this guide](/frontend/plain-js).
|
||||
|
|
@ -18,8 +18,8 @@ integrated into the Rails app using `Webpacker`.
|
|||
There is a packs directory `/app/javascript/packs` where you can create new
|
||||
"pack" files. Pack files are initializers for Webpacker.
|
||||
|
||||
Since DEV is not a Single Page Application (SPA), Preact components are mounted
|
||||
as needed by including the pack file in the view files.
|
||||
Since Forem is not a Single Page Application (SPA), Preact components are
|
||||
mounted as needed by including the pack file in the view files.
|
||||
|
||||
For example:
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ provides a fake default for any missing keys.
|
|||
The [backend guide][backend_guide] will show you how to get free API keys for
|
||||
additional services that may be required to run certain parts of the app.
|
||||
|
||||
To set up keys for your local instance of DEV, you'll need to create an
|
||||
To set up keys for your local instance of Forem, you'll need to create an
|
||||
`application.yml` file. You can do this by copying the file called
|
||||
`sample_application.yml` in the `config` directory:
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: Preparing the Database
|
|||
|
||||
# Preparing the database
|
||||
|
||||
The next step is to create and prepare the database. Because DEV is a Rails
|
||||
The next step is to create and prepare the database. Because Forem is a Rails
|
||||
application, we have built-in tools to help us.
|
||||
|
||||
We can use Rails to create our database, load the schema, and add some seed
|
||||
|
|
|
|||
|
|
@ -9,20 +9,21 @@ The first step in contributing to any Open Source project on GitHub is
|
|||
you're not familiar with the idea of forking a repository, [GitHub has a super
|
||||
simple tutorial][forking_tutorial]!
|
||||
|
||||
If you're ready to get started, [fork DEV's repository][fork_dev]!
|
||||
If you're ready to get started, [fork Forem's repository][fork_dev]!
|
||||
|
||||
Once you've got a fork on GitHub, you can clone your fork to run the project
|
||||
locally:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/<your-username>/dev.to.git
|
||||
git clone https://github.com/<your-username>/forem.git
|
||||
```
|
||||
|
||||
As time goes on, you may need to refresh your fork. If you have trouble with
|
||||
that, you can read about [keeping a fork caught up on DEV][refresh_your_fork]!
|
||||
that, you can read about [keeping a fork caught up on Forem][refresh_your_fork]!
|
||||
|
||||
[forking]: https://help.github.com/en/articles/fork-a-repo
|
||||
[fork_dev]: https://github.com/thepracticaldev/dev.to/fork
|
||||
[fork_dev]: https://github.com/forem/forem/fork
|
||||
[forking_tutorial]: https://guides.github.com/activities/forking/
|
||||
[pull_requests]: https://help.github.com/en/articles/about-pull-requests
|
||||
[refresh_your_fork]: https://dev.to/jacobherrington/a-fool-proof-way-to-keep-your-fork-caught-up-in-git-2e2e
|
||||
[refresh_your_fork]:
|
||||
https://dev.to/jacobherrington/a-fool-proof-way-to-keep-your-fork-caught-up-in-git-2e2e
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ title: Preparing a Pull Request
|
|||
[Draft PR](https://github.blog/2019-02-14-introducing-draft-pull-requests/)
|
||||
feature.
|
||||
- Make sure all tests pass and add additional tests for the code you submit.
|
||||
[More info here](https://docs.dev.to/tests/).
|
||||
[More info here](https://docs.forem.com/tests/).
|
||||
- Document your reasoning behind the changes. Explain why you wrote the code in
|
||||
the way you did. The code should explain what it does.
|
||||
- If there's an existing issue related to the pull request, reference to it by
|
||||
|
|
@ -21,6 +21,6 @@ title: Preparing a Pull Request
|
|||
- All commits in a pull request will be squashed when merged, but when your PR
|
||||
is approved and passes our CI, it will eventually be live on production!
|
||||
|
||||
If the pull request affects the public API in any way, a post on DEV from the
|
||||
DEV Team account should accompany it. This is the duty of the core team to carry
|
||||
out.
|
||||
If the pull request affects the public API in any way, a post on Forem from the
|
||||
Forem Team account should accompany it. This is the duty of the core team to
|
||||
carry out.
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ If you run into issues while trying to run `bin/setup` and the error message
|
|||
isn't helpful, try running `bin/rails s -p 3000`. For example, you may need to
|
||||
`yarn install` before starting the app.
|
||||
|
||||
If you're working on DEV regularly, you can use `alias start="bin/startup"` to
|
||||
If you're working on Forem regularly, you can use `alias start="bin/startup"` to
|
||||
make this even easier. 😊
|
||||
|
||||
If you're using **`pry`** for debugging in Rails, note that using `foreman` and
|
||||
|
|
|
|||
|
|
@ -4,15 +4,15 @@ title: Keeping Your Fork In Sync
|
|||
|
||||
# Keeping your fork in sync
|
||||
|
||||
Now that you have a fork of DEV's source code, there is work you will need to do
|
||||
to keep it updated.
|
||||
Now that you have a fork of Forem's source code, there is work you will need to
|
||||
do to keep it updated.
|
||||
|
||||
## Setup your upstream
|
||||
|
||||
Inside your DEV directory, add a remote to the official DEV repo:
|
||||
Inside your Forem directory, add a remote to the official Forem repo:
|
||||
|
||||
```shell
|
||||
git remote add upstream https://github.com/thepracticaldev/dev.to.git
|
||||
git remote add upstream https://github.com/forem/forem.git
|
||||
```
|
||||
|
||||
## Rebasing from upstream
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
title: Containers
|
||||
---
|
||||
|
||||
# Installing DEV using Containers
|
||||
# Installing Forem using Containers
|
||||
|
||||
If you encounter any errors with our Container setup, please kindly
|
||||
[report any issues](https://github.com/thepracticaldev/dev.to/issues/new/choose)!
|
||||
[report any issues](https://github.com/forem/forem/issues/new/choose)!
|
||||
|
||||
## Installing prerequisites
|
||||
|
||||
|
|
@ -16,41 +16,49 @@ Docker or Podman._
|
|||
|
||||
A container engine is software that runs and manages containers on a computer.
|
||||
One of the most widely known Container Engines is Docker, but there are many
|
||||
other Container Engines available, such as [Podman](https://podman.io/), [CRI-O](https://cri-o.io/), and [LXD](https://linuxcontainers.org/lxd/introduction/).
|
||||
other Container Engines available, such as [Podman](https://podman.io/),
|
||||
[CRI-O](https://cri-o.io/), and
|
||||
[LXD](https://linuxcontainers.org/lxd/introduction/).
|
||||
|
||||
DEV supports two Container Engines: Docker and Podman.
|
||||
Forem supports two Container Engines: Docker and Podman.
|
||||
|
||||
### Docker
|
||||
|
||||
DEV can be setup with Docker and Docker Compose on macOS or Linux systems.
|
||||
Forem can be setup with Docker and Docker Compose on macOS or Linux systems.
|
||||
|
||||
Docker is available for many different operating systems. You may use Docker as your Container Engine on both macOS and Linux workstations. As of right now Docker is the only Container Engine for macOS and we recommend you follow the [Docker Desktop on Mac](https://docs.docker.com/docker-for-mac/install/),
|
||||
Docker is available for many different operating systems. You may use Docker as
|
||||
your Container Engine on both macOS and Linux workstations. As of right now
|
||||
Docker is the only Container Engine for macOS and we recommend you follow the
|
||||
[Docker Desktop on Mac](https://docs.docker.com/docker-for-mac/install/),
|
||||
install instructions to get Docker and Docker Compose installed.
|
||||
|
||||
Docker also works well on Linux distributions that have not moved to cgroup v2.
|
||||
You can install it by following their [Installation per distro](https://docs.docker.com/engine/install/)
|
||||
to get Docker and you can install Docker Compose by following these
|
||||
You can install it by following their
|
||||
[Installation per distro](https://docs.docker.com/engine/install/) to get Docker
|
||||
and you can install Docker Compose by following these
|
||||
[instructions](https://docs.docker.com/compose/install/).
|
||||
|
||||
### Podman
|
||||
|
||||
DEV can be setup with Podman and Podman Compose on Linux systems.
|
||||
Forem can be setup with Podman and Podman Compose on Linux systems.
|
||||
|
||||
[Podman](https://podman.io/) is an FOSS project that provides a Container Engine
|
||||
that is daemonless which only runs on Linux systems. It can be run as the root
|
||||
user or as a non-privileged user. It also provides a Docker-compatible
|
||||
command line interface. Podman is available on many different Linux distributions
|
||||
and it can be installed by following these [instructions](https://podman.io/getting-started/installation).
|
||||
user or as a non-privileged user. It also provides a Docker-compatible command
|
||||
line interface. Podman is available on many different Linux distributions and it
|
||||
can be installed by following these
|
||||
[instructions](https://podman.io/getting-started/installation).
|
||||
|
||||
[Podman Compose](https://github.com/containers/podman-compose) is a an early
|
||||
project under development that is implementing docker-compose like experience
|
||||
with Podman. You can install it by following these [instructions](https://github.com/containers/podman-compose#installation).
|
||||
with Podman. You can install it by following these
|
||||
[instructions](https://github.com/containers/podman-compose#installation).
|
||||
|
||||
## Setting up DEV
|
||||
## Setting up Forem
|
||||
|
||||
1. Fork DEV's repository, e.g. <https://github.com/thepracticaldev/dev.to/fork>
|
||||
1. Fork Forem's repository, e.g. <https://github.com/forem/forem/fork>
|
||||
1. Clone your forked repository, eg.
|
||||
`git clone https://github.com/<your-username>/dev.to.git`
|
||||
`git clone https://github.com/<your-username>/forem.git`
|
||||
1. Set up your environment variables/secrets
|
||||
|
||||
- Take a look at `Envfile`. This file lists all the `ENV` variables we use
|
||||
|
|
@ -74,7 +82,7 @@ with Podman. You can install it by following these [instructions](https://github
|
|||
- You do not need "real" keys for basic development. Some features require
|
||||
certain keys, so you may be able to add them as you go.
|
||||
|
||||
## Running DEV with Docker via docker-compose
|
||||
## Running Forem with Docker via docker-compose
|
||||
|
||||
1. Run `bin/container-setup`
|
||||
2. That's it! Navigate to <http://localhost:3000>
|
||||
|
|
@ -84,7 +92,7 @@ The script executes the following steps:
|
|||
1. `docker-compose build`
|
||||
2. `docker-compose up`
|
||||
|
||||
## Running DEV with Podman via podman-compose
|
||||
## Running Forem with Podman via podman-compose
|
||||
|
||||
1. Run `bin/container-setup`
|
||||
2. That's it! Navigate to <http://localhost:3000>
|
||||
|
|
|
|||
|
|
@ -4,12 +4,11 @@ title: GitPod
|
|||
|
||||
# GitPod
|
||||
|
||||
If you prefer working on a cloud IDE, you can spin up your own instance of DEV
|
||||
in the cloud, using
|
||||
[GitPod](https://gitpod.io/#https://github.com/thepracticaldev/dev.to).
|
||||
If you prefer working on a cloud IDE, you can spin up your own instance of Forem
|
||||
in the cloud, using [GitPod](https://gitpod.io/#https://github.com/forem/forem).
|
||||
|
||||
[](https://gitpod.io/#https://github.com/thepracticaldev/dev.to)
|
||||
Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/forem/forem)
|
||||
|
||||
You can find more information about this, [in a DEV's
|
||||
article](https://dev.to/ben/spin-up-a-local-instance-of-dev-in-the-cloud-with-gitpod-it-s-incredibly-simple-pij).
|
||||
You can find more information about this,
|
||||
[in a Forem's article](https://dev.to/ben/spin-up-a-local-instance-of-dev-in-the-cloud-with-gitpod-it-s-incredibly-simple-pij).
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
title: Linux
|
||||
---
|
||||
|
||||
# Installing DEV on Linux
|
||||
# Installing Forem on Linux
|
||||
|
||||
## Installing prerequisites
|
||||
|
||||
|
|
@ -36,7 +36,7 @@ There are two ways to install Yarn.
|
|||
|
||||
### PostgreSQL
|
||||
|
||||
DEV requires PostgreSQL version 11 or higher.
|
||||
Forem requires PostgreSQL version 11 or higher.
|
||||
|
||||
1. Run
|
||||
`sudo apt update && sudo apt install postgresql postgresql-contrib libpq-dev`.
|
||||
|
|
@ -51,7 +51,8 @@ check out our [PostgreSQL setup guide](/installation/postgresql) or the official
|
|||
|
||||
### ImageMagick
|
||||
|
||||
DEV uses [ImageMagick](https://imagemagick.org/) to manipulate images on upload.
|
||||
Forem uses [ImageMagick](https://imagemagick.org/) to manipulate images on
|
||||
upload.
|
||||
|
||||
Please refer to ImageMagick's
|
||||
[instructions](https://imagemagick.org/script/download.php) on how to install
|
||||
|
|
@ -59,7 +60,7 @@ it.
|
|||
|
||||
### Redis
|
||||
|
||||
DEV requires Redis version 4.0 or higher.
|
||||
Forem requires Redis version 4.0 or higher.
|
||||
|
||||
We recommend following Digital Ocean's extensive
|
||||
[How To Install and Configure Redis on Ubuntu 16.04](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04)
|
||||
|
|
@ -67,8 +68,8 @@ We recommend following Digital Ocean's extensive
|
|||
|
||||
### Elasticsearch
|
||||
|
||||
DEV requires a version of Elasticsearch between 7.1 and 7.5. Version 7.6 is not
|
||||
supported. We recommend version 7.5.2.
|
||||
Forem requires a version of Elasticsearch between 7.1 and 7.5. Version 7.6 is
|
||||
not supported. We recommend version 7.5.2.
|
||||
|
||||
We recommend following
|
||||
[Elasticsearch's guide for installing on Linux](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/targz.html#install-linux).
|
||||
|
|
@ -80,11 +81,11 @@ or a
|
|||
|
||||
NOTE: Make sure to download **the OSS version**, `elasticsearch-oss`.
|
||||
|
||||
## Installing DEV
|
||||
## Installing Forem
|
||||
|
||||
1. Fork DEV's repository, e.g. <https://github.com/thepracticaldev/dev.to/fork>
|
||||
1. Fork Forem's repository, e.g. <https://github.com/forem/forem/fork>
|
||||
1. Clone your forked repository, e.g.
|
||||
`git clone https://github.com/<your-username>/dev.to.git`
|
||||
`git clone https://github.com/<your-username>/forem.git`
|
||||
1. Install bundler with `gem install bundler`
|
||||
1. Set up your environment variables/secrets
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
title: macOS
|
||||
---
|
||||
|
||||
# Installing DEV on macOS
|
||||
# Installing Forem on macOS
|
||||
|
||||
## Installing prerequisites
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ Please refer to their [installation guide](https://yarnpkg.com/en/docs/install).
|
|||
|
||||
### PostgreSQL
|
||||
|
||||
DEV requires PostgreSQL version 11 or higher.
|
||||
Forem requires PostgreSQL version 11 or higher.
|
||||
|
||||
The easiest way to get started is to use
|
||||
[Postgres.app](https://postgresapp.com/). Alternatively, check out the official
|
||||
|
|
@ -31,13 +31,14 @@ For additional configuration options, check our
|
|||
|
||||
### ImageMagick
|
||||
|
||||
DEV uses [ImageMagick](https://imagemagick.org/) to manipulate images on upload.
|
||||
Forem uses [ImageMagick](https://imagemagick.org/) to manipulate images on
|
||||
upload.
|
||||
|
||||
You can install ImageMagick with `brew install imagemagick`.
|
||||
|
||||
### Redis
|
||||
|
||||
DEV requires Redis version 4.0 or higher.
|
||||
Forem requires Redis version 4.0 or higher.
|
||||
|
||||
We recommend using [Homebrew](https://brew.sh):
|
||||
|
||||
|
|
@ -60,8 +61,8 @@ redis-cli ping
|
|||
|
||||
### Elasticsearch
|
||||
|
||||
DEV requires a version of Elasticsearch between 7.1 and 7.5. Version 7.6 is not
|
||||
supported. We recommend version 7.5.2.
|
||||
Forem requires a version of Elasticsearch between 7.1 and 7.5. Version 7.6 is
|
||||
not supported. We recommend version 7.5.2.
|
||||
|
||||
You have the option of installing Elasticsearch with Homebrew or through an
|
||||
archive. We recommend installing from archive on Mac.
|
||||
|
|
@ -192,13 +193,13 @@ your local Elasticsearch installation, for example:
|
|||
}
|
||||
```
|
||||
|
||||
## Installing DEV
|
||||
## Installing Forem
|
||||
|
||||
1. Fork DEV's repository, e.g. <https://github.com/thepracticaldev/dev.to/fork>
|
||||
1. Fork Forem's repository, e.g. <https://github.com/forem/forem/fork>
|
||||
2. Clone your forked repository in one of two ways:
|
||||
|
||||
- e.g. with HTTPS: `git clone https://github.com/<your-username>/dev.to.git`
|
||||
- e.g. with SSH: `git clone git@github.com:<your-username>/dev.to.git`
|
||||
- e.g. with HTTPS: `git clone https://github.com/<your-username>/forem.git`
|
||||
- e.g. with SSH: `git clone git@github.com:<your-username>/forem.git`
|
||||
|
||||
3. Install bundler with `gem install bundler`
|
||||
4. Set up your environment variables/secrets
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ items:
|
|||
# Installation Guide
|
||||
|
||||
There are many different ways you can install the **development environment** so
|
||||
you can help contribute code to DEV.
|
||||
you can help contribute code to Forem.
|
||||
|
||||
## Installing locally
|
||||
|
||||
You can install DEV to your local machine and we have instructions for
|
||||
You can install Forem to your local machine and we have instructions for
|
||||
[Mac](/installation/mac), [Windows](/installation/windows) and
|
||||
[Linux](/installation/linux).
|
||||
|
||||
|
|
@ -27,10 +27,10 @@ Installing to your local machine can be troublesome for many reasons such as a
|
|||
conflicting database and runtime versions.
|
||||
|
||||
Another way you can get a development environment up and running is with
|
||||
containers. They will set up everything you need in an isolated
|
||||
environment, and you need not worry about the details of setting everything up
|
||||
locally. We have instructions for getting set up with
|
||||
[containers](/installation/containers) quickly.
|
||||
containers. They will set up everything you need in an isolated environment, and
|
||||
you need not worry about the details of setting everything up locally. We have
|
||||
instructions for getting set up with [containers](/installation/containers)
|
||||
quickly.
|
||||
|
||||
## GitPod _- beginner friendly!_
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
title: Windows
|
||||
---
|
||||
|
||||
# Installing DEV on Windows 10
|
||||
# Installing Forem on Windows 10
|
||||
|
||||
## Installing prerequisites
|
||||
|
||||
|
|
@ -11,7 +11,7 @@ system machine._
|
|||
|
||||
### Installing WSL
|
||||
|
||||
Since DEV's codebase is using the Ruby on Rails framework, we will need to
|
||||
Since Forem's codebase is using the Ruby on Rails framework, we will need to
|
||||
install Windows Subsystem for Linux. Some dependencies used by the source code
|
||||
triggered errors when installing on Windows, so using WSL allows you to work on
|
||||
the software and not having to fix gem incompatibilities.
|
||||
|
|
@ -108,7 +108,7 @@ work fully. We install Node.js later on in the installation process.
|
|||
|
||||
### PostgreSQL
|
||||
|
||||
DEV requires PostgreSQL version 11 or higher.
|
||||
Forem requires PostgreSQL version 11 or higher.
|
||||
|
||||
If you don't have PostgreSQL installed on your Windows system, you can do so
|
||||
right now. WSL is able to connect to a PostgreSQL instance on your Windows
|
||||
|
|
@ -126,7 +126,8 @@ For additional configuration options, check our
|
|||
|
||||
### ImageMagick
|
||||
|
||||
DEV uses [ImageMagick](https://imagemagick.org/) to manipulate images on upload.
|
||||
Forem uses [ImageMagick](https://imagemagick.org/) to manipulate images on
|
||||
upload.
|
||||
|
||||
Please refer to ImageMagick's
|
||||
[instructions](https://imagemagick.org/script/download.php) on how to install
|
||||
|
|
@ -134,7 +135,7 @@ it.
|
|||
|
||||
### Redis
|
||||
|
||||
DEV requires Redis version 4.0 or higher.
|
||||
Forem requires Redis version 4.0 or higher.
|
||||
|
||||
We recommend to follow
|
||||
[this guide](https://redislabs.com/blog/redis-on-windows-10/) to run Redis under
|
||||
|
|
@ -142,8 +143,8 @@ WSL.
|
|||
|
||||
### Elasticsearch
|
||||
|
||||
DEV requires a version of Elasticsearch between 7.1 and 7.5. Version 7.6 is not
|
||||
supported. We recommend version 7.5.2.
|
||||
Forem requires a version of Elasticsearch between 7.1 and 7.5. Version 7.6 is
|
||||
not supported. We recommend version 7.5.2.
|
||||
|
||||
We recommend following the install guide
|
||||
[in Elasticsearch's docs](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/zip-windows.html)
|
||||
|
|
@ -151,13 +152,13 @@ for installing on Windows machines.
|
|||
|
||||
NOTE: Make sure to download **the OSS version**, `elasticsearch-oss`.
|
||||
|
||||
## Installing DEV
|
||||
## Installing Forem
|
||||
|
||||
1. Fork DEV's repository, eg. <https://github.com/thepracticaldev/dev.to/fork>
|
||||
1. Fork Forem's repository, eg. <https://github.com/forem/forem/fork>
|
||||
1. Clone your forked repository, eg.
|
||||
`git clone https://github.com/<your-username>/dev.to.git`
|
||||
1. Open the cloned dev.to folder in terminal with `cd dev.to`. Next, install
|
||||
Ruby with the following commands:
|
||||
`git clone https://github.com/<your-username>/forem.git`
|
||||
1. Open the cloned forem folder in terminal with `cd forem`. Next, install Ruby
|
||||
with the following commands:
|
||||
|
||||
```shell
|
||||
rbenv install $(cat .ruby-version)
|
||||
|
|
|
|||
|
|
@ -9,16 +9,16 @@ chosen to use [Ransack][ransack].
|
|||
|
||||
Ransack is a Ruby gem that makes searching relatively painless. It has excellent
|
||||
documentation, but if you're looking for an example of how it's being used on
|
||||
DEV, we've implemented it to help searching and sorting user reports.
|
||||
Forem, we've implemented it to help searching and sorting user reports.
|
||||
|
||||
The view responsible for managing user reports can be found at
|
||||
`localhost:3000/internal/reports` and Ransack can be seen in use on the index
|
||||
action of the [`internal/feedback_messages_controller`][feedback_messages].
|
||||
|
||||
For DEV, Ransack is being used exclusively in internal, for search problems in
|
||||
For Forem, Ransack is being used exclusively in internal, for search problems in
|
||||
other parts of the app we use [Elasticsearch][elasticsearch].
|
||||
|
||||
[feedback_messages]:
|
||||
https://github.com/thepracticaldev/dev.to/blob/4e41e4a2ac893fa2a6c36990cfe475858ffb086a/app/controllers/internal/feedback_messages_controller.rb#L4
|
||||
https://github.com/forem/forem/blob/4e41e4a2ac893fa2a6c36990cfe475858ffb086a/app/controllers/internal/feedback_messages_controller.rb#L4
|
||||
[ransack]: https://github.com/activerecord-hackery/ransack
|
||||
[elasticsearch]: /backend/elasticsearch
|
||||
|
|
|
|||
|
|
@ -10,9 +10,10 @@ Largely, we try to adhere to
|
|||
conventions in these views.
|
||||
|
||||
For layout, basic styles, and some interactions, we use
|
||||
[Bootstrap 4](https://getbootstrap.com/). DEV isn't dedicated to using Bootstrap
|
||||
for everything, but because our design team hasn't spent much time on these
|
||||
views, we find it's easier to stick with something many developers already know.
|
||||
[Bootstrap 4](https://getbootstrap.com/). Forem isn't dedicated to using
|
||||
Bootstrap for everything, but because our design team hasn't spent much time on
|
||||
these views, we find it's easier to stick with something many developers already
|
||||
know.
|
||||
|
||||
When a view requires some custom interactivity, we've historically leaned on
|
||||
vanilla JavaScript or jQuery, but going forward we've elected to use
|
||||
|
|
@ -31,7 +32,7 @@ We tend to prefer the `form_with` helper over the previous `form_for` and
|
|||
Stimulus is a modest frontend framework; its primary purpose is manipulating
|
||||
HTML. It does not provide templating features.
|
||||
|
||||
In the DEV application, [Webpacker](/frontend/webpacker/) is used to load
|
||||
In the Forem application, [Webpacker](/frontend/webpacker/) is used to load
|
||||
Stimulus controllers. Ideally, controllers serve as an abstraction for shared
|
||||
functionality between views.
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,12 @@ items:
|
|||
|
||||
# Internal Guide
|
||||
|
||||
The DEV application contains a rudimentary administration dashboard that lives
|
||||
The Forem application contains a rudimentary administration dashboard that lives
|
||||
behind the internal route.
|
||||
|
||||
The internal dashboard is made up of a series of views that range from
|
||||
administration tools to simplified reports. These tools are used by users with
|
||||
the `admin` or `super_admin` roles to administrate the DEV application.
|
||||
the `admin` or `super_admin` roles to administrate the Forem application.
|
||||
|
||||
Authorization for these tools is handled by the [Rolify][rolify] gem.
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,13 @@ This program is free software: you can redistribute it and/or modify it under
|
|||
the terms of the GNU Affero General Public License as published by the Free
|
||||
Software Foundation, either version 3 of the License, or (at your option) any
|
||||
later version. Please see the
|
||||
[LICENSE](https://github.com/thepracticaldev/dev.to/blob/master/LICENSE.md) file
|
||||
in our repository for the full text.
|
||||
[LICENSE](https://github.com/forem/forem/blob/master/LICENSE.md) file in our
|
||||
repository for the full text.
|
||||
|
||||
Like many open source projects, we require that contributors provide us with a
|
||||
Contributor License Agreement (CLA). By submitting code to the DEV project, you
|
||||
are granting us a right to use that code under the terms of the CLA.
|
||||
Contributor License Agreement (CLA). By submitting code to the Forem/DEV
|
||||
project, you are granting us a right to use that code under the terms of the
|
||||
CLA.
|
||||
|
||||
Our version of the CLA was adapted from the Microsoft Contributor License
|
||||
Agreement, which they generously made available to the public domain under
|
||||
|
|
@ -21,12 +22,12 @@ Creative Commons CC0 1.0 Universal.
|
|||
|
||||
## Where can I learn more about the AGPL-3 license?
|
||||
|
||||
Please refer to the official “[Why the Affero
|
||||
GPL](https://www.gnu.org/licenses/why-affero-gpl.html)” and the [FAQ
|
||||
page](https://www.gnu.org/licenses/gpl-faq.html) on
|
||||
Please refer to the official
|
||||
“[Why the Affero GPL](https://www.gnu.org/licenses/why-affero-gpl.html)” and the
|
||||
[FAQ page](https://www.gnu.org/licenses/gpl-faq.html) on
|
||||
[GNU.org](https://www.gnu.org) for full details regarding this license.
|
||||
|
||||
## Why does DEV have a CLA?
|
||||
## Why does Forem have a CLA?
|
||||
|
||||
The Contributor License Agreement (CLA) is a legal document in which you state
|
||||
that you are entitled to contribute your code to the DEV codebase, and are
|
||||
|
|
@ -38,7 +39,7 @@ permissions at a later date.
|
|||
|
||||
## Am I giving away the copyright of my contributions?
|
||||
|
||||
No. You are granting DEV a license to use and distribute your contribution
|
||||
No. You are granting Forem a license to use and distribute your contribution
|
||||
without further restriction, not assigning the copyright.
|
||||
|
||||
## What if I have other questions?
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
title: Deployment Guide
|
||||
---
|
||||
|
||||
# Deploying DEV
|
||||
# Deploying Forem
|
||||
|
||||
Anyone with the ability to merge PRs on GitHub can deploy the application.
|
||||
Remember that this is a shared responsibility, so everyone should deploy code
|
||||
|
|
@ -24,7 +24,7 @@ any deployment!
|
|||
|
||||
## Overview
|
||||
|
||||
DEV relies on GitHub and Travis to deploy continuously to Heroku. If a Pull
|
||||
Forem relies on GitHub and Travis to deploy continuously to Heroku. If a Pull
|
||||
Request is merged with a `[deploy]` in its title, it will be automatically
|
||||
deployed to production once the build steps complete successfully. The process
|
||||
currently takes about 20 minutes to complete and will need a few additional
|
||||
|
|
@ -33,9 +33,9 @@ minutes before the change goes live.
|
|||
## Travis Stages
|
||||
|
||||
The following stages can be explored in our
|
||||
[.travis.yml](https://github.com/thepracticaldev/dev.to/blob/master/.travis.yml)
|
||||
and [Procfile](https://github.com/thepracticaldev/dev.to/blob/master/Procfile).
|
||||
Our Travis CI process consists of 2 stages.
|
||||
[.travis.yml](https://github.com/forem/forem/blob/master/.travis.yml) and
|
||||
[Procfile](https://github.com/forem/forem/blob/master/Procfile). Our Travis CI
|
||||
process consists of 2 stages.
|
||||
|
||||
1. Running our test suite in 3 parallel jobs.
|
||||
2. Deploying the application if we have merged with the master branch and the
|
||||
|
|
|
|||
|
|
@ -65,4 +65,4 @@ All required checks such as CI and Code Climate should be green.
|
|||
Once a PR is merged, it might need to be deployed. Deployment is a team
|
||||
responsibility, and everyone on the core team should be comfortable deploying
|
||||
code. For more information, read the
|
||||
[deployment guide](https://docs.dev.to/maintainers/deployment).
|
||||
[deployment guide](https://docs.forem.com/maintainers/deployment).
|
||||
|
|
|
|||
|
|
@ -7,56 +7,3 @@
|
|||
|
||||
[build]
|
||||
command = "make"
|
||||
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://docs.dev.to"
|
||||
to = "https://docs.dev.to"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://docs.dev.to/ruby-doc"
|
||||
to = "https://docs.dev.to/ruby-doc/index.html"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://docs.dev.to/ruby-doc/"
|
||||
to = "https://docs.dev.to/ruby-doc/index.html"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://docs.dev.to/api"
|
||||
to = "https://docs.dev.to/api/index.html"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://docs.dev.to/api/"
|
||||
to = "https://docs.dev.to/api/index.html"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://docs.dev.to/*"
|
||||
to = "https://docs.dev.to/:splat"
|
||||
status = 301
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "docs.dev.to"
|
||||
to = "https://docs.dev.to"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "docs.dev.to/*"
|
||||
to = "https://docs.dev.to/:splat"
|
||||
status = 301
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://devto.netlify.com"
|
||||
to = "https://docs.dev.to"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "http://devto.netlify.com/*"
|
||||
to = "https://docs.dev.to/:splat"
|
||||
status = 301
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "https://devto.netlify.com"
|
||||
to = "https://docs.dev.to"
|
||||
[[redirects]]
|
||||
force = true
|
||||
from = "https://devto.netlify.com/*"
|
||||
to = "https://docs.dev.to/:splat"
|
||||
status = 301
|
||||
|
|
|
|||
|
|
@ -16,23 +16,24 @@ items:
|
|||
- maintainers
|
||||
---
|
||||
|
||||
# Welcome to DEV's developer documentation
|
||||
# Welcome to Forem's developer documentation
|
||||
|
||||
On this site you'll find instructions to setup a [local instance of
|
||||
DEV][installation], documentation on the [architecture of DEV][architecture],
|
||||
[how to contribute][contributing], and many other useful documents.
|
||||
Forem][installation], documentation on the [architecture of
|
||||
Forem][architecture], [how to contribute][contributing], and many other useful
|
||||
documents.
|
||||
|
||||
This documentation site is the product of a number of volunteer contributors
|
||||
working alongside the DEV Core Team, special thanks to all those who have
|
||||
working alongside the Forem Core Team, special thanks to all those who have
|
||||
contributed to the documentation.
|
||||
|
||||
# Running the documentation locally
|
||||
|
||||
Like DEV, this site is open source and the code is [hosted on GitHub][docs]. If
|
||||
you find any incorrect information, or a even a typo, we'd love to see a pull
|
||||
Like Forem, this site is open source and the code is [hosted on GitHub][docs].
|
||||
If you find any incorrect information, or a even a typo, we'd love to see a pull
|
||||
request. Follow these steps to get the documentation site running locally.
|
||||
|
||||
DEV's documentation is built with [GitDocs NodeJS library][gitdocs].
|
||||
Forem's documentation is built with [GitDocs NodeJS library][gitdocs].
|
||||
|
||||
The first step to running the documentations locally is to install the `GitDocs`
|
||||
package globally.
|
||||
|
|
@ -49,7 +50,7 @@ Alternatively, you can use Yarn:
|
|||
yarn global add gitdocs
|
||||
```
|
||||
|
||||
Once installed, you should run `gitdocs serve` from the root of the dev.to
|
||||
Once installed, you should run `gitdocs serve` from the root of the `forem`
|
||||
project or from the `/docs` directory.
|
||||
|
||||
```shell
|
||||
|
|
@ -70,5 +71,5 @@ If you're looking for more information on contributing, check out the
|
|||
[installation]: /installation/
|
||||
[architecture]: /technical-overview/architecture/
|
||||
[contributing]: /contributing/
|
||||
[docs]: https://github.com/thepracticaldev/dev.to/tree/master/docs/
|
||||
[docs]: https://github.com/forem/forem/tree/master/docs/
|
||||
[gitdocs]: https://www.npmjs.com/package/gitdocs/
|
||||
|
|
|
|||
|
|
@ -28,11 +28,13 @@ platform.
|
|||
|
||||
- Certain aspects of the app are currently hardcoded. For instance: logos,
|
||||
certain elements of content, etc. If you were to host the current version of
|
||||
the app, you would be inadvertently impersonating the core dev.to project.
|
||||
- DEV has commercial licenses for certain design components as described in our
|
||||
[Design License Info](https://docs.dev.to/design/branding/#design-license-info)
|
||||
section. These licenses are specific to the dev.to project, and may not extend
|
||||
to self-hosted versions.
|
||||
the app, you would be inadvertently impersonating the core Forem/dev.to
|
||||
project.
|
||||
- Forem/DEV has commercial licenses for certain design components as described
|
||||
in our
|
||||
[Design License Info](https://docs.forem.com/design/branding/#design-license-info)
|
||||
section. These licenses are specific to the Forem/dev.to project, and may not
|
||||
extend to self-hosted versions.
|
||||
|
||||
### I want to stand up my own entity using the Forem codebase, how can I help?
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ To avoid blocking the initial render, we frequently write critical CSS inline,
|
|||
and we use the `defer` attribute to accelerate page loads. This practice results
|
||||
in a faster page load, and doesn't leave users waiting on heavy assets. However,
|
||||
this practice limits our ability to manipulate layout with JavaScript. As a
|
||||
rule, you should avoid relying on JavaScript for layout when working on DEV.
|
||||
rule, you should avoid relying on JavaScript for layout when working on Forem.
|
||||
|
||||
## We attempt to reduce our bundle size
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ shared among all users.
|
|||
|
||||
## Inter-page navigation
|
||||
|
||||
DEV uses a variation of "instant click", via
|
||||
Forem uses a variation of "instant click", via
|
||||
[InstantClick](/frontend/instant-click), which swaps out page content instead of
|
||||
making full-page requests. This approach is similar to the one used by the Rails
|
||||
gem `Turbolinks`, but our approach is more lightweight. The library is modified
|
||||
|
|
@ -150,7 +150,7 @@ The functionality of credits may be expanded in the future.
|
|||
|
||||
Users can belong to organizations, which have their own profile pages where
|
||||
posts can be published etc. This can be any group endeavor such as a company, an
|
||||
open source project, or any standalone publication on DEV.
|
||||
open source project, or any standalone publication on Forem.
|
||||
|
||||
## Reactions
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ title: Stack
|
|||
|
||||
## 🔑 Key App tech/services
|
||||
|
||||
For the Dev.to tech stack we use:
|
||||
For the Forem tech stack we use:
|
||||
|
||||
- [_Puma_](https://github.com/puma/puma) as the web server
|
||||
- [_PostgreSQL_](https://www.postgresql.org/) as the primary database
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@ title: Accessibility Tests
|
|||
# Accessibility Tests
|
||||
|
||||
Accessibility testing is a form of automated and manual testing that helps us
|
||||
identify some of the potential accessibility concerns on DEV.
|
||||
identify some of the potential accessibility concerns on Forem.
|
||||
|
||||
Many a11y issues are not obvious to everyone who contributes to the DEV project,
|
||||
therefore leaning on tools to help us identify these issues is a good practice.
|
||||
Many a11y issues are not obvious to everyone who contributes to the Forem
|
||||
project, therefore leaning on tools to help us identify these issues is a good
|
||||
practice.
|
||||
|
||||
It's a good idea to use browser plugins while you're developing to keep an eye
|
||||
out for these issues, as well as including automated tests to catch regressions
|
||||
|
|
@ -20,7 +21,7 @@ find potential a11y issues in your workflow.
|
|||
|
||||
## Automated testing in Preact
|
||||
|
||||
An overarching a11y testing strategy isn't currently in place for the DEV
|
||||
An overarching a11y testing strategy isn't currently in place for the Forem
|
||||
application, but there are some automated tools you can take advantage of in
|
||||
this project.
|
||||
|
||||
|
|
@ -31,5 +32,5 @@ testing as well.
|
|||
When you're writing Preact components, you can include some basic a11y testing
|
||||
in your unit tests with [jest-axe](https://github.com/nickcolley/jest-axe).
|
||||
|
||||
If you're still curious [there are some great talks on accessibility for
|
||||
developers](https://www.youtube.com/watch?v=8E9AEZjglqI).
|
||||
If you're still curious
|
||||
[there are some great talks on accessibility for developers](https://www.youtube.com/watch?v=8E9AEZjglqI).
|
||||
|
|
|
|||
|
|
@ -4,18 +4,17 @@ title: Code Climate
|
|||
|
||||
# Code Climate
|
||||
|
||||
We are using [Code
|
||||
Climate](https://codeclimate.com/github/thepracticaldev/dev.to) to track code
|
||||
quality and coverage.
|
||||
We are using [Code Climate](https://codeclimate.com/github/forem/forem) to track
|
||||
code quality and coverage.
|
||||
|
||||
Code Climate offers metrics regarding code quality for each individual PR,
|
||||
however, it does not calculate these metrics for the entirety of the project. If
|
||||
you'd like update the current linting rule, feel free to submit a PR to change
|
||||
it.
|
||||
|
||||
Before merging a PR to DEV, we expected Code Climate to pass on that PR. If you
|
||||
find Code Climate raising errors on your PR, please fix those issues. Do your
|
||||
best to leave code in a better state than you found it!
|
||||
Before merging a PR to Forem, we expected Code Climate to pass on that PR. If
|
||||
you find Code Climate raising errors on your PR, please fix those issues. Do
|
||||
your best to leave code in a better state than you found it!
|
||||
|
||||
We don't want to make a habit of pandering to Code Climate and its metrics
|
||||
blindly, so if you're in doubt regarding a suggestion on your PR please start a
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ a bug. Ideally, we test the functionality of the frontend and the backend.
|
|||
If you'd like to help us improve our test coverage, we recommend checking out
|
||||
our total coverage and writing tests for selected files based on SimpleCov's
|
||||
test coverage results. You can also check out
|
||||
[Code Climate summary](https://codeclimate.com/github/thepracticaldev/dev.to)
|
||||
which includes the test coverage.
|
||||
[Code Climate summary](https://codeclimate.com/github/forem/forem) which
|
||||
includes the test coverage.
|
||||
|
||||
If you're new to writing tests in general or with Rails, we recommend reading
|
||||
about
|
||||
|
|
@ -59,7 +59,7 @@ run into any issues. Strive to write good tests for the code you wish to
|
|||
contribute.
|
||||
|
||||
Travis will deploy your pull request to production after CI passes and a member
|
||||
of the DEV team has approved it.
|
||||
of the Forem team has approved it.
|
||||
|
||||
Our test suite is not perfect and sometimes a re-run is needed. If you encounter
|
||||
a "flaky spec" that fails intermittently please open an issue so we can address
|
||||
|
|
|
|||
|
|
@ -22,12 +22,12 @@ breaking previously functional software.
|
|||
|
||||
There is no perfect prescribed method for Regression testing, and it has evolved
|
||||
with the introduction of [Continuous Integration][ci] practices like the ones
|
||||
that DEV uses. However, CI doesn't replace the need for Regression testing.
|
||||
that Forem uses. However, CI doesn't replace the need for Regression testing.
|
||||
Regression tests should still be added to the codebase when bugs are discovered.
|
||||
|
||||
If you submit a bug patch to the DEV application, you might be asked to write a
|
||||
Regression test around your patch to help warn future DEV contributors if that
|
||||
bug ever makes another appearance. This practice has the added benefit of
|
||||
If you submit a bug patch to the Forem application, you might be asked to write
|
||||
a Regression test around your patch to help warn future Forem contributors if
|
||||
that bug ever makes another appearance. This practice has the added benefit of
|
||||
helping to ensure your patch fixes the bug.
|
||||
|
||||
[acceptance_tests]: /tests/acceptance-tests/
|
||||
|
|
|
|||
|
|
@ -39,8 +39,9 @@ where `10` is the line number of the test case that you want to execute.
|
|||
## Testing Controllers
|
||||
|
||||
Historically, it has been common to use Rspec to write tests for Rails
|
||||
controllers. This pattern isn't necessarily discouraged in the DEV codebase, but
|
||||
Rspec has introduced a more effective way to test controllers via Request Specs.
|
||||
controllers. This pattern isn't necessarily discouraged in the Forem codebase,
|
||||
but Rspec has introduced a more effective way to test controllers via Request
|
||||
Specs.
|
||||
|
||||
Request specs test the actions on a controller across the entire stack,
|
||||
effectively acting as Integration Tests. You can read more about request specs
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue