8/11/2024
How to access the admin panel and manage your resource list in GitBase
Accessing the Admin Panel and Managing Resources in GitBase
GitBase provides a user-friendly admin interface for managing your website's resources. This guide will walk you through the process of accessing the admin panel and managing your resources effectively.
Accessing the Admin Panel
-
Navigate to the Admin URL: Open your web browser and go to your GitBase website's URL, followed by
/admin
. For example:https://yourgitbasesite.com/admin
. -
Enter the Access Password: You will be prompted to enter the access password. This is the
ACCESS_PASSWORD
you set in your environment variables. Enter it and click "Login". -
Admin Dashboard: After successful authentication, you'll be directed to the admin dashboard. Here, you'll see various management options, including "Manage Resources".
Managing Resources
Viewing Resources
- From the admin dashboard, click on "Manage Resources".
- You'll see a list of all current resources, displaying their names, descriptions, and URLs.
Adding a New Resource
- On the resource management page, locate the "Add New Resource" section, typically at the bottom of the resource list.
- Fill in the following fields:
- Name: Enter the name of the resource.
- Description: Provide a brief description of the resource.
- URL: Enter the full URL of the resource.
- Click the "Add New" button to save the resource.
- The new resource will appear in the list, and changes will be automatically synced with your GitHub repository.
Modifying an Existing Resource
- Find the resource you want to edit in the resource list.
- Click the "Edit" button next to the resource.
- The resource's fields will become editable.
- Make your desired changes to the name, description, or URL.
- Click the "Save" button to confirm your changes.
- The updated resource information will be displayed in the list and synced with GitHub.
Deleting a Resource
Note: The current version of GitBase might not support direct deletion through the admin interface. If you need to remove a resource:
- Edit the resource.
- Replace its content with placeholder text or mark it as "Deprecated" in the description.
- Save the changes.
- For permanent removal, you may need to manually delete the entry from the
resources.json
file in your GitHub repository.
Syncing Changes
GitBase automatically syncs your changes with the GitHub repository configured in your environment variables. After making changes:
- The
resources.json
file in your GitHub repository will be updated. - These changes will be reflected on your live site after a short delay (usually a few minutes, depending on your hosting setup).
Best Practices
- Regular Backups: Although GitBase uses GitHub for version control, it's a good practice to periodically backup your
resources.json
file. - Descriptive Names and Descriptions: Use clear, concise names and descriptions for your resources to make them easy to understand and find.
- URL Verification: Always double-check the URLs you enter to ensure they are correct and functional.
- Consistent Formatting: Maintain a consistent style in your resource descriptions for a professional appearance.
Troubleshooting
If you encounter issues while managing resources:
- Changes Not Appearing: Ensure your GitHub token has the necessary permissions, and check your GitHub repository for any error messages in the commit history.
- Unable to Save: Verify your internet connection and try refreshing the page before attempting to save again.
- Access Denied: Double-check that you're using the correct
ACCESS_PASSWORD
and that it matches the one in your environment variables.
By following these steps, you should be able to effectively manage the resources on your GitBase website through the admin panel. Remember, all changes are version-controlled through GitHub, allowing you to track modifications and revert if necessary.