Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 8 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
Thank you for contributing!
# Contributing

## Getting Started
Thanks for helping out with NativePHP!

Be sure to fork and clone the repo: `gh repo clone NativePHP/nativephp.com`
Everything you need to know about contributing, from opening a pull request
to our Code of Conduct, is at
[nativephp.com/contributing](https://nativephp.com/contributing).

Make a branch for what change you want to contribute and open a pull request to the upstream main branch.

## Torchlight

The documentation uses [torchlight.dev](torchlight.dev) for syntax highlighting.

Without a token, you will run into an error on pages like "/docs/desktop/1/getting-started/introduction".

To get set up:

1. Create an account and then make a new API token [here](https://torchlight.dev/account/api-tokens).
2. Then set the API token in the .env.

```
TORCHLIGHT_TOKEN=<token>
```
Please don't report security vulnerabilities in public issues. Follow the
security policy at [nativephp.com/security](https://nativephp.com/security)
instead.
83 changes: 0 additions & 83 deletions resources/views/docs/mobile/4/getting-started/contributing.md

This file was deleted.

4 changes: 4 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
Route::redirect('docs/mobile/4/edge-components/screen', '/docs/mobile/4/edge-components/layout', 301);
Route::redirect('docs/mobile/4/edge-components/card', '/docs/mobile/4/edge-components/layout', 301);

// The mobile docs' contributing guide moved to the site-wide contributing page.
Route::redirect('docs/mobile/4/getting-started/contributing', '/contributing', 301);
Route::redirect('docs/mobile/getting-started/contributing', '/contributing', 301);

// Webhook routes (must be outside web middleware for CSRF bypass)
Route::post('opencollective/contribution', [OpenCollectiveWebhookController::class, 'handle'])->name('opencollective.webhook');

Expand Down
24 changes: 24 additions & 0 deletions tests/Feature/ContributingAndSecurityPagesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,30 @@ public function the_security_page_sends_private_services_to_support_and_third_pa
], false);
}

#[Test]
public function the_old_mobile_docs_contributing_page_redirects_permanently_to_the_contributing_page(): void
{
$this
->get('/docs/mobile/4/getting-started/contributing')
->assertMovedPermanently()
->assertRedirect('/contributing');
}

#[Test]
public function the_unversioned_mobile_docs_contributing_link_redirects_straight_to_the_contributing_page(): void
{
$this
->get('/docs/mobile/getting-started/contributing')
->assertMovedPermanently()
->assertRedirect('/contributing');
}

#[Test]
public function the_mobile_docs_no_longer_have_their_own_contributing_page(): void
{
$this->assertFileDoesNotExist(resource_path('views/docs/mobile/4/getting-started/contributing.md'));
}

#[Test]
public function the_footer_links_to_the_contributing_and_security_pages(): void
{
Expand Down
Loading