├── .editorconfig ├── .gitignore ├── .prettierrc ├── README.md ├── angular.json ├── blog ├── 2020-06-27-blog.md ├── this-is-my-first-post.md ├── this-is-the-fifth-post.md ├── this-is-the-fourth-post.md ├── this-is-the-second-post.md ├── this-is-the-seventh-post.md ├── this-is-the-sixth-post.md └── this-is-the-third-post.md ├── browserslist ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.json ├── karma.conf.js ├── package-lock.json ├── package.json ├── scully.log ├── scully.ngscully-netlify-cms-starter.config.ts ├── src ├── admin │ ├── config.yml │ └── index.html ├── app │ ├── about │ │ ├── about-routing.module.ts │ │ ├── about.component.html │ │ ├── about.component.scss │ │ ├── about.component.spec.ts │ │ ├── about.component.ts │ │ └── about.module.ts │ ├── app-routing.module.ts │ ├── app.component.html │ ├── app.component.scss │ ├── app.component.spec.ts │ ├── app.component.ts │ ├── app.module.ts │ ├── blog │ │ ├── blog-list │ │ │ ├── blog-list.component.html │ │ │ ├── blog-list.component.scss │ │ │ ├── blog-list.component.spec.ts │ │ │ └── blog-list.component.ts │ │ ├── blog-routing.module.ts │ │ ├── blog.component.css │ │ ├── blog.component.html │ │ ├── blog.component.scss │ │ ├── blog.component.spec.ts │ │ ├── blog.component.ts │ │ └── blog.module.ts │ ├── courses │ │ ├── courses-routing.module.ts │ │ ├── courses.component.html │ │ ├── courses.component.scss │ │ ├── courses.component.spec.ts │ │ ├── courses.component.ts │ │ └── courses.module.ts │ ├── data.service.spec.ts │ ├── data.service.ts │ ├── home │ │ ├── home-routing.module.ts │ │ ├── home.component.html │ │ ├── home.component.scss │ │ ├── home.component.spec.ts │ │ ├── home.component.ts │ │ └── home.module.ts │ └── shared │ │ └── material.module.ts ├── assets │ ├── .gitkeep │ ├── images │ │ └── uploads │ │ │ └── 161.jpg │ ├── ngscully.jpg │ └── scully-routes.json ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── main.ts ├── polyfills.ts ├── styles.scss └── test.ts ├── tsconfig.app.json ├── tsconfig.json ├── tsconfig.spec.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "es5", 3 | "tabWidth": 2, 4 | "semi": true, 5 | "singleQuote": true, 6 | "useTabs": false 7 | } 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # NgscullyNetlifyCmsStarter 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.0.0-rc.7, Scully (Static Site Generator), Netlify CMS. 4 | 5 | ![Angular Scully Netlify CMS Starter](https://github.com/mbaljeetsingh/ngscully-netlify-cms-starter/blob/master/src/assets/ngscully.jpg) 6 | 7 | ## Development server 8 | 9 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 10 | 11 | ## Generating Static Site 12 | 13 | Run `ng build` followed by `npm run sclly`. It will create static folder inside dist `dist/static`. 14 | 15 | ## Deoploy 16 | 17 | Upload `dist/static` folder to any static hosting provider. 18 | 19 | ## Further help 20 | 21 | To get more info about scully visit [Scully README](https://github.com/scullyio/scully/blob/master/docs/getting-started.md). 22 | 23 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 24 | -------------------------------------------------------------------------------- /angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "ngscully-netlify-cms-starter": { 7 | "projectType": "application", 8 | "schematics": { 9 | "@schematics/angular:component": { 10 | "style": "scss" 11 | } 12 | }, 13 | "root": "", 14 | "sourceRoot": "src", 15 | "prefix": "app", 16 | "architect": { 17 | "build": { 18 | "builder": "@angular-devkit/build-angular:browser", 19 | "options": { 20 | "outputPath": "dist/ngscully-netlify-cms-starter", 21 | "index": "src/index.html", 22 | "main": "src/main.ts", 23 | "polyfills": "src/polyfills.ts", 24 | "tsConfig": "tsconfig.app.json", 25 | "aot": true, 26 | "assets": ["src/favicon.ico", "src/assets", "src/admin"], 27 | "styles": [ 28 | "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", 29 | "src/styles.scss" 30 | ], 31 | "scripts": [] 32 | }, 33 | "configurations": { 34 | "production": { 35 | "fileReplacements": [ 36 | { 37 | "replace": "src/environments/environment.ts", 38 | "with": "src/environments/environment.prod.ts" 39 | } 40 | ], 41 | "optimization": true, 42 | "outputHashing": "all", 43 | "sourceMap": false, 44 | "extractCss": true, 45 | "namedChunks": false, 46 | "extractLicenses": true, 47 | "vendorChunk": false, 48 | "buildOptimizer": true, 49 | "budgets": [ 50 | { 51 | "type": "initial", 52 | "maximumWarning": "2mb", 53 | "maximumError": "5mb" 54 | }, 55 | { 56 | "type": "anyComponentStyle", 57 | "maximumWarning": "6kb", 58 | "maximumError": "10kb" 59 | } 60 | ] 61 | } 62 | } 63 | }, 64 | "serve": { 65 | "builder": "@angular-devkit/build-angular:dev-server", 66 | "options": { 67 | "browserTarget": "ngscully-netlify-cms-starter:build" 68 | }, 69 | "configurations": { 70 | "production": { 71 | "browserTarget": "ngscully-netlify-cms-starter:build:production" 72 | } 73 | } 74 | }, 75 | "extract-i18n": { 76 | "builder": "@angular-devkit/build-angular:extract-i18n", 77 | "options": { 78 | "browserTarget": "ngscully-netlify-cms-starter:build" 79 | } 80 | }, 81 | "test": { 82 | "builder": "@angular-devkit/build-angular:karma", 83 | "options": { 84 | "main": "src/test.ts", 85 | "polyfills": "src/polyfills.ts", 86 | "tsConfig": "tsconfig.spec.json", 87 | "karmaConfig": "karma.conf.js", 88 | "assets": ["src/favicon.ico", "src/assets"], 89 | "styles": [ 90 | "./node_modules/@angular/material/prebuilt-themes/indigo-pink.css", 91 | "src/styles.scss" 92 | ], 93 | "scripts": [] 94 | } 95 | }, 96 | "lint": { 97 | "builder": "@angular-devkit/build-angular:tslint", 98 | "options": { 99 | "tsConfig": [ 100 | "tsconfig.app.json", 101 | "tsconfig.spec.json", 102 | "e2e/tsconfig.json" 103 | ], 104 | "exclude": ["**/node_modules/**"] 105 | } 106 | }, 107 | "e2e": { 108 | "builder": "@angular-devkit/build-angular:protractor", 109 | "options": { 110 | "protractorConfig": "e2e/protractor.conf.js", 111 | "devServerTarget": "ngscully-netlify-cms-starter:serve" 112 | }, 113 | "configurations": { 114 | "production": { 115 | "devServerTarget": "ngscully-netlify-cms-starter:serve:production" 116 | } 117 | } 118 | } 119 | } 120 | } 121 | }, 122 | "defaultProject": "ngscully-netlify-cms-starter", 123 | "cli": { 124 | "analytics": "92b2812d-8ca8-4ed0-b6ac-4cf308842920" 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /blog/2020-06-27-blog.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 2020-06-27-blog 3 | description: 'blog description' 4 | published: true 5 | --- 6 | 7 | # 2020-06-27-blog 8 | -------------------------------------------------------------------------------- /blog/this-is-my-first-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: this is my first post 3 | description: Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas 4 | publish: true 5 | --- 6 | 7 | # this is my first post 8 | 9 | ``` 10 | function sum (a, b){ return a+b;} 11 | ``` 12 | 13 | Here, `a` and `b` are arguments to `sum` function. 14 | 15 | ![Windows 8](/assets/images/uploads/161.jpg) 16 | -------------------------------------------------------------------------------- /blog/this-is-the-fifth-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: This is the fifth post 3 | description: Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas 4 | publish: false 5 | --- 6 | 7 | # This is the fifth post 8 | -------------------------------------------------------------------------------- /blog/this-is-the-fourth-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: This is the fourth post 3 | description: Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas 4 | publish: false 5 | --- 6 | 7 | # This is the fourth post 8 | -------------------------------------------------------------------------------- /blog/this-is-the-second-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: This is the second post 3 | description: Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas 4 | publish: false 5 | --- 6 | 7 | # This is the second post 8 | -------------------------------------------------------------------------------- /blog/this-is-the-seventh-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: This is the seventh post 3 | description: Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas 4 | publish: false 5 | --- 6 | 7 | # This is the seventh post 8 | -------------------------------------------------------------------------------- /blog/this-is-the-sixth-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: This is the sixth post 3 | description: Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas 4 | publish: false 5 | --- 6 | 7 | # This is the sixth post 8 | -------------------------------------------------------------------------------- /blog/this-is-the-third-post.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: This is the third post 3 | description: Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas 4 | publish: false 5 | --- 6 | 7 | # This is the third post (update) 8 | -------------------------------------------------------------------------------- /browserslist: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | // Protractor configuration file, see link for more information 3 | // https://github.com/angular/protractor/blob/master/lib/config.ts 4 | 5 | const { SpecReporter } = require('jasmine-spec-reporter'); 6 | 7 | /** 8 | * @type { import("protractor").Config } 9 | */ 10 | exports.config = { 11 | allScriptsTimeout: 11000, 12 | specs: [ 13 | './src/**/*.e2e-spec.ts' 14 | ], 15 | capabilities: { 16 | browserName: 'chrome' 17 | }, 18 | directConnect: true, 19 | baseUrl: 'http://localhost:4200/', 20 | framework: 'jasmine', 21 | jasmineNodeOpts: { 22 | showColors: true, 23 | defaultTimeoutInterval: 30000, 24 | print: function() {} 25 | }, 26 | onPrepare() { 27 | require('ts-node').register({ 28 | project: require('path').join(__dirname, './tsconfig.json') 29 | }); 30 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 31 | } 32 | }; -------------------------------------------------------------------------------- /e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | import { browser, logging } from 'protractor'; 3 | 4 | describe('workspace-project App', () => { 5 | let page: AppPage; 6 | 7 | beforeEach(() => { 8 | page = new AppPage(); 9 | }); 10 | 11 | it('should display welcome message', () => { 12 | page.navigateTo(); 13 | expect(page.getTitleText()).toEqual('ngscully-netlify-cms-starter app is running!'); 14 | }); 15 | 16 | afterEach(async () => { 17 | // Assert that there are no errors emitted from the browser 18 | const logs = await browser.manage().logs().get(logging.Type.BROWSER); 19 | expect(logs).not.toContain(jasmine.objectContaining({ 20 | level: logging.Level.SEVERE, 21 | } as logging.Entry)); 22 | }); 23 | }); 24 | -------------------------------------------------------------------------------- /e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get(browser.baseUrl) as Promise; 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root .content span')).getText() as Promise; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /e2e/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage-istanbul-reporter'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | clearContext: false // leave Jasmine Spec Runner output visible in browser 17 | }, 18 | coverageIstanbulReporter: { 19 | dir: require('path').join(__dirname, './coverage/ngscully-netlify-cms-starter'), 20 | reports: ['html', 'lcovonly', 'text-summary'], 21 | fixWebpackSourcePaths: true 22 | }, 23 | reporters: ['progress', 'kjhtml'], 24 | port: 9876, 25 | colors: true, 26 | logLevel: config.LOG_INFO, 27 | autoWatch: true, 28 | browsers: ['Chrome'], 29 | singleRun: false, 30 | restartOnFileChange: true 31 | }); 32 | }; 33 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ngscully-netlify-cms-starter", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e", 11 | "scully": "scully", 12 | "scully:serve": "scully serve" 13 | }, 14 | "private": true, 15 | "dependencies": { 16 | "@angular/animations": "~9.0.0-rc.7", 17 | "@angular/cdk": "^8.2.3", 18 | "@angular/common": "~9.0.0-rc.7", 19 | "@angular/compiler": "~9.0.0-rc.7", 20 | "@angular/core": "~9.0.0-rc.7", 21 | "@angular/forms": "~9.0.0-rc.7", 22 | "@angular/material": "^8.2.3", 23 | "@angular/platform-browser": "~9.0.0-rc.7", 24 | "@angular/platform-browser-dynamic": "~9.0.0-rc.7", 25 | "@angular/router": "~9.0.0-rc.7", 26 | "@scullyio/init": "latest", 27 | "@scullyio/ng-lib": "latest", 28 | "@scullyio/scully": "latest", 29 | "hammerjs": "^2.0.8", 30 | "rxjs": "~6.5.3", 31 | "tslib": "^1.10.0", 32 | "zone.js": "~0.10.2" 33 | }, 34 | "devDependencies": { 35 | "@angular-devkit/build-angular": "~0.900.0-rc.7", 36 | "@angular/cli": "~9.0.0-rc.7", 37 | "@angular/compiler-cli": "~9.0.0-rc.7", 38 | "@angular/language-service": "~9.0.0-rc.7", 39 | "@types/node": "^12.11.1", 40 | "@types/jasmine": "~3.5.0", 41 | "@types/jasminewd2": "~2.0.3", 42 | "codelyzer": "^5.1.2", 43 | "jasmine-core": "~3.5.0", 44 | "jasmine-spec-reporter": "~4.2.1", 45 | "karma": "~4.3.0", 46 | "karma-chrome-launcher": "~3.1.0", 47 | "karma-coverage-istanbul-reporter": "~2.1.0", 48 | "karma-jasmine": "~2.0.1", 49 | "karma-jasmine-html-reporter": "^1.4.2", 50 | "protractor": "~5.4.2", 51 | "ts-node": "~8.3.0", 52 | "tslint": "~5.18.0", 53 | "typescript": "~3.6.4" 54 | } 55 | } -------------------------------------------------------------------------------- /scully.log: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | ---------------------------------- 18 | Using stored unhandled routes!. 19 | To discover new routes in the angular app use "npm run scully -- --scanRoutes" 20 | ---------------------------------- 21 | -------------------------------------------------------------------------------- /scully.ngscully-netlify-cms-starter.config.ts: -------------------------------------------------------------------------------- 1 | import { ScullyConfig } from '@scullyio/scully'; 2 | export const config: ScullyConfig = { 3 | projectRoot: './src', 4 | projectName: 'ngscully-netlify-cms-starter', 5 | outDir: './dist/static', 6 | routes: { 7 | '/blog/:slug': { 8 | type: 'contentFolder', 9 | slug: { 10 | folder: './blog', 11 | }, 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /src/admin/config.yml: -------------------------------------------------------------------------------- 1 | backend: 2 | name: git-gateway 3 | branch: master 4 | 5 | media_folder: 'src/assets/images/uploads' # Folder where user uploaded files should go 6 | public_folder: 'assets/images/uploads' 7 | publish_mode: editorial_workflow 8 | 9 | collections: # A list of collections the CMS should be able to edit 10 | - name: 'blog' # Used in routes, ie.: /admin/collections/:slug/edit 11 | label: 'Blog' # Used in the UI, ie.: "New Post" 12 | folder: 'blog' # (src/assets/blog) The path to the folder where the documents are stored 13 | create: true # Allow users to create new documents in this collection 14 | fields: # The fields each document in this collection have 15 | - { label: 'Title', name: 'title', widget: 'string', required: false } 16 | - { 17 | label: 'Description', 18 | name: 'description', 19 | widget: 'text', 20 | required: false, 21 | } 22 | - { 23 | label: 'Publish', 24 | name: 'publish', 25 | widget: 'boolean', 26 | required: false, 27 | } 28 | - { label: 'Body', name: 'body', widget: 'markdown' } 29 | -------------------------------------------------------------------------------- /src/admin/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Content Manager 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/app/about/about-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | import { AboutComponent } from './about.component'; 5 | 6 | const routes: Routes = [{ path: '', component: AboutComponent }]; 7 | 8 | @NgModule({ 9 | imports: [RouterModule.forChild(routes)], 10 | exports: [RouterModule] 11 | }) 12 | export class AboutRoutingModule { } 13 | -------------------------------------------------------------------------------- /src/app/about/about.component.html: -------------------------------------------------------------------------------- 1 |

