Skip to content

Commit c132ae2

Browse files
authored
Merge pull request #381 from nimbinatus/zola-build
feat(zola): move site to Zola
2 parents 3aa475c + dbe01bb commit c132ae2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2375
-34899
lines changed

.github/ISSUE_TEMPLATE/new_project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Check the site https://redhatofficial.github.io first to ensure this project is
1717
To add a new project we need:
1818
- Project name
1919
- Project description
20-
- Link to the github repository
20+
- Link to the GitHub repository
2121
- Link to the project's website
2222
- General category for this project
2323

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
Your updates should work in the following environments:
2020

2121
- [ ] Latest 2 versions of Edge
22-
- [ ] Internet Explorer 11 (should be useable, not pixel perfect)
23-
- [ ] Latest 2 versions of Firefox (one on Mac OS, one of Windows OS)
22+
- [ ] Internet Explorer 11 (should be usable, not pixel perfect)
23+
- [ ] Latest 2 versions of Firefox (one on macOS, one of Windows OS)
2424
- [ ] Firefox 68 (or latest version for Red Hat Enterprise Linux distribution)
25-
- [ ] Latest 2 versions of Chrome (one on Mac OS, one of Windows OS)
25+
- [ ] Latest 2 versions of Chrome (one on macOS, one of Windows OS)
2626
- [ ] Latest 2 versions of Safari
2727
- [ ] Android mobile device (such as the Galaxy S9)
2828
- [ ] Apple mobile device (such as the iPhone X)

.github/workflows/build.yml

Lines changed: 39 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,43 @@
1-
name: Validate build & urls
2-
on: [pull_request]
3-
jobs:
4-
build:
5-
runs-on: ubuntu-latest
6-
strategy:
7-
matrix:
8-
node-version: [12.x]
9-
steps:
10-
- name: Checkout repository
11-
uses: actions/checkout@v2
1+
name: Build site
122

13-
- name: Capture changed files
14-
uses: jitterbit/get-changed-files@v1
15-
id: files
16-
with:
17-
format: csv
18-
token: ${{ secrets.GITHUB_TOKEN }}
3+
on:
4+
push:
5+
branches: [ "dev" ]
6+
pull_request:
7+
types:
8+
- opened
9+
- reopened
10+
- synchronize
11+
- closed
1912

20-
- name: Cache node modules
21-
uses: actions/cache@v2
22-
env:
23-
cache-name: cache-node-modules
24-
with:
25-
# npm cache files are stored in `~/.npm` on Linux/macOS
26-
path: ~/.npm
27-
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
28-
restore-keys: |
29-
${{ runner.os }}-build-${{ env.cache-name }}-
30-
${{ runner.os }}-build-
31-
${{ runner.os }}-
13+
concurrency: preview-${{ github.ref }}
3214

33-
- name: Install dependencies
34-
run: npm install
15+
env:
16+
CARGO_TERM_COLOR: always
3517

36-
- name: Backwards compatibility
37-
run: |
38-
mkdir -p dist
39-
npm run babel
40-
41-
- name: Build
42-
run: npm run build
43-
44-
- name: Validate URLs
45-
# Only run this if these files were edited
46-
if: contains(steps.files.outputs.added_modified, 'app/data/*.json')
47-
uses: urlstechie/[email protected]
48-
with:
49-
# Only validate the files that were changed
50-
include_files: ${{ steps.files.outputs.added_modified }}
51-
sub_folder: app/data/
52-
file_types: .json
53-
timeout: 3
18+
jobs:
19+
build_and_deploy:
20+
runs-on: ubuntu-latest
21+
if: github.ref == 'refs/heads/dev'
22+
steps:
23+
- name: Check out repository
24+
uses: actions/checkout@v4
25+
- name: Build and deploy
26+
uses: shalzz/[email protected]
27+
env:
28+
PAGES_BRANCH: gh-pages
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
preview:
31+
runs-on: ubuntu-latest
32+
if: github.ref != 'refs/heads/dev'
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v4
36+
- name: Install and build
37+
if: github.event.action != 'closed'
38+
uses: shalzz/[email protected]
39+
env:
40+
BUILD_ONLY: true
41+
BUILD_FLAGS: --drafts
42+
BUILD_THEMES: false
43+
CHECK_LINKS: true

.github/workflows/pages.yml

Lines changed: 0 additions & 56 deletions
This file was deleted.

README.md

