Skip to content

Commit

Permalink
chore: update content (#10)
Browse files Browse the repository at this point in the history
* chore: update content

* ci: init package workflow

* ci: create dir before packaging

* ci: add release step
  • Loading branch information
gao-sun authored Feb 15, 2025
1 parent f6b4a01 commit 55237a5
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 3 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Package

on:
push:
branches:
- master
tags:
- v*
pull_request:

jobs:
package:
runs-on: ubuntu-latest
env:
SUFFIX: ${{ github.ref_type == 'tag' && github.ref_name || github.head_ref || github.sha }}

steps:
- uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'

- name: Install dependencies
run: composer install --no-dev --optimize-autoloader

- name: Create artifact
run: |
mkdir ~/logto
cp -r . ~/logto
cd ~
zip -X -r logto-plugin.zip logto/ -x "*/node_modules/*" ".*" "*/.*" composer.* README.md renovate.json
cd -
mv ~/logto-plugin.zip ./logto-plugin-${{ env.SUFFIX }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: logto-plugin-${{ env.SUFFIX }}
path: logto-plugin-${{ env.SUFFIX }}.zip
retention-days: 1
if-no-files-found: error

- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
draft: true
append_body: true
files: logto-plugin-${{ env.SUFFIX }}.zip
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,15 @@ This is the official WordPress plugin for [Logto](https://logto.io). It helps yo

## Get started

TBD
A step-by-step guide to help you get started with this plugin can be found in our [docs](https://docs.logto.io/quick-starts/wordpress-plugin).

### Minimum configuration

1. Before using the plugin, you need to create a **traditional web** application in your Logto Console.
2. In the application details page, you can find the **Logto endpoint**, **App ID**, and **App secret** in the **Settings** tab of your application. Copy these values to the WordPress Logto plugin settings page.
3. Once you have configured the plugin, you need to copy the **Redirect URI** and **Post sign-out redirect URI** shown in the plugin settings page to the **Redirect URIs** and **Post sign-out redirect URIs** fields of your application in the Logto Console.

After that, you can start using Logto to authenticate your users by visiting the login page of your WordPress site.

## Resources

Expand Down
2 changes: 1 addition & 1 deletion src/LogtoPluginSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ function getRedirectUri(): string

function getPostSignOutRedirectUri(): string
{
return home_url();
return home_url('/');
}
}
2 changes: 1 addition & 1 deletion src/pages/Help.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>
<p>
<b>
<?php echo wp_kses(_x('If you are looking for a step-by-step guide to set up Logto, please refer to our <a href="https://docs.logto.io/quick-start/wordpress-plugin" target="_blank" rel="noopener">WordPress plugin quick start guide</a>.', 'help', 'logto'), SettingsSection::allowedTextHtml); ?>
<?php echo wp_kses(_x('If you are looking for a step-by-step guide to set up Logto, please refer to our <a href="https://docs.logto.io/quick-starts/wordpress-plugin" target="_blank" rel="noopener">WordPress plugin quick start guide</a>.', 'help', 'logto'), SettingsSection::allowedTextHtml); ?>
</b>
</p>
<p>
Expand Down

0 comments on commit 55237a5

Please sign in to comment.