-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c37837d
Showing
48 changed files
with
9,735 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
npm-debug.log | ||
.git | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
b-cov | ||
*.seed | ||
*.log | ||
*.csv | ||
*.dat | ||
*.out | ||
*.pid | ||
*.gz | ||
|
||
pids | ||
logs | ||
results | ||
|
||
npm-debug.log | ||
node_modules | ||
package-lock.json | ||
|
||
.idea/* | ||
*.iml | ||
projectFilesBackup | ||
|
||
.DS_Store | ||
|
||
dist/ | ||
|
||
config.json | ||
changelog.md | ||
changelog.md.bk | ||
|
||
.env* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2013-2021 Ghost Foundation | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Yatri Blog | ||
|
||
## Server Setup (docker) | ||
|
||
- In the root project folder, copy the `example.env` and save as `.env.dev` for development and `.env.prod` for production. Update the variables. | ||
In the project directory, you can run: | ||
|
||
- Run `docker-compose up` from the root folder to the application. To run the application in background, use `docker-compose up -d`. The logs can be seen through `docker-compose logs`. | ||
|
||
- For production mode. Run `docker-compose -f docker-compose.prod.yml up` | ||
|
||
Runs the app in the development mode.\ | ||
Open [http://localhost:3004](http://localhost:3004) to view it in the browser. | ||
|
||
## Site setup | ||
|
||
- Navigate to `http://localhost:3004/ghost` to access the admin panel. After you've finished the setup process. You'll be able to see the ghost dashboard. | ||
|
||
## Custom theme | ||
|
||
- Navigate to `http://localhost:3004/ghost`. On the bottom left you'll see a ⚙️ icon. It'll navigate you to the settings page. Choose theme then under installed theme, select `yatri-casper`. It'll activate your custom theme. | ||
|
||
- Navigate to `ghost/themes/yatri-casper` from your root project directory and make changes to theme files. Reload your blog site and you'll be able to see your changes. | ||
|
||
- To create a `.zip` theme file. | ||
```bash | ||
cd ghost/themes/yatri-casper | ||
# install dependencies | ||
yarn | ||
# create .zip file | ||
yarn zip | ||
``` | ||
|
||
🏍 Happy Coding :) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
version: '3.1' | ||
|
||
services: | ||
yatri-ghost: | ||
build: | ||
context: ./ghost | ||
dockerfile: Dockerfile | ||
restart: always | ||
ports: | ||
- 3004:2368 | ||
env_file: | ||
- .env.prod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# by default, the Ghost image will use SQLite (and thus requires no separate database container) | ||
# we have used MySQL here merely for demonstration purposes (especially environment-variable-based configuration) | ||
|
||
version: '3.1' | ||
|
||
services: | ||
yatri-ghost: | ||
build: | ||
context: ./ghost | ||
dockerfile: Dockerfile.dev | ||
restart: always | ||
ports: | ||
- 3004:2368 | ||
# environment: | ||
# # see https://ghost.org/docs/config/#configuration-options | ||
env_file: | ||
- .env.dev | ||
volumes: | ||
- /var/lib/ghost/content/themes/yatri-casper/node_modules | ||
- ./ghost/themes/yatri-casper:/var/lib/ghost/content/themes/yatri-casper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
database__client= | ||
database__connection__host= | ||
database__connection__user= | ||
database__connection__password= | ||
database__connection__database= | ||
|
||
# For assets uploads to AWS S3 | ||
storage__active=s3 | ||
AWS_ACCESS_KEY_ID= | ||
AWS_SECRET_ACCESS_KEY= | ||
AWS_DEFAULT_REGION= | ||
GHOST_STORAGE_ADAPTER_S3_PATH_BUCKET= | ||
|
||
url=http://localhost:3004 | ||
|
||
NODE_ENV=development | ||
|
||
# Internal mail service | ||
mail__transport= | ||
mail__options__service= | ||
mail__options__auth__user= | ||
mail__options__auth__pass= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM ghost:4 | ||
|
||
WORKDIR /var/lib/ghost | ||
|
||
RUN npm install ghost-storage-adapter-s3 | ||
|
||
RUN cp -vr ./node_modules/ghost-storage-adapter-s3 ./current/core/server/adapters/storage/s3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM ghost:4 | ||
|
||
WORKDIR /var/lib/ghost | ||
|
||
COPY ./themes/yatri-casper ./content/themes/yatri-casper | ||
|
||
RUN cd ./content/themes/yatri-casper && yarn install | ||
|
||
# CMD tail -f /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Copyright (c) 2013-2021 Ghost Foundation | ||
|
||
Permission is hereby granted, free of charge, to any person | ||
obtaining a copy of this software and associated documentation | ||
files (the "Software"), to deal in the Software without | ||
restriction, including without limitation the rights to use, | ||
copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the | ||
Software is furnished to do so, subject to the following | ||
conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# Casper | ||
|
||
The default theme for [Ghost](http://github.com/tryghost/ghost/). This is the latest development version of Casper! If you're just looking to download the latest release, head over to the [releases](https://github.com/TryGhost/Casper/releases) page. | ||
|
||
| ||
|
||
![screenshot-desktop](https://user-images.githubusercontent.com/353959/66987533-40eae100-f0c1-11e9-822e-cbaf38fb8e3f.png) | ||
|
||
| ||
|
||
# First time using a Ghost theme? | ||
|
||
Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes. | ||
|
||
This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/themes/) which explains every possible Handlebars helper and template. | ||
|
||
**The main files are:** | ||
|
||
- `default.hbs` - The parent template file, which includes your global header/footer | ||
- `index.hbs` - The main template to generate a list of posts, usually the home page | ||
- `post.hbs` - The template used to render individual posts | ||
- `page.hbs` - Used for individual pages | ||
- `tag.hbs` - Used for tag archives, eg. "all posts tagged with `news`" | ||
- `author.hbs` - Used for author archives, eg. "all posts written by Jamie" | ||
|
||
One neat trick is that you can also create custom one-off templates by adding the slug of a page to a template file. For example: | ||
|
||
- `page-about.hbs` - Custom template for an `/about/` page | ||
- `tag-news.hbs` - Custom template for `/tag/news/` archive | ||
- `author-ali.hbs` - Custom template for `/author/ali/` archive | ||
|
||
|
||
# Development | ||
|
||
Casper 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: | ||
|
||
```bash | ||
# install dependencies | ||
yarn install | ||
|
||
# run development server | ||
yarn 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. | ||
|
||
```bash | ||
# create .zip file | ||
yarn zip | ||
``` | ||
|
||
# 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. | ||
- [Color Mod](https://github.com/jonathantneal/postcss-color-mod-function) | ||
|
||
|
||
# SVG Icons | ||
|
||
Casper uses inline SVG icons, included via Handlebars partials. You can find all icons inside `/partials/icons`. To use an icon just include the name of the relevant file, eg. To include the SVG icon in `/partials/icons/rss.hbs` - use `{{> "icons/rss"}}`. | ||
|
||
You can add your own SVG icons in the same manner. | ||
|
||
|
||
# Copyright & License | ||
|
||
Copyright (c) 2013-2021 Ghost Foundation - Released under the [MIT license](LICENSE). |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.