Angular Scully Netlify CMS Starter

2 |

3 | Angular Scully Blog (Static site generator) starter with Netlify CMS using 4 | Angular Material 5 |

6 | 7 | Created By Baljeet Singh 14 | -------------------------------------------------------------------------------- /src/app/about/about.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | } 6 | -------------------------------------------------------------------------------- /src/app/about/about.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { AboutComponent } from './about.component'; 4 | 5 | describe('AboutComponent', () => { 6 | let component: AboutComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ AboutComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(AboutComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/about/about.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-about', 5 | templateUrl: './about.component.html', 6 | styleUrls: ['./about.component.scss'] 7 | }) 8 | export class AboutComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/about/about.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from "@angular/core"; 2 | import { CommonModule } from "@angular/common"; 3 | 4 | import { AboutRoutingModule } from "./about-routing.module"; 5 | import { AboutComponent } from "./about.component"; 6 | import { MaterialModule } from "../shared/material.module"; 7 | 8 | @NgModule({ 9 | declarations: [AboutComponent], 10 | imports: [CommonModule, AboutRoutingModule, MaterialModule] 11 | }) 12 | export class AboutModule {} 13 | -------------------------------------------------------------------------------- /src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | const routes: Routes = [ 5 | { 6 | path: '', 7 | loadChildren: () => import('./home/home.module').then((m) => m.HomeModule), 8 | }, 9 | { 10 | path: 'about', 11 | loadChildren: () => 12 | import('./about/about.module').then((m) => m.AboutModule), 13 | }, 14 | { 15 | path: 'courses', 16 | loadChildren: () => 17 | import('./courses/courses.module').then((m) => m.CoursesModule), 18 | }, 19 | { 20 | path: 'blog', 21 | loadChildren: () => import('./blog/blog.module').then((m) => m.BlogModule), 22 | }, 23 | ]; 24 | 25 | @NgModule({ 26 | imports: [RouterModule.forRoot(routes)], 27 | exports: [RouterModule], 28 | }) 29 | export class AppRoutingModule {} 30 | -------------------------------------------------------------------------------- /src/app/app.component.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 | ngScully Netlify CMS Starter 5 | 6 | 9 | 12 | 15 | 18 | 19 | 20 | 25 |
26 | 27 |
28 | 29 | 30 | 33 |
34 | 35 | 45 | -------------------------------------------------------------------------------- /src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | .spacer { 2 | flex: 1 1 auto; 3 | } 4 | 5 | header { 6 | height: 10vh; 7 | mat-toolbar { 8 | position: fixed; 9 | } 10 | } 11 | main { 12 | height: 80vh; 13 | width: 80vw; 14 | margin: 0 auto; 15 | } 16 | 17 | @media only screen and (max-width: 768px) { 18 | main { 19 | width: 95vw; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed, async } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async(() => { 7 | TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | })); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'ngscully-netlify-cms-starter'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.componentInstance; 26 | expect(app.title).toEqual('ngscully-netlify-cms-starter'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.nativeElement; 33 | expect(compiled.querySelector('.content span').textContent).toContain('ngscully-netlify-cms-starter app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import {IdleMonitorService} from '@scullyio/ng-lib'; 2 | import { Component } from '@angular/core'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.scss'] 8 | }) 9 | export class AppComponent { 10 | constructor (private idle: IdleMonitorService) { } 11 | 12 | title = 'ngscully-netlify-cms-starter'; 13 | } 14 | -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { NgModule } from '@angular/core'; 3 | 4 | import { AppRoutingModule } from './app-routing.module'; 5 | import { AppComponent } from './app.component'; 6 | import { HttpClientModule } from '@angular/common/http'; 7 | import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; 8 | import { MaterialModule } from './shared/material.module'; 9 | import { ScullyLibModule } from '@scullyio/ng-lib'; 10 | 11 | @NgModule({ 12 | declarations: [AppComponent], 13 | imports: [ 14 | BrowserModule, 15 | AppRoutingModule, 16 | HttpClientModule, 17 | BrowserAnimationsModule, 18 | MaterialModule, 19 | ScullyLibModule, 20 | ], 21 | providers: [], 22 | bootstrap: [AppComponent], 23 | }) 24 | export class AppModule {} 25 | -------------------------------------------------------------------------------- /src/app/blog/blog-list/blog-list.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 9 | 10 |
11 | {{ blog.title || blog.route }} 12 | 13 |
14 | 15 |

16 | {{ blog.description }} 17 |

18 |
19 | 20 | 21 | 22 |
23 |
24 | -------------------------------------------------------------------------------- /src/app/blog/blog-list/blog-list.component.scss: -------------------------------------------------------------------------------- 1 | .blog { 2 | margin-top: 2rem; 3 | display: grid; 4 | /* make grid responsive */ 5 | grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 6 | grid-column-gap: 3rem; 7 | grid-row-gap: 20px; 8 | } 9 | .blog .article { 10 | width: 100%; 11 | } 12 | -------------------------------------------------------------------------------- /src/app/blog/blog-list/blog-list.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { BlogListComponent } from './blog-list.component'; 4 | 5 | describe('BlogListComponent', () => { 6 | let component: BlogListComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ BlogListComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(BlogListComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/blog/blog-list/blog-list.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { map, tap } from 'rxjs/operators'; 3 | import { ScullyRoute, ScullyRoutesService } from '@scullyio/ng-lib'; 4 | 5 | @Component({ 6 | selector: 'app-blog-list', 7 | templateUrl: './blog-list.component.html', 8 | styleUrls: ['./blog-list.component.scss'], 9 | }) 10 | export class BlogListComponent implements OnInit { 11 | blogs$ = this.srs.available$.pipe( 12 | map((routeList) => 13 | routeList.filter((route: ScullyRoute) => route.route.startsWith(`/blog/`)) 14 | ), 15 | tap((data) => { 16 | console.log(data); 17 | }) 18 | ); 19 | 20 | constructor(private srs: ScullyRoutesService) {} 21 | 22 | ngOnInit() {} 23 | } 24 | -------------------------------------------------------------------------------- /src/app/blog/blog-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | import { BlogComponent } from './blog.component'; 5 | import { BlogListComponent } from './blog-list/blog-list.component'; 6 | 7 | const routes: Routes = [ 8 | { 9 | path: '', 10 | component: BlogListComponent, 11 | }, 12 | { 13 | path: ':slug', 14 | component: BlogComponent, 15 | }, 16 | { 17 | path: '**', 18 | component: BlogComponent, 19 | }, 20 | ]; 21 | 22 | @NgModule({ 23 | imports: [RouterModule.forChild(routes)], 24 | exports: [RouterModule], 25 | }) 26 | export class BlogRoutingModule {} 27 | -------------------------------------------------------------------------------- /src/app/blog/blog.component.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | ::slotted(h1) { 4 | color:rgb(51, 6, 37); 5 | background-color: rgb(248, 211, 236); 6 | padding: 5px; 7 | border-radius: 5px; 8 | width: fit-content; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/app/blog/blog.component.html: -------------------------------------------------------------------------------- 1 |

ScullyIo content

2 |
3 | 4 | 5 | 6 |
7 |

End of content

8 | -------------------------------------------------------------------------------- /src/app/blog/blog.component.scss: -------------------------------------------------------------------------------- 1 | h1 { 2 | color:rgb(51, 6, 37); 3 | background-color: rgb(248, 211, 236); 4 | padding: 5px; 5 | border-radius: 5px; 6 | width: fit-content; 7 | } 8 | -------------------------------------------------------------------------------- /src/app/blog/blog.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { BlogComponent } from './blog.component'; 4 | 5 | describe('BlogComponent', () => { 6 | let component: BlogComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ BlogComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(BlogComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/blog/blog.component.ts: -------------------------------------------------------------------------------- 1 | import {Component, OnInit, ViewEncapsulation} from '@angular/core'; 2 | import {ActivatedRoute, Router, ROUTES} from '@angular/router'; 3 | 4 | declare var ng: any; 5 | 6 | @Component({ 7 | selector: 'app-blog', 8 | templateUrl: './blog.component.html', 9 | styleUrls: ['./blog.component.scss'], 10 | preserveWhitespaces: true, 11 | encapsulation: ViewEncapsulation.Emulated 12 | 13 | }) 14 | export class BlogComponent implements OnInit { 15 | ngOnInit() {} 16 | 17 | constructor(private router: Router, private route: ActivatedRoute) { 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/app/blog/blog.module.ts: -------------------------------------------------------------------------------- 1 | import { CommonModule } from '@angular/common'; 2 | import { NgModule } from '@angular/core'; 3 | import { ScullyLibModule } from '@scullyio/ng-lib'; 4 | import { BlogRoutingModule } from './blog-routing.module'; 5 | import { BlogComponent } from './blog.component'; 6 | import { BlogListComponent } from './blog-list/blog-list.component'; 7 | import { MaterialModule } from '../shared/material.module'; 8 | 9 | @NgModule({ 10 | declarations: [BlogComponent, BlogListComponent], 11 | imports: [CommonModule, BlogRoutingModule, ScullyLibModule, MaterialModule], 12 | }) 13 | export class BlogModule {} 14 | -------------------------------------------------------------------------------- /src/app/courses/courses-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | import { CoursesComponent } from './courses.component'; 5 | 6 | const routes: Routes = [{ path: '', component: CoursesComponent }]; 7 | 8 | @NgModule({ 9 | imports: [RouterModule.forChild(routes)], 10 | exports: [RouterModule] 11 | }) 12 | export class CoursesRoutingModule { } 13 | -------------------------------------------------------------------------------- /src/app/courses/courses.component.html: -------------------------------------------------------------------------------- 1 |
    2 |
  • 3 | {{ course.headline }} 4 |
  • 5 |
6 | -------------------------------------------------------------------------------- /src/app/courses/courses.component.scss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbaljeetsingh/ngscully-netlify-cms-starter/76eb228018c9216a9de7b837ee2f4d9188d7b670/src/app/courses/courses.component.scss -------------------------------------------------------------------------------- /src/app/courses/courses.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { CoursesComponent } from './courses.component'; 4 | 5 | describe('CoursesComponent', () => { 6 | let component: CoursesComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ CoursesComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(CoursesComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/courses/courses.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { DataService } from '../data.service'; 3 | 4 | @Component({ 5 | selector: 'app-courses', 6 | templateUrl: './courses.component.html', 7 | styleUrls: ['./courses.component.scss'], 8 | }) 9 | export class CoursesComponent implements OnInit { 10 | udemyCourses = this.dataService.getUdemyCourses(); 11 | constructor(private dataService: DataService) {} 12 | 13 | ngOnInit() { 14 | // this.dataService.getUdemyCourses().subscribe((data) => { 15 | // console.log(data); 16 | // }); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/app/courses/courses.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { CoursesRoutingModule } from './courses-routing.module'; 5 | import { CoursesComponent } from './courses.component'; 6 | 7 | 8 | @NgModule({ 9 | declarations: [CoursesComponent], 10 | imports: [ 11 | CommonModule, 12 | CoursesRoutingModule 13 | ] 14 | }) 15 | export class CoursesModule { } 16 | -------------------------------------------------------------------------------- /src/app/data.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { DataService } from './data.service'; 4 | 5 | describe('DataService', () => { 6 | let service: DataService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(DataService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /src/app/data.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { environment } from 'src/environments/environment'; 3 | import { HttpClient, HttpHeaders } from '@angular/common/http'; 4 | import { tap } from 'rxjs/operators'; 5 | const udemyInstructorApiKey = environment.udemyInstructorApiKey; 6 | @Injectable({ 7 | providedIn: 'root', 8 | }) 9 | export class DataService { 10 | constructor(private http: HttpClient) {} 11 | 12 | getUdemyCourses() { 13 | const headers = new HttpHeaders({ 14 | 'Content-Type': 'application/json', 15 | Authorization: `Bearer ${udemyInstructorApiKey}`, 16 | }); 17 | const url = 18 | 'https://www.udemy.com/instructor-api/v1/taught-courses/courses?fields[course]=@all'; 19 | return this.http 20 | .get(url, { headers }) 21 | .pipe(tap((data) => console.log(data))); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/app/home/home-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { Routes, RouterModule } from '@angular/router'; 3 | 4 | import { HomeComponent } from './home.component'; 5 | 6 | const routes: Routes = [{ path: '', component: HomeComponent }]; 7 | 8 | @NgModule({ 9 | imports: [RouterModule.forChild(routes)], 10 | exports: [RouterModule] 11 | }) 12 | export class HomeRoutingModule { } 13 | -------------------------------------------------------------------------------- /src/app/home/home.component.html: -------------------------------------------------------------------------------- 1 |

Angular Scully Netlify CMS Starter

2 | 25 | 26 |

Get Started

27 | 28 | 30 | git clone 31 | git@github.com:mbaljeetsingh/ngscully-netlify-cms-starter.git 34 | cd project 35 | npm install 36 | ng build && npm run scully 39 | 40 | -------------------------------------------------------------------------------- /src/app/home/home.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | display: flex; 3 | flex-direction: column; 4 | align-items: center; 5 | } 6 | .links { 7 | a { 8 | margin-left: 1rem; 9 | margin-right: 1rem; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/app/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HomeComponent } from './home.component'; 4 | 5 | describe('HomeComponent', () => { 6 | let component: HomeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async(() => { 10 | TestBed.configureTestingModule({ 11 | declarations: [ HomeComponent ] 12 | }) 13 | .compileComponents(); 14 | })); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HomeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /src/app/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-home', 5 | templateUrl: './home.component.html', 6 | styleUrls: ['./home.component.scss'] 7 | }) 8 | export class HomeComponent implements OnInit { 9 | 10 | constructor() { } 11 | 12 | ngOnInit() { 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/app/home/home.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | 4 | import { HomeRoutingModule } from './home-routing.module'; 5 | import { HomeComponent } from './home.component'; 6 | import { MaterialModule } from '../shared/material.module'; 7 | 8 | @NgModule({ 9 | declarations: [HomeComponent], 10 | imports: [CommonModule, HomeRoutingModule, MaterialModule], 11 | }) 12 | export class HomeModule {} 13 | -------------------------------------------------------------------------------- /src/app/shared/material.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { CommonModule } from '@angular/common'; 3 | import { MatToolbarModule } from '@angular/material/toolbar'; 4 | import { MatIconModule } from '@angular/material/icon'; 5 | import { MatButtonModule } from '@angular/material/button'; 6 | import { MatListModule } from '@angular/material/list'; 7 | import { MatCardModule } from '@angular/material/card'; 8 | @NgModule({ 9 | declarations: [], 10 | imports: [ 11 | CommonModule, 12 | MatToolbarModule, 13 | MatIconModule, 14 | MatButtonModule, 15 | MatListModule, 16 | MatCardModule, 17 | ], 18 | exports: [ 19 | MatToolbarModule, 20 | MatIconModule, 21 | MatButtonModule, 22 | MatListModule, 23 | MatCardModule, 24 | ], 25 | }) 26 | export class MaterialModule {} 27 | -------------------------------------------------------------------------------- /src/assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbaljeetsingh/ngscully-netlify-cms-starter/76eb228018c9216a9de7b837ee2f4d9188d7b670/src/assets/.gitkeep -------------------------------------------------------------------------------- /src/assets/images/uploads/161.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbaljeetsingh/ngscully-netlify-cms-starter/76eb228018c9216a9de7b837ee2f4d9188d7b670/src/assets/images/uploads/161.jpg -------------------------------------------------------------------------------- /src/assets/ngscully.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbaljeetsingh/ngscully-netlify-cms-starter/76eb228018c9216a9de7b837ee2f4d9188d7b670/src/assets/ngscully.jpg -------------------------------------------------------------------------------- /src/assets/scully-routes.json: -------------------------------------------------------------------------------- 1 | [{"route":"/"},{"route":"/about"},{"route":"/courses"},{"route":"/blog"},{"route":"/blog/2020-06-27-blog","title":"2020-06-27-blog","description":"blog description","published":true,"sourceFile":"2020-06-27-blog.md"},{"route":"/blog/this-is-my-first-post","title":"this is my first post","description":"Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas","publish":true,"sourceFile":"this-is-my-first-post.md"},{"route":"/blog/this-is-the-fifth-post","title":"This is the fifth post","description":"Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas","publish":false,"sourceFile":"this-is-the-fifth-post.md"},{"route":"/blog/this-is-the-fourth-post","title":"This is the fourth post","description":"Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas","publish":false,"sourceFile":"this-is-the-fourth-post.md"},{"route":"/blog/this-is-the-second-post","title":"This is the second post","description":"Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas","publish":false,"sourceFile":"this-is-the-second-post.md"},{"route":"/blog/this-is-the-seventh-post","title":"This is the seventh post","description":"Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas","publish":false,"sourceFile":"this-is-the-seventh-post.md"},{"route":"/blog/this-is-the-sixth-post","title":"This is the sixth post","description":"Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas","publish":false,"sourceFile":"this-is-the-sixth-post.md"},{"route":"/blog/this-is-the-third-post","title":"This is the third post","description":"Lorem ipsum dolor, sit amet consectetur adipisicing elit. Quos cumque harum praesentium sapiente voluptas","publish":false,"sourceFile":"this-is-the-third-post.md"}] -------------------------------------------------------------------------------- /src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: false, 3 | udemyInstructorApiKey: 'OzOV3WatO93kyW9tWAKjMP4bdtULWbAi', 4 | }; 5 | -------------------------------------------------------------------------------- /src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false, 7 | udemyInstructorApiKey: 'OzOV3WatO93kyW9tWAKjMP4bdtULWbAi', 8 | }; 9 | 10 | /* 11 | * For easier debugging in development mode, you can import the following file 12 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 13 | * 14 | * This import should be commented out in production mode because it will have a negative impact 15 | * on performance if an error is thrown. 16 | */ 17 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 18 | -------------------------------------------------------------------------------- /src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mbaljeetsingh/ngscully-netlify-cms-starter/76eb228018c9216a9de7b837ee2f4d9188d7b670/src/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NgscullyNetlifyCmsStarter 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | import 'hammerjs'; 2 | import { enableProdMode } from '@angular/core'; 3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 4 | 5 | import { AppModule } from './app/app.module'; 6 | import { environment } from './environments/environment'; 7 | 8 | if (environment.production) { 9 | enableProdMode(); 10 | } 11 | 12 | platformBrowserDynamic().bootstrapModule(AppModule) 13 | .catch(err => console.error(err)); 14 | -------------------------------------------------------------------------------- /src/polyfills.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * This file includes polyfills needed by Angular and is loaded before the app. 3 | * You can add your own extra polyfills to this file. 4 | * 5 | * This file is divided into 2 sections: 6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. 7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main 8 | * file. 9 | * 10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that 11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), 12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. 13 | * 14 | * Learn more in https://angular.io/guide/browser-support 15 | */ 16 | 17 | /*************************************************************************************************** 18 | * BROWSER POLYFILLS 19 | */ 20 | 21 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */ 22 | // import 'classlist.js'; // Run `npm install --save classlist.js`. 23 | 24 | /** 25 | * Web Animations `@angular/platform-browser/animations` 26 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. 27 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). 28 | */ 29 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`. 30 | 31 | /** 32 | * By default, zone.js will patch all possible macroTask and DomEvents 33 | * user can disable parts of macroTask/DomEvents patch by setting following flags 34 | * because those flags need to be set before `zone.js` being loaded, and webpack 35 | * will put import in the top of bundle, so user need to create a separate file 36 | * in this directory (for example: zone-flags.ts), and put the following flags 37 | * into that file, and then add the following code before importing zone.js. 38 | * import './zone-flags.ts'; 39 | * 40 | * The flags allowed in zone-flags.ts are listed here. 41 | * 42 | * The following flags will work for all browsers. 43 | * 44 | * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame 45 | * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick 46 | * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames 47 | * 48 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js 49 | * with the following flag, it will bypass `zone.js` patch for IE/Edge 50 | * 51 | * (window as any).__Zone_enable_cross_context_check = true; 52 | * 53 | */ 54 | 55 | /*************************************************************************************************** 56 | * Zone JS is required by default for Angular itself. 57 | */ 58 | import 'zone.js/dist/zone'; // Included with Angular CLI. 59 | 60 | 61 | /*************************************************************************************************** 62 | * APPLICATION IMPORTS 63 | */ 64 | 65 | /*************************************************************************************************** 66 | 67 | * SCULLY IMPORTS 68 | 69 | */ 70 | 71 | // tslint:disable-next-line: align 72 | import 'zone.js/dist/task-tracking'; -------------------------------------------------------------------------------- /src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | 3 | html, body { height: 100%; } 4 | body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; } 5 | -------------------------------------------------------------------------------- /src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "files": [ 8 | "src/main.ts", 9 | "src/polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "baseUrl": "./", 5 | "outDir": "./dist", 6 | "sourceMap": true, 7 | "declaration": false, 8 | "downlevelIteration": true, 9 | "experimentalDecorators": true, 10 | "module": "esnext", 11 | "moduleResolution": "node", 12 | "importHelpers": true, 13 | "target": "es2015", 14 | "typeRoots": [ 15 | "node_modules/@types" 16 | ], 17 | "lib": [ 18 | "es2018", 19 | "dom" 20 | ] 21 | }, 22 | "angularCompilerOptions": { 23 | "fullTemplateTypeCheck": true, 24 | "strictInjectionParameters": true 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "tslint:recommended", 3 | "rules": { 4 | "array-type": false, 5 | "arrow-parens": false, 6 | "deprecation": { 7 | "severity": "warning" 8 | }, 9 | "component-class-suffix": true, 10 | "contextual-lifecycle": true, 11 | "directive-class-suffix": true, 12 | "directive-selector": [ 13 | true, 14 | "attribute", 15 | "app", 16 | "camelCase" 17 | ], 18 | "component-selector": [ 19 | true, 20 | "element", 21 | "app", 22 | "kebab-case" 23 | ], 24 | "import-blacklist": [ 25 | true, 26 | "rxjs/Rx" 27 | ], 28 | "interface-name": false, 29 | "max-classes-per-file": false, 30 | "max-line-length": [ 31 | true, 32 | 140 33 | ], 34 | "member-access": false, 35 | "member-ordering": [ 36 | true, 37 | { 38 | "order": [ 39 | "static-field", 40 | "instance-field", 41 | "static-method", 42 | "instance-method" 43 | ] 44 | } 45 | ], 46 | "no-consecutive-blank-lines": false, 47 | "no-console": [ 48 | true, 49 | "debug", 50 | "info", 51 | "time", 52 | "timeEnd", 53 | "trace" 54 | ], 55 | "no-empty": false, 56 | "no-inferrable-types": [ 57 | true, 58 | "ignore-params" 59 | ], 60 | "no-non-null-assertion": true, 61 | "no-redundant-jsdoc": true, 62 | "no-switch-case-fall-through": true, 63 | "no-var-requires": false, 64 | "object-literal-key-quotes": [ 65 | true, 66 | "as-needed" 67 | ], 68 | "object-literal-sort-keys": false, 69 | "ordered-imports": false, 70 | "quotemark": [ 71 | true, 72 | "single" 73 | ], 74 | "trailing-comma": false, 75 | "no-conflicting-lifecycle": true, 76 | "no-host-metadata-property": true, 77 | "no-input-rename": true, 78 | "no-inputs-metadata-property": true, 79 | "no-output-native": true, 80 | "no-output-on-prefix": true, 81 | "no-output-rename": true, 82 | "no-outputs-metadata-property": true, 83 | "template-banana-in-box": true, 84 | "template-no-negated-async": true, 85 | "use-lifecycle-interface": true, 86 | "use-pipe-transform-interface": true 87 | }, 88 | "rulesDirectory": [ 89 | "codelyzer" 90 | ] 91 | } --------------------------------------------------------------------------------