Skip to content

Commit

Permalink
Update README.md and LICENSE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wei2912 committed Nov 18, 2021
1 parent 04d37c6 commit 1b878de
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2013-2021 Ghost Foundation
Copyright (c) 2013-2021 Ghost Foundation, 2021 Advisory Singapore

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
# Dawn
# dawn-advisory-theme ![Deploy Theme](https://github.com/AdvisorySG/dawn-advisory-theme/workflows/Deploy%20Theme/badge.svg)

A highly functional theme that adapts to the reader's preferences. Let them read, search, subscribe, navigate, and more with ease. Completely free and fully responsive, released under the MIT license.

**Demo: https://dawn.ghost.io**
This theme was originally based off [TryGhost/Dawn](https://github.com/TryGhost/Dawn).

 

# Instructions

1. [Download this theme](https://github.com/TryGhost/Dawn/archive/main.zip)
2. Log into Ghost, and go to the `Design` settings area to upload the zip file
1. [Setup a local Ghost instance](https://ghost.org/docs/install/local/).
2. Ensure you have [Node v14](https://nodejs.org/) installed.
3. From the root directory, execute the `zip` Gulp task:

```bash
# Install dependencies
npm

# Package the theme into a zip archive
npm run zip
```

4. Upload the zipfile at `dist/dawn-advisory-theme.zip` onto your local Ghost instance at `Settings > Theme > Change theme > Upload theme`.

Optionally, if you have access to the [Admin panel of Advisory](https://beta.advisory.sg/ghost/), you can go to `Settings > Labs > Migration Options > Export your content` in order to export the posts and settings used for the actual website as a JSON file. This file can be imported into your local instance of Ghost, at `Settings > Labs > Migration Options > Import content`. Take note that this will not remove existing posts/pages.

# Search

Expand Down Expand Up @@ -62,28 +75,34 @@ The theme looks for a menu item with three dots (`...`) in its URL, and uses tha

# Development

Styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need [Node](https://nodejs.org/), [Yarn](https://yarnpkg.com/) and [Gulp](https://gulpjs.com) installed globally. After that, from the theme's root directory:
Styles are compiled using Gulp/PostCSS to polyfill future CSS spec. You'll need [Node](https://nodejs.org/) and [Gulp](https://gulpjs.com) installed globally. After that, from the theme's root directory:

```bash
# Install
yarn
npm

# Run build & watch for changes
$ yarn dev
npm run dev
```

Now you can edit `/assets/css/` files, which will be compiled to `/assets/built/` automatically.

The `zip` Gulp task packages the theme files into `dist/<theme-name>.zip`, which you can then upload to your site.
## Speedy Development

```bash
yarn zip
```
To 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.

Firstly, 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 `dawn-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 `dawn-advisory-theme` directory. Make sure to rename the zipfile to `dawn-advisory-theme.zip` before importing.**)

Once you have verified that the `content/themes/dawn-advisory-theme/` directory is in place and Ghost recognises the directory as a theme, remove the `dawn-advisory-theme` directory and clone this repository into the `content/themes/` directory under the same directory name `dawn-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.)

Finally, run `npm run dev` in the `content/themes/dawn-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.

This 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.

# PostCSS Features Used

- Autoprefixer - Don't worry about writing browser prefixes of any kind, it's all done automatically with support for the latest 2 major versions of every browser.

# Copyright & License

Copyright (c) 2013-2021 Ghost Foundation - Released under the [MIT license](LICENSE).
Copyright (c) 2013-2021 Ghost Foundation, 2021 Advisory Singapore - Released under the [MIT license](LICENSE).

0 comments on commit 1b878de

Please sign in to comment.