Lines changed: 37 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ We’ve put together a comprehensive list of the projects hosted on GitHub in wh
66

77
To add or modify projects to the list on [https://redhatofficial.github.io](https://redhatofficial.github.io), either submit a pull request or create an issue in the [repo](https://github.com/RedHatOfficial/RedHatOfficial.github.io). Upon review, the site maintainers will merge the PR or change the content as requested. No direct merges will be accepted.
88

9-
All projects are stored in the `/app/data` directory in the `projects.json` file within the dev branch of this repo. Try to add your project alphabetically (just to make the file easier to search) and create a new object in the JSON that has:
9+
All projects are stored in the `/data` directory in the `projects.json` file within the dev branch of this repo. Try to add your project alphabetically (just to make the file easier to search) and create a new object in the JSON that has:
1010

1111
```js
1212
{
@@ -16,7 +16,8 @@ All projects are stored in the `/app/data` directory in the `projects.json` file
1616
"projectWebsite": "http://foo.github.io",
1717
"category": "Development",
1818
"twitterHandle": "",
19-
"twitterURL": ""
19+
"twitterURL": "",
20+
"lowercaseName": "foo project"
2021
}
2122
```
2223

@@ -52,30 +53,56 @@ This list is just for Red Hat contributions to projects hosted on GitHub. See ht
5253

5354
Open an issue in _this_ repo, and the owners of the RedHatOfficial organization will get in touch with you.
5455

55-
## Quick start
56+
## Changing the Featured list
57+
58+
To modify the featured projects, submit a pull request modifying the `/data/featured.json` file within the `dev` branch. You need to replace one of the featured projects rather than adding to the file.
59+
60+
In addition, you need to replace the logo in the `static/img` directory. The naming convention is important; you must name the image file as `logo-<logo>.png`, with `logo` here referencing the value in the `featured.json` file entry. So, for example, given the following entry:
61+
62+
```json
63+
{
64+
"name": "CentOS Project",
65+
"logo": "centos",
66+
"github": "https://github.com/CentOS",
67+
"twitter": "https://twitter.com/CentOSProject",
68+
"website": "https://www.centos.org/",
69+
"description": "A solid, predictable base to build upon, with extensive resources to build, test, release, and maintain code."
70+
}
71+
```
72+
The image would be `logo-centos.png`.
73+
74+
Upon review, the site maintainers will merge the PR or change the content as requested. No direct merges will be accepted.
75+
76+
## Contributing to the build
77+
78+
### Quick start
5679

5780
```
5881
git clone https://github.com/RedHatOfficial/RedHatOfficial.github.io.git
5982
cd RedHatOfficial.github.io
6083
```
6184

62-
## Building and running locally
85+
### Building and running locally
6386

64-
To build and run this project in your local dev environment, follow the instructions below. Be sure you have [Node.js](https://nodejs.org/) installed before you start.
87+
To build and run this project in your local dev environment, first install [Zola](https://www.getzola.org/documentation/getting-started/installation/). Then, run
6588

66-
1. Install dependencies: `npm install`
67-
2. Run the local development server: `npm start`
89+
```bash
90+
cd site
91+
zola serve
92+
```
6893

69-
The web page will start running on [localhost:8080](http://localhost:8080/).
94+
Go to the URL for the webserver (likely `localhost:1111`) to explore the site.
7095

7196
## Built with
7297

73-
This site was created using [Angular](https://angularjs.org/), [webpack](https://webpack.js.org/), [NPM](https://www.npmjs.com/), [Babel](https://babeljs.io/), [Sass](https://sass-lang.com/), and [Netlify](https://www.netlify.com/).
98+
This project is build and run using [Zola](https://www.getzola.org/), a Rust-based static site generator.
99+
100+
Under the hood, Zola uses [Tera](https://keats.github.io/tera/) for templating.
74101

75102
## Licensing
76103

77104
- [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) for the displayed page and primary license for this repository
78-
- [MIT](https://opensource.org/licenses/MIT) for the JavaScript
105+
- [MIT](https://opensource.org/licenses/MIT) for the small bits of Javascript within the HTML files
79106
- [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) for the HTML and CSS
80107

81108
Red Hat trademarks are not subject to the above license grants.

app/components/band/band.html

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/components/band/band.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/components/bandheader/bandheader.html

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/components/bandheader/bandheader.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

app/components/bandheader/bandheader.scss

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)