Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to new CMS structure #624

Merged
merged 56 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d428489
Add parcel
martendegroot Sep 16, 2024
d6bf3f4
New admin based on parcel
martendegroot Sep 16, 2024
a292c73
Experimental work
martendegroot Sep 16, 2024
2dfc460
Remove testpages
martendegroot Oct 14, 2024
ec0ce7e
Remove redundant npm script
martendegroot Oct 14, 2024
e078079
Removed experimental code
martendegroot Oct 14, 2024
fdbec88
Added newline
martendegroot Oct 14, 2024
6a3b0ac
Delete hero.ts
martendegroot Oct 14, 2024
1b5f396
Replace Pages component with WhyOurWorkMatters component
martendegroot Oct 14, 2024
ce26796
Added intro partial component
MagicLegend Oct 14, 2024
8952cfc
WIP - Added sections partial and why our work matters intro demo
MagicLegend Oct 14, 2024
a3fc174
Added new page content and building blocks
martendegroot Oct 19, 2024
aa5f08a
Added double decker component
martendegroot Oct 20, 2024
eeb881d
Extended paper functionality
martendegroot Oct 20, 2024
69a2a29
Added pill with cta
martendegroot Oct 20, 2024
9e18ae2
Added suggested articles component
martendegroot Oct 21, 2024
a21ea4b
Updated packages
martendegroot Nov 22, 2024
7385223
Fixed packages
martendegroot Nov 23, 2024
e4332c2
Fixed ESLint issues
martendegroot Nov 23, 2024
6252826
Rebuilt lockfile
martendegroot Nov 23, 2024
d3bed30
Fixed prettier
martendegroot Nov 23, 2024
4c786f3
Disabled eslint indent rule
martendegroot Nov 23, 2024
e3ad876
Fixed missing package
martendegroot Nov 23, 2024
0761d0f
Fixed collections
martendegroot Nov 23, 2024
8ff374f
Added custom desktop breakpoint
martendegroot Nov 23, 2024
efdddf4
Added DIVD colors to TS config
martendegroot Nov 23, 2024
c3794fa
Updated articles to existing definitions
martendegroot Nov 23, 2024
251c4c9
Added todo comments
martendegroot Nov 23, 2024
7d42293
Removed debug statement
martendegroot Nov 23, 2024
59890d3
Fixed Hugo date error
martendegroot Nov 23, 2024
4aef190
Added postcss CLI back in for Hugo
martendegroot Nov 23, 2024
524fe62
Quickfixed broken slug command
martendegroot Nov 23, 2024
52068e1
Fixed ugly incomplete broken html tags in single file
martendegroot Nov 23, 2024
9081581
Removed obsolete config setting
martendegroot Nov 23, 2024
8aba4f5
Temp fixed annoying prettier spacing issue
martendegroot Nov 23, 2024
1f42cdd
Switched from Parcel to Vite for CMS building
MagicLegend Nov 24, 2024
afb69e8
Removed parcel remains
martendegroot Nov 24, 2024
3d00805
+ FAQ section for articles
MagicLegend Nov 24, 2024
07307c7
* Redesigned FAQ element in Tailwind
MagicLegend Nov 24, 2024
5fe6097
* Made sure only one FAQ element can be open at a time
MagicLegend Nov 24, 2024
6531260
/ Fixed desktop styling selectors
MagicLegend Nov 24, 2024
bba4cff
Fixed state conditional styling selector
martendegroot Nov 24, 2024
2b53fcd
Added default container config
martendegroot Nov 24, 2024
f630a56
Added font definitions
martendegroot Nov 26, 2024
a05c926
Removed section and layout open and close on newsroom article
martendegroot Nov 26, 2024
fffd709
+ Vite CMS build and auto-deploy to Github Pages side by side with th…
MagicLegend Dec 3, 2024
f4849cd
+ Split off article researchers widget
MagicLegend Dec 3, 2024
2e40924
Moved article Collection around
martendegroot Dec 3, 2024
5897d35
Merge branch 'main' into new-cms
MagicLegend Dec 15, 2024
653fa39
625 - Fixated Hugo version to fix builds
MagicLegend Dec 17, 2024
05fa5b4
625 - Didn't RTFM so had to commit twice
MagicLegend Dec 17, 2024
4523c4c
Merge branch 'main' into new-cms
MagicLegend Dec 17, 2024
b9193e4
Fix called NPM command during build for building cms
MagicLegend Dec 17, 2024
9e3e42b
Merge branch 'new-cms' of github.com:DIVD-NL/web-www-v2 into new-cms
MagicLegend Dec 17, 2024
424cdfb
Fixed buttons on all articles to fix build
MagicLegend Dec 17, 2024
a456535
Disabled postbuild search script for now
MagicLegend Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module.exports = {
rules: {
'no-console': 'off',
'comma-dangle': 'off',
'max-len': 'off'
}
'max-len': 'off',
indent: 'off',
},
ignorePatterns: ['node_modules/', 'dist/', 'public/', 'static/'],
};
53 changes: 27 additions & 26 deletions .github/workflows/build_pages_native.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: build_test_deploy
run-name: Build and test website (and deploy if needed)
on:
on:
push:
branches:
- main
Expand All @@ -20,38 +20,39 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache: "npm"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.139.4' # See https://github.com/gohugoio/hugo/issues/13150
extended: true
- name: Build
run: |
npm install
npm run gen-people
npm run gen-teams
npm run update-stats
hugo --minify
npm run postbuild
# - name: Test HTML code
# uses: Cyb3r-Jak3/[email protected]
# with:
# root: public
# - name: Upload HTML test report
# uses: actions/upload-artifact@v3
# if: success() || failure() # Run even if we had an error
# with:
# name: html5validator_log
# path: log.log
run: |
npm install
npm run gen-people
npm run gen-teams
npm run update-stats
npm run cms-build
hugo --minify
npm run postbuild
# - name: Test HTML code
# uses: Cyb3r-Jak3/[email protected]
# with:
# root: public
# - name: Upload HTML test report
# uses: actions/upload-artifact@v3
# if: success() || failure() # Run even if we had an error
# with:
# name: html5validator_log
# path: log.log
- name: Modify .htacess for staging
if: ${{ github.ref == 'refs/heads/staging' }}
if: ${{ github.ref == 'refs/heads/staging' }}
run: |
sed -i 's#www\.divd#staging.divd#' public/.htaccess
sed -i 's#\-2024#-staging#g' public/.htaccess
sed -i 's#www\.divd#staging.divd#' public/.htaccess
sed -i 's#\-2024#-staging#g' public/.htaccess
- name: rsync deploy staging
uses: burnett01/[email protected]
if: ${{ github.ref == 'refs/heads/staging' }} # && ( success() || failure() ) # Remove the && clause when a HTML check is flawless
if: ${{ github.ref == 'refs/heads/staging' }} # && ( success() || failure() ) # Remove the && clause when a HTML check is flawless
with:
switches: -avzr --delete
path: public/
Expand All @@ -61,7 +62,7 @@ jobs:
remote_key: ${{ secrets.DEPLOY_KEY }}
- name: rsync deploy production
uses: burnett01/[email protected]
if: ${{ github.ref == 'refs/heads/main' }} # && ( success() || failure() ) # Remove the && clause when a HTML check is flawless
if: ${{ github.ref == 'refs/heads/main' }} # && ( success() || failure() ) # Remove the && clause when a HTML check is flawless
with:
switches: -avzr --delete
path: public/
Expand All @@ -71,6 +72,6 @@ jobs:
remote_key: ${{ secrets.DEPLOY_KEY }}
- name: Deploy GitHub pages
uses: JamesIves/github-pages-deploy-action@v4
if: ( ${{ github.ref == 'refs/heads/main' }} || ${{ github.ref == 'refs/heads/staging' }} ) # && ( success() || failure() ) # Remove the && clause when a HTML check is flawless
if: ( ${{ github.ref == 'refs/heads/main' }} || ${{ github.ref == 'refs/heads/staging' }} ) # && ( success() || failure() ) # Remove the && clause when a HTML check is flawless
with:
folder: admin # The folder the action should deploy.
folder: admin # The folder the action should deploy.
69 changes: 35 additions & 34 deletions .github/workflows/build_pages_no_push.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
name: build_and_test_no_deploy
run-name: Build and test website, but not deploy
on:
pull_request:
pull_request:

jobs:
build_and_test_no_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.139.4' # See https://github.com/gohugoio/hugo/issues/13150
extended: true
- name: Build
run: |
npm install
npm run gen-people
npm run gen-teams
npm run update-stats
hugo --minify
npm run postbuild
# - name: Test HTML code
# uses: Cyb3r-Jak3/[email protected]
# with:
# root: public
# - name: Upload HTML test report
# uses: actions/upload-artifact@v3
# if: success() || failure() # Run even if we had an error
# with:
# name: html5validator_log
# path: log.log
build_and_test_no_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.139.4' # See https://github.com/gohugoio/hugo/issues/13150
extended: true
- name: Build
run: |
npm install
npm run gen-people
npm run gen-teams
npm run update-stats
npm run cms-build
hugo --minify
npm run postbuild
# - name: Test HTML code
# uses: Cyb3r-Jak3/[email protected]
# with:
# root: public
# - name: Upload HTML test report
# uses: actions/upload-artifact@v3
# if: success() || failure() # Run even if we had an error
# with:
# name: html5validator_log
# path: log.log
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
public
resources
out
dist

# Package dependencies
node_modules/
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"files": ["*.html"],
"options": {
"parser": "go-template",
"goTemplateBracketSpacing": true,
"bracketSameLine": true
}
},
Expand All @@ -15,5 +14,6 @@
"singleQuote": true
}
}
]
],
"plugins": ["prettier-plugin-go-template"]
}
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# DIVD website
If you notice anything that might need improvement or is just not working for you, let us know. Feel free to give feedback by sumbitting an issue. Bonuspoints for a detailled description and screenshots if possible.

If you notice anything that might need improvement or is just not working for you, let us know. Feel free to give feedback by sumbitting an issue. Bonuspoints for a detailled description and screenshots if possible.

# Chocolate Requests
A pull request is like a box of chocolate...
The first 10 pull requests that genuinely improve the website will receive a box of chocolates. Pull requests related to spelling or typographical errors do not count. We all like a challenge right?

A pull request is like a box of chocolate...
The first 10 pull requests that genuinely improve the website will receive a box of chocolates. Pull requests related to spelling or typographical errors do not count. We all like a challenge right?

# Prerequisites

Expand Down Expand Up @@ -42,14 +42,7 @@ npm run gen-teams
## Local admin

```sh
just admin
open http://localhost:8000
just admin-stop #when done

# equivalent to:

npx decap-server
python3 -m http.server --directory ./admin/development
npm run cms
```

## Test production version
Expand Down
Loading
Loading