{"id":13930121,"url":"https://github.com/AdvisorySG/ghost-advisory-theme","last_synced_at":"2025-07-19T12:31:46.042Z","repository":{"id":45179858,"uuid":"233408608","full_name":"AdvisorySG/ghost-advisory-theme","owner":"AdvisorySG","description":"Custom-built Ghost theme for Advisory SG.","archived":true,"fork":false,"pushed_at":"2022-01-03T11:02:04.000Z","size":1000,"stargazers_count":6,"open_issues_count":24,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-08T18:26:14.979Z","etag":null,"topics":["blogging","ghost","ghost-theme","publishing"],"latest_commit_sha":null,"homepage":null,"language":"Handlebars","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AdvisorySG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-12T14:51:47.000Z","updated_at":"2023-01-28T04:19:03.000Z","dependencies_parsed_at":"2022-09-13T08:00:43.813Z","dependency_job_id":null,"html_url":"https://github.com/AdvisorySG/ghost-advisory-theme","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"TryGhost/Starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvisorySG%2Fghost-advisory-theme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvisorySG%2Fghost-advisory-theme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvisorySG%2Fghost-advisory-theme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdvisorySG%2Fghost-advisory-theme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdvisorySG","download_url":"https://codeload.github.com/AdvisorySG/ghost-advisory-theme/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226607597,"owners_count":17658482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["blogging","ghost","ghost-theme","publishing"],"created_at":"2024-08-07T18:04:47.658Z","updated_at":"2024-11-26T19:30:52.656Z","avatar_url":"https://github.com/AdvisorySG.png","language":"Handlebars","funding_links":[],"categories":["publishing"],"sub_categories":[],"readme":"# ghost-advisory-theme ![Test and Deploy Theme](https://github.com/AdvisorySG/ghost-advisory-theme/workflows/Build%20and%20Deploy%20Theme/badge.svg)\n\nCustom-built Ghost theme for [Advisory SG](https://advisory.sg), based on the [Starter theme](https://github.com/TryGhost/Starter).\n\n# Introduction\n\nGhost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes. You can access the full [theme API documentation](https://themes.ghost.org) which explains every possible Handlebars helper and template.\n\n**The main files are:**\n\n-   `default.hbs` - The main template file\n-   `index.hbs` - Used for an index of posts (**deprecated**, superseded by `home.hbs`, `tag.hbs` \u0026 `author.hbs`)\n-   `home.hbs` - Used for the home page\n-   `post.hbs` - Used for individual posts\n-   `page.hbs` - Used for individual pages\n-   `tag.hbs` - Used for tag archives\n-   `author.hbs` - Used for author archives\n\nThe following custom page templates have been created:\n\n-   `page-stories.hbs` - Custom template for the `/stories/` page\n-   `page-impact.hbs` - Custom template for the `/impact/` page\n\nTake note that for custom pages to be generated on Ghost, you would need to create static pages with the same slugs as indicated in their filename. For more details, please refer to the documentation for [pages](https://ghost.org/docs/api/v3/handlebars-themes/context/page/).\n\n# Development\n\nFirst, [setup a local Ghost instance](https://ghost.org/docs/install/local/).\n\nShould you have access to the [Admin panel of Advisory](https://beta.advisory.sg/ghost/), you may go to Settings \u003e Labs \u003e Migration Options \u003e Export your content in order to obtain the posts and settings used for the actual website as a JSON file. Then, you may load up the file into your local instance of Ghost, at Settings \u003e Labs \u003e Migration Options \u003e Import content. Take note that this will not remove existing posts/pages.\n\nTo build the theme, you'll need to install [Node v12/14](https://nodejs.org/). From the root directory, you can execute the `zip` Gulp task:\n\n```bash\n# Install dependencies\nnpm\n\n# Package the theme into a zip archive\nnpm run zip\n```\n\nThe theme files are packaged into `dist/\u003ctheme-name\u003e.zip`, which you can then upload to your site, at Settings \u003e Design \u003e Installed Themes \u003e Upload a theme.\n\n## Speedy Development\n\nTo speed up development with a local instance of Ghost, you may use an alternative procedure to directly place the theme directory in the `content/themes/` directory of Ghost.\n\nFirstly, use the earlier mentioned process with `npm run zip` and upload the theme. This is important, as **Ghost will not recognise your new theme directory if you do not perform this import first**. In the `content/themes/` directory from the root directory of your Ghost installation, you should see the `ghost-advisory-theme` directory. (**Do not perform this step by importing a zipfile directly from the GitHub Actions builds; as the zipfile has an appended hash, Ghost will not recognise your new `ghost-advisory-theme` directory. Make sure to rename the zipfile to `ghost-advisory-theme.zip` before importing.**)\n\nOnce you have verified that the `content/themes/ghost-advisory-theme/` directory is in place and Ghost recognises the directory as a theme, remove the `ghost-advisory-theme` directory and clone this repository into the `content/themes/` directory under the same directory name `ghost-advisory-theme`. (Alternatively, if you use an Unix-based system, you may create a symbolic link instead. Windows users may wish to create a shortcut from the Ghost directory instead.)\n\nFinally, run `npm run dev` in the `content/themes/ghost-advisory-theme/` directory and refresh the Ghost admin panel. You should see the correct theme appear. Upon making changes to theme files, `npm run dev` should build the changed files and the changes should be reflected upon refresh.\n\nThis method is not officially supported by Ghost and might break any time (though the theme handling logic is unlikely to be modified in the foreseeable future). Take note that if you add new post templates, you may need to restart Ghost manually for the changes to take place in the Admin panel.\n\n# Content API Key\n\nWe have two features which make use of Ghost's content API:\n\n1. [SearchInGhostEasy](https://github.com/gmfmi/searchinghost-easy), which adds a client-side full-text search for articles.\n2. Population of event cards in the homepage\n\nIf you want these features to be functional on your local machine, you'll need to update [default.hbs](./default.hbs) with a new local content API key. To add a new key, go to Integrations \u003e Custom Integrations \u003e Add custom integration and copy the content API key.\n\n# Copyright \u0026 License\n\nCopyright (c) 2013-2020 Ghost Foundation - Released under the [MIT license](LICENSE).\n\nCopyright (c) 2020-2021 Advisory SG - Released under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdvisorySG%2Fghost-advisory-theme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAdvisorySG%2Fghost-advisory-theme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdvisorySG%2Fghost-advisory-theme/lists"}