{"id":22341762,"url":"https://github.com/weaponsforge/disable-site","last_synced_at":"2026-03-07T02:07:14.658Z","repository":{"id":247300493,"uuid":"825481154","full_name":"weaponsforge/disable-site","owner":"weaponsforge","description":"Simple one-page static site preview of a disabled website featuring configurable basic text content.","archived":false,"fork":false,"pushed_at":"2025-02-21T15:15:28.000Z","size":1710,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-03-04T19:35:17.468Z","etag":null,"topics":["nextjs","nextjs-ssg","nextjs14","static-site"],"latest_commit_sha":null,"homepage":"https://weaponsforge.github.io/disable-site/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/weaponsforge.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-07T22:35:25.000Z","updated_at":"2024-07-08T03:00:55.000Z","dependencies_parsed_at":"2024-07-08T00:22:16.795Z","dependency_job_id":"01726154-299a-4467-b678-6a7cd6e3567b","html_url":"https://github.com/weaponsforge/disable-site","commit_stats":null,"previous_names":["weaponsforge/disable-site"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/weaponsforge/disable-site","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fdisable-site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fdisable-site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fdisable-site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fdisable-site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weaponsforge","download_url":"https://codeload.github.com/weaponsforge/disable-site/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weaponsforge%2Fdisable-site/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30205893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"online","status_checked_at":"2026-03-07T02:00:06.765Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nextjs","nextjs-ssg","nextjs14","static-site"],"created_at":"2024-12-04T08:08:10.510Z","updated_at":"2026-03-07T02:07:09.643Z","avatar_url":"https://github.com/weaponsforge.png","language":"JavaScript","readme":"## disable-site\n\nSimple one-page static site displaying a \"disabled\" version of a website, featuring configurable basic text content.\n\n\u003e The client app is bootstrapped using NextJS v14.2.4. It uses the NextJS pages router since it only publishes static content.\n\n### Requirements\n\nThe following dependencies are used for this project. Feel free to experiment using othere dependencies and versions.\n\n1. Windows 10 64-bit OS\n2. nvm version 1.1.12 (for Windows)\n3. NodeJS LTS v20.15.0\n   - node v20.15.0\n   - npm 10.7.0\n\n### Core Libraries and Frameworks\n\n#### Client app\n  - NextJS 14.2.4\n  - TailwindCSS 3.4.1\n  - React 18\n\n## Installation\n\n1. Clone this repository.\u003cbr\u003e\n`git clone https://github.com/weaponsforge/disable-site.git`\n\n2. Install dependencies.\u003cbr\u003e\n   ```\n   cd client\n   npm install\n   ```\n\n3. Set up the environment variables. Create a `.env` file inside the **/client** directory with reference to the `.env.example` file.\n\n   | Variable Name | Description |\n   | --- | --- |\n   | NEXT_PUBLIC_BASE_PATH | Root directory path name that NextJS uses for assets, media and client-side routing for the app.\u003cbr\u003eSet its value to blank `''` when working on development mode in localhost.\u003cbr\u003eSet its value to the sub-directory name where the exported NextJS app is to be deployed, i.e. `/\u003cYOUR_REPOSITORY_NAME\u003e` when deploying on a repository (sub-directory) of a root GitHub Pages site, i.e, on\u003cbr\u003e`https://\u003cYOUR_GITHUB_USERNAME\u003e.github.io/\u003cYOUR_REPOSITORY_NAME\u003e` |\n\n## Usage\n\n1. Run the client app in development mode on localhost.\u003cbr\u003e\n   ```\n   cd client\n   npm run dev\n   ```\n\n2. Create a new page with custom modal dialog text.\n   - Create a new page component under the `/src/pages` directory.\n   - Export `getStaticProps()` function from the new page component. The function should construct and return the `title`, `background` and `paragaraphs[]` key-value pairs.\n\n      ```jsx\n       export async function getStaticProps () {\n         return {\n           props: {\n             title: \"Hello, World!\",\n             background: \"/images/rg_inazuma2.jpg\",\n             paragraphs: [\n               { id: 0, content: \"Sample text 1\" },\n               { id: 1, content: \"Sample text 2\" },\n              ...\n            ]\n          }\n        }\n      }\n      ```\n   - Import and use the `NoticePage` component into the component created from the previous step. It should receive the `title`. `backgroud` and `paragraphs` props from the `getStaticProps()` function, and pass them to the `NoticePage` component. For example:\n\n      ```jsx\n      function App ({ title, paragraphs, background }) {\n        return (\n          \u003cNoticePage\n            title={title}\n            paragraphs={paragraphs}\n            background={background}\n            Component={LinkTo}\n          /\u003e\n        )\n      }\n      ```\n\n\n## Deployment\n\n### Firebase Hosting\n\nFollow these steps for manually deploying the static site to Firebase Hosting.\n\nCreate the **GitHub Actions Secrets** described in the [GitHub Actions](#github-actions) section to automatically deploy the `dev` branch to Firebase Hosting on every new push or update to the `dev` branch.\n\n#### Requirements\n\n1. Firebase project with Firebase Hosting pre-configured and set-up.\n2. Firebase CLI (Firebase Admin)\n   - Installed preferrably using the `\"npm install -g firebase-tools\"` command.\n\n#### Steps\n\n1. Open the `firebaserc` file in the client directory.\n2. Replace the `\"\u003cFIREBASE_PROJECT_NAME\u003e\"` key with a target Firebase project.\n3. Replace the `\"\u003cFIREBASE_HOSTING_NAME_UNDER_FIREBASE_PROJECT\u003e\"` key with a target Firebase Hosting name under the `\"\u003cFIREBASE_PROJECT_NAME\u003e\"`.\n4. Build the static site.\u003cbr\u003e\n`npm run build`\n5. Login to your Firebase account using the Firebase CLI.\u003cbr\u003e\n`firebase login`\n6. Deploy the static site.\u003cbr\u003e\n`firebase deploy --only hosting`\n\n## GitHub Actions\n\nAdd the following GitHub Actions \"Secrets\" for deploying the development app to Firebase Hosting\n\n| GitHub Secret Name | Description |\n| --- | --- |\n| NEXT_PUBLIC_BASE_PATH | GitHub repository name. Review the `NEXT_PUBLIC_BASE_PATH` under the [Installation](#installation) section for more information. |\n| FIREBASE_PROJECT | Firebase project ID |\n| FIREBASE_HOSTING | Firebase Hosting name under the `FIREBASE_PROJECT` |\n| FIREBASE_TOKEN | Firebase CI token used for deploying the /client app to Firebase Hosting. This is obtained by signing-in to the firebase CLI with `\"firebase login:ci\"`. |\n\n## Available Scripts\n\n### `npm run dev`\n\nStarts the local NextJS app in development mode on localhost.\n\n### `npm run build`\n\nBuilds the static site into the `\"out\"` directory.\n\n### `npm start`\n\nServes the static build output of the `\"npm run build\"` script on http://localhost:3000\n\n### `npm run lint`\n\nChecks lint errors.\n\n### `npm run lint:fix`\n\nFixes lint errors.\n\n### `gen:randomtext`\n\nGenerates a sentence containing random words.\n\n@weaponsforge\u003cbr\u003e\n20240708\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fdisable-site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweaponsforge%2Fdisable-site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweaponsforge%2Fdisable-site/lists"}