Skip to content

Commit

Permalink
Readme and styling improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
codedmonkey committed Oct 9, 2024
1 parent 86df67c commit a3d3f33
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 6 deletions.
4 changes: 4 additions & 0 deletions public/assets/conductor-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
--sidebar-menu-active-item-color: #FFB3C1;

--resize-handler-hover-bg: #835D6C;

--code-color: var(--text-color);
}

.ea-dark-scheme {
Expand Down Expand Up @@ -48,6 +50,8 @@
--link-color: var(--conductor-secondary);
--link-hover-color: var(--conductor-secondary-heavy);

--code-color: var(--text-color);

--bs-border-color: var(--conductor-primary);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Dashboard/DashboardRootController.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function configureMenuItems(): iterable
if ($user) {
yield MenuItem::linkToCrud('Access tokens', 'fa fa-key', AccessToken::class);
yield MenuItem::linkToRoute('Account', 'fa fa-id-card', 'dashboard_account');
yield MenuItem::linkToLogout('Sign out', 'fa fa-user');
yield MenuItem::linkToLogout('Sign out', 'fa fa-user-xmark');
} else {
yield MenuItem::linkToRoute('Sign in', 'fa fa-user', 'dashboard_login');

Expand Down
30 changes: 30 additions & 0 deletions templates/dashboard/docs/admin/mirroring.md.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Mirroring packages
---

Conductor can mirror packages from other registries allowing it to serve as a proxy for packagist.org, a Satis
installation or other third-party registries. You can manually add packages from an external registry or enable dynamic
mirroring so new packages automatically get added to the registry when a developer adds a package to their project
(through `composer update`).

When developers use Composer to install new packages that aren't in the registry yet, it checks for external registries
having automatic mirroring enabled and adds the package from the first registry that returns it. To change the order
of registries, move the registries up and down in the **Registries** overview.

## Add external registry
To add an external registry, go to **Registries** in the sidebar and click **Add Registry**.

### Package mirroring
When adding an external registry, you have the following options regarding package mirroring:

**Package mirroring disabled**<br>
Package mirroring is disabled for this external registry so new packages can't be added. Existing packages already
being mirrored will remain in the registry.

**Only mirror specified packages**<br>
Packages have to be manually added by an administrator from the registry. When developers request a new package the
registry will not request the package from this external registry.

**Automatically mirror packages on request**<br>
Packages can be added manually or will be created automatically when requested by a developer installing packages
(through `composer update`).
4 changes: 3 additions & 1 deletion templates/dashboard/docs/admin/readme.md.twig
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---
title: Admin Documentation
title: Administration Documentation
---

- [Mirroring packages](mirroring)
32 changes: 28 additions & 4 deletions templates/dashboard/docs/usage/composer-project.md.twig
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
title: Using Conductor in a Composer project
---

If you haven't already, make sure to [set up authentication](composer-authentication) for your Composer installation.

To start using your Conductor registry in a Composer project, you'll need to add some configuration to the
`composer.json` file, or specify it as a command line option when creating new projects. The examples on this page
also disable fetching from Packagist directly.
Expand All @@ -12,16 +10,38 @@ also disable fetching from Packagist directly.

## New projects

If you haven't already, make sure to [set up authentication](composer-authentication) for your Composer installation.

### composer init

Run the following command to interactively generate a new `composer.json` file in your current directory. This registry
is automatically added to your project.

```shell
composer init --repository="{{ app.request.getSchemeAndHttpHost() }}"
```

If mirroring of Packagist is enabled, include `--repository='{"packagist.org": false}'` in the command so
the project takes full advantage of the capabilities of the registry.

```shell
composer init --repository="{{ app.request.getSchemeAndHttpHost() }}" --repository='{"packagist.org": false}'
```

### composer create-project

Run the following command to generate a Composer project from a package called `acme/website` in the
`my-project` directory.

```shell
composer create-project acme/website --add-repository --repository="{{ app.request.getSchemeAndHttpHost() }}" --repository='{"packagist.org": false}'
composer create-project acme/website --add-repository --repository="{{ app.request.getSchemeAndHttpHost() }}" my-project
```

If mirroring of Packagist is enabled, include `--repository='{"packagist.org": false}'` in the command so
the project takes full advantage of the capabilities of the registry.

```shell
composer create-project acme/website --add-repository --repository="{{ app.request.getSchemeAndHttpHost() }}" --repository='{"packagist.org": false}' my-project
```

## Existing projects
Expand All @@ -31,8 +51,13 @@ You can enable the Conductor registry on existing Composer projects by using the

### composer config

Run the following command to enable this registry

```shell
composer config repositories.{{ conductor.slug }} composer {{ app.request.getSchemeAndHttpHost() }}
```

```shell
composer config repositories.packagist.org false
```

Expand All @@ -46,4 +71,3 @@ composer config repositories.packagist.org false
]
}
```

0 comments on commit a3d3f33

Please sign in to comment.