{"id":27425753,"url":"https://github.com/ru84/ibm-apic-theme-manager","last_synced_at":"2026-05-03T05:31:32.433Z","repository":{"id":287849364,"uuid":"965994591","full_name":"ru84/ibm-apic-theme-manager","owner":"ru84","description":"IBM API Connect Developer Portal Theme manager for Openshift deployments","archived":false,"fork":false,"pushed_at":"2025-04-14T09:09:52.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-01T15:47:05.183Z","etag":null,"topics":["api-connect","apic","drupal","ibm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ru84.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-14T08:35:11.000Z","updated_at":"2025-04-14T09:09:55.000Z","dependencies_parsed_at":"2025-04-14T12:45:00.411Z","dependency_job_id":null,"html_url":"https://github.com/ru84/ibm-apic-theme-manager","commit_stats":null,"previous_names":["ru84/ibm-apic-theme-manager"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ru84/ibm-apic-theme-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ru84%2Fibm-apic-theme-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ru84%2Fibm-apic-theme-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ru84%2Fibm-apic-theme-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ru84%2Fibm-apic-theme-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ru84","download_url":"https://codeload.github.com/ru84/ibm-apic-theme-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ru84%2Fibm-apic-theme-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32559714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T03:21:47.309Z","status":"ssl_error","status_checked_at":"2026-05-03T03:21:43.884Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-connect","apic","drupal","ibm"],"created_at":"2025-04-14T12:28:41.964Z","updated_at":"2026-05-03T05:31:32.428Z","avatar_url":"https://github.com/ru84.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IBM API Connect Theme Manager\n\nA Python-based tool to manage themes for the IBM API Connect Developer Portal. This utility streamlines theme development, deployment, and management across different environments.\n\n## Motivation\n\nWhen developing a theme for the IBM API Connect Developer Portal, the traditional workflow is extremely time-consuming. Developers must:\n1. Create a ZIP archive of the local theme\n2. Disable the existing custom theme to avoid name conflicts\n3. Revert to a default theme\n4. Delete the custom theme\n5. Upload the ZIP file for the same custom theme with new code\n6. Re-activate the theme\n\nThis tool automates this entire process, drastically reducing development time and eliminating error-prone manual steps. With a single command, you can compile, package, and deploy your theme changes to any environment.\n\n## Features\n\n- Upload and activate custom themes\n- Compile SCSS to CSS\n- Create theme archives for deployment\n- Revert to default themes\n- Clear Drupal cache\n- OpenShift authentication and project management\n\n## Prerequisites\n\n- Python 3.x\n- OpenShift CLI (`oc` command)\n- Sass compiler (install via `npm install -g sass`)\n- IBM API Connect Developer Portal access\n\n## Configuration\n\nCopy the sample configuration file and customize it for your environment:\n\n```bash\ncp theme_manager_config.sample.json theme_manager_config.json\n```\n\nThen edit `theme_manager_config.json` with your specific environment settings:\n\n```json\n{\n  \"defaults\": {\n    \"environment\": \"development\"\n  },\n  \"themes\": {\n    \"active_theme\": \"my_custom_theme\",\n    \"default_theme\": \"connect_theme\"\n  },\n  \"environments\": {\n    \"development\": {\n      \"oc_project\": \"apiconnect-dev\",\n      \"pod_name\": \"apiconnect-ptl-dev-www-0\",\n      \"site_name\": \"dev.myapic.com\",\n      \"platform_path\": \"/var/aegir/platforms/devportal-10.x-10.0.8.2-20250311-1629\",\n      \"server_url\": \"https://api.ocp-dev.myapic.com:6443\"\n    },\n    \"production\": {\n      \"oc_project\": \"apiconnect\",\n      \"pod_name\": \"apiconnect-ptl-prod-www-0\",\n      \"site_name\": \"developer.myapic.com\",\n      \"platform_path\": \"/var/aegir/platforms/devportal-10.x-10.0.8.2-20250311-1629\",\n      \"server_url\": \"https://api.ocp.myapic.com:6443\"\n    }\n  }\n}\n```\n\n## Usage\n\n### Login to OpenShift\n\n```bash\n./theme-manager.py login\n```\n\n### Check Theme Status\n\n```bash\n./theme-manager.py status\n```\n\n### Upload and Activate a Theme\n\n```bash\n./theme-manager.py upload --theme my_custom_theme\n```\n\n### Create a ZIP Archive Without Uploading\n\n```bash\n./theme-manager.py zip --theme my_custom_theme\n```\n\n### Revert to Default Theme\n\n```bash\n./theme-manager.py revert --env production\n```\n\n### Clear Drupal Cache\n\n```bash\n./theme-manager.py cache-clear\n```\n\n## Creating a New Subtheme\n\n1. **Create a New Theme Directory**\n\n   Start by creating a new directory for your custom theme:\n\n   ```bash\n   mkdir my_new_theme\n   cd my_new_theme\n   ```\n\n2. **Set Up Theme Files**\n\n   Create the basic structure:\n\n   ```bash\n   mkdir -p css js scss templates\n   touch my_new_theme.info.yml\n   ```\n\n3. **Create Theme Configuration**\n\n   Edit `my_new_theme.info.yml`:\n\n   ```yaml\n   name: My New Theme\n   type: theme\n   description: 'Custom theme for IBM API Connect Developer Portal'\n   core: 8.x\n   base theme: connect_theme\n   \n   libraries:\n     - my_new_theme/global-styling\n   \n   regions:\n     header: Header\n     content: Content\n     sidebar_first: 'Sidebar first'\n     sidebar_second: 'Sidebar second'\n     footer: Footer\n   ```\n\n4. **Set Up Library Definition**\n\n   Create `my_new_theme.libraries.yml`:\n\n   ```yaml\n   global-styling:\n     css:\n       theme:\n         css/style.css: {}\n     js:\n       js/script.js: {}\n   ```\n\n5. **Create SCSS Structure**\n\n   Create your main SCSS file at `scss/style.scss`:\n\n   ```scss\n   // Import base styles from parent theme\n   @import '../../../connect_theme/scss/variables';\n   \n   // Override variables\n   $primary-color: #0f62fe;\n   $secondary-color: #393939;\n   \n   // Custom styles\n   body {\n     font-family: 'IBM Plex Sans', sans-serif;\n   }\n   \n   // Component styles\n   @import 'components/buttons';\n   @import 'components/navigation';\n   ```\n\n6. **Create Template Overrides**\n\n   Copy templates from the parent theme that you want to customize:\n\n   ```bash\n   mkdir -p templates/page templates/node\n   cp ../connect_theme/templates/page/page.html.twig templates/page/\n   ```\n\n7. **Configure Theme Manager**\n\n   Update `theme_manager_config.json` with your new theme:\n\n   ```json\n   \"themes\": {\n     \"active_theme\": \"my_new_theme\",\n     \"default_theme\": \"connect_theme\"\n   }\n   ```\n\n8. **Compile SCSS and Upload**\n\n   Run the theme manager to compile SCSS and upload your theme:\n\n   ```bash\n   ./theme-manager.py upload\n   ```\n\n9. **Verify Installation**\n\n   Check that your theme is active:\n\n   ```bash\n   ./theme-manager.py status\n   ```\n\n## Tips for Theme Development\n\n- Make incremental changes and test frequently\n- Use Drupal's theme debug mode to identify template suggestions\n- Create a local development environment for faster iteration\n- Use SCSS variables for consistent styling across components\n- Follow IBM Design Language guidelines for best results\n\n## Troubleshooting\n\n- If theme changes don't appear, try clearing the cache with `cache-clear`\n- Check OpenShift pod logs for Drupal errors\n- Ensure your SCSS compiles correctly before uploading\n- Verify file permissions in the container\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 with additional terms - see the LICENSE file for details.\n\nKey points:\n- You must provide attribution when using or modifying this software\n- You cannot sell this software or services primarily based on it\n- Modifications must also be open source under the same license\n- Source code must be made available when distributing the software.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fru84%2Fibm-apic-theme-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fru84%2Fibm-apic-theme-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fru84%2Fibm-apic-theme-manager/lists"}