Skip to content

Commit

Permalink
Feeds: SSR & AMP implementation (#262)
Browse files Browse the repository at this point in the history
* feat: create new nextjs project 'feeds'

* feat: retrieve & display each md file statically

* fix: abandon newly created nextjs app (feeds); retry migrating existing cra app (blog)

* Insert external Feeds app with iframe

* Move Feeds Next app into the same repo

* fix: feed style

* fix: change path of feeds git submodule

* Update blog.yml

* fix(deps): update dependency axios to v0.24.0

* chore(deps): update dependency @testing-library/react to v12

* feat: add translation for Feeds

* feat: display spinner when Feeds iframe is loading

* fix: adjust Feeds index padding/margin

* feat: extract and display feeds info from filename

* feat: AMP implementation

* fix: remove old 'blogs' folder

* chore(deps): update dependency cssnano to v5

* fix: set Feeds domain for different environment

* chore(deps): update dependency css-minimizer-webpack-plugin to v3

* feat: apply ignore rule to .eslintrc

* fix: assign error type as any

* fix: type for LangMap

* fix: init cover image with empty string

* fix: add types for props

* fix: add types for amp components

* fix: ReactMarkdown custom img component type

* fix: fix wrong import path

* fix: remove imagemin-svgo

* fix: search bar text for feeds

* fix: fetch submodule

* fix: fetch submodule

* ci: add codeql

* fix: add eslint-config-ts-react-important-stuff

* fix: add prettier

* fix: add babel-eslint

* feeds: add submodule

* fix: add babel libraries

* fix: set submodule branch to main

* fix: remove unused libraries

* fix: remove using amp-img

* fix: disable amp

* chore(deps): update dependency dotenv-webpack to v7 (#257)

Co-authored-by: Austin Zhu <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>

* fix: change env var name to FEEDS

* fix: pnpm install & syllabus course item block

* fix: filter button style

Co-authored-by: Austin Zhu <[email protected]>
Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
4 people authored Nov 11, 2021
1 parent 43d1463 commit 21198a0
Show file tree
Hide file tree
Showing 76 changed files with 10,196 additions and 12,915 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/blog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
branches: [ '**' ]
paths:
- 'blog/**'
- 'feeds/**'
pull_request:
branches: [ 'master', 'develop' ]
paths:
- 'feeds/**'

jobs:
build:
Expand All @@ -15,6 +19,9 @@ jobs:
REACT_APP_BLOG_S3_BASE_URL: https://wasedatime-feeds.s3-ap-northeast-1.amazonaws.com
steps:
- uses: actions/checkout@v2
with:
submodules: true
token: ${{ secrets.ACCESS_TOKEN_GITHUB }}
- name: Use Node.js 16.x
uses: actions/[email protected]
with:
Expand All @@ -26,4 +33,4 @@ jobs:
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/microapp
with:
path: 'blog'
path: 'feeds'
6 changes: 5 additions & 1 deletion .github/workflows/campus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [ '**' ]
paths:
- 'campus/**'
pull_request:
branches: [ 'master', 'develop' ]
paths:
- 'campus/**'

jobs:
build:
Expand All @@ -26,4 +30,4 @@ jobs:
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/microapp
with:
path: 'campus'
path: 'campus'
6 changes: 5 additions & 1 deletion .github/workflows/career.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [ '**' ]
paths:
- 'career/**'
pull_request:
branches: [ 'master', 'develop' ]
paths:
- 'career/**'

jobs:
build:
Expand All @@ -26,4 +30,4 @@ jobs:
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/microapp
with:
path: 'career'
path: 'career'
70 changes: 70 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main, develop ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '42 19 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
20 changes: 20 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Node.js CI - Root

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Deploy staging
if: github.event.release.prerelease == 'true'
run: |
echo "Deploying..."
- name: Deploy production
if: github.event.release.prerelease == 'false'
run: |
echo "Deploying..."
6 changes: 5 additions & 1 deletion .github/workflows/root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [ '**' ]
paths:
- 'root/**'
pull_request:
branches: [ 'master', 'develop' ]
paths:
- 'root/**'

jobs:
build:
Expand All @@ -26,4 +30,4 @@ jobs:
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/microapp
with:
path: 'root'
path: 'root'
6 changes: 5 additions & 1 deletion .github/workflows/syllabus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: [ '**' ]
paths:
- 'syllabus/**'
pull_request:
branches: [ 'master', 'develop' ]
paths:
- 'syllabus/**'

jobs:
build:
Expand All @@ -26,4 +30,4 @@ jobs:
key: ${{ runner.os }}-node16-${{ hashFiles('**/pnpm-lock.yaml') }}
- uses: ./.github/actions/microapp
with:
path: 'syllabus'
path: 'syllabus'
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "blog/src/feeds"]
path = blog/src/feeds
url = https://github.com/wasedatime/feeds
[submodule "feeds/public/feeds"]
path = feeds/public/feeds
url = https://github.com/wasedatime/feeds.git
branch = main
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 WasedaTime

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.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ cd wasedatime-web
Add bit token to your environment variables:
```bash

# macOS
nano ~/.bash_profile

# Linux
nano ~/.bashrc

# Then inside the file write:
Expand Down Expand Up @@ -193,6 +189,8 @@ Submit an issue or a pull request! :blush:
<td align="center"><a href="#"><sub><b>Zenda Chen</b></sub></a><br /><a href="#" title="Business, Design, Ideas">💼🎨🤔</a></td>
<td align="center"><a href="#"><sub><b>Kaiqing Chang</b></sub></a><br /><a href="#" title="Business, Design, Ideas">💼🎨🤔</a></td>
<td align="center"><a href="https://github.com/kaedejima"><img src="https://avatars.githubusercontent.com/u/49092226?s=400&u=7f7d80600a0007aadc8a9e6d0df69e38088c5562&v=4" width="100px;" alt=""/><br /><sub><b>Kaede Iijima</b></sub></a><br /><a href="#code" title="Tutorials, Design">✅🎨</a></td>
<td align="center"><a href="https://github.com/nichnarmada"><img src="https://avatars.githubusercontent.com/u/36405403?v=4" width="100px;" alt=""/><br /><sub><b>Nicholas Narmada</b></sub></a><br /><a href="#" title="Code, Ideas, Planning, & Feedback">💻🤔</a></td>
<td align="center"><a href="https://github.com/ronin207"><img src="https://avatars.githubusercontent.com/u/59204227?v=4" width="100px;" alt=""/><br /><sub><b>Takumi Otsuka</b></sub></a><br /><a href="#" title="Code, Ideas, Planning, & Feedback">💻🤔</a></td>
</tr>
</table>
Expand Down
7 changes: 0 additions & 7 deletions blog/.prettierignore

This file was deleted.

Empty file removed blog/README.md
Empty file.
27 changes: 0 additions & 27 deletions blog/babel.config.json

This file was deleted.

12 changes: 0 additions & 12 deletions blog/jest.config.js

This file was deleted.

82 changes: 0 additions & 82 deletions blog/package.json

This file was deleted.

Loading

0 comments on commit 21198a0

Please sign in to comment.