{"id":13558278,"url":"https://github.com/18F/pages","last_synced_at":"2025-04-03T13:30:56.372Z","repository":{"id":30937899,"uuid":"34495913","full_name":"18F/pages","owner":"18F","description":"DEPRECATED: Publishing platform for 18F sites a la GitHub pages","archived":true,"fork":false,"pushed_at":"2016-08-19T21:29:03.000Z","size":97,"stargazers_count":63,"open_issues_count":14,"forks_count":17,"subscribers_count":134,"default_branch":"18f-pages","last_synced_at":"2024-11-04T09:37:10.302Z","etag":null,"topics":["deprecated"],"latest_commit_sha":null,"homepage":"https://pages.18f.gov","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/18F.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-24T03:28:50.000Z","updated_at":"2023-01-28T21:23:31.000Z","dependencies_parsed_at":"2022-09-08T12:00:28.544Z","dependency_job_id":null,"html_url":"https://github.com/18F/pages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18F%2Fpages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18F%2Fpages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18F%2Fpages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/18F%2Fpages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/18F","download_url":"https://codeload.github.com/18F/pages/tar.gz/refs/heads/18f-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247009507,"owners_count":20868565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["deprecated"],"created_at":"2024-08-01T12:04:51.475Z","updated_at":"2025-04-03T13:30:56.094Z","avatar_url":"https://github.com/18F.png","language":"Ruby","funding_links":[],"categories":["Ruby","others"],"sub_categories":[],"readme":"# 18F Pages\n\n[18F Pages](https://pages.18f.gov/) is the serving host and publishing\nplatform that [18F](https://18f.gsa.gov/) uses to prototype and publish many\nof its [Jekyll](http://jekyllrb.com/)-based and other statically-generated web\nsites. It works very similarly to [GitHub pages](https://pages.github.com/).\n\nThis repo contains the Jekyll source for the https://pages.18f.gov/ home page\nitself.\n\nThe 18F Pages publishing server is available as the [`18f-pages-server`\nnpm](https://www.npmjs.com/package/18f-pages-server), the code for which\nresides in the [18F/pages-server\nrepository](https://github.com/18F/pages-server/). Complete details on the\npublishing mechanism and server installation, configuration, and\nadministration are available in the README posted on both of those pages.\n\n## Reusability\n\nThe server may be reused by other organizations, as it is completely\nconfigurable via the [`pages-config.json`](#pages-config) file. You may\nimagine replacing all instances of \"18F\" in the instructions that follow with\nyour own organization's handle.\n\n## Publishing to `pages.18f.gov`\n\nPublished sites will appear as `https://pages.18f.gov/REPO-NAME`, where\n`REPO-NAME` is the name of the site's repository without the organization\nprefix.\n\nFor example, `18F/guides-template` will publish to\nhttps://pages.18f.gov/guides-template/.\n\nThe status of the most recent build attempt will be visible at\n`https://pages.18f.gov/REPO-NAME/build.log`.\n\n### When to use this technique\n\nThe one condition test: \"Is this site going to be for public (non-18F) consumption? If yes, use pages.18F.gov.\"\n\n### Adding a new site\n\nSee the [18F Guides Template](https://pages.18f.gov/guides-template/) for\nstep-by-step instructions on how to develop a site for 18F Pages and configure\nits GitHub repository for publishing.\n\nAlternatively, if you're an 18F team member who's already comfortable with\nJekyll and GitHub, the short version is:\n\n- Create the `18f-pages` publishing branch. If you already have a `gh-pages`\n  branch, you can do this on the command line via:\n```sh\n$ git checkout -b 18f-pages gh-pages\n$ git push origin 18f-pages\n```\n  or by clicking on the **Branch:** button on your repository's GitHub page,\n  selecting `gh-pages`, clicking the button again, and entering `18f-pages` in\n  the _Find or create a branch..._ box.\n- If your repo is primarily an 18F Pages site (as opposed to a project site\n  with an `18f-pages` branch for documentation), you may optionally set the\n  default branch on GitHub to `18f-pages`.\n- [Make sure all internal links are prefixed with `{{ site.baseurl\n  }}`](https://github.com/18F/pages-server/blob/master/README.md#prefixing-jekyll-links-with--sitebaseurl-).\n  This is essential for proper publishing to `https://pages.18f.gov/REPO-NAME`,\n  though your local site will continue to serve correctly from\n  http://localhost:4000/.\n- Push a change to the `18f-pages` branch to publish your site. The site will\n  not appear when the branch is created, only after it is updated.\n\nFor further information, read\n[the \"Publishing\" section of the 18F/guides-server\nREADME](https://github.com/18F/pages-server/blob/master/README.md#publishing)\nfor a thorough explanation of the entire publishing mechanism.\n\n### Staging area\n\nAny changes pushed to a `18f-pages-staging` branch will appear on\n`https://pages-staging.18f.gov`, which requires authenticated access.\n\n## Administering `https://pages.18f.gov/` and `https://pages-staging.18f.gov/`\n\n### 18F GitHub organization webhook\n\nThere is a webhook configured for the 18F GitHub organization that will send\npush notifications from every 18F GitHub repository to\n`https://pages.18f.gov/deploy`. This enables every update to an `18f-pages` or\n`18f-pages-staging` branch in every 18F GitHub repository to automatically\npublish to `https://pages.18f.gov/` or `https://pages-staging.18f.gov/`,\nrespectively.\n\nIndividual 18F repositories _do not_ need to set up their own publishing\nwebhooks, and any existing publishing webhooks should be removed.\n\n### Getting access to `pages.18f.gov`\n\n**Note:** `pages.18f.gov` and `pages-staging.18f.gov` are the same machine.\nBoth sites are served using the same `18f-pages-server` instance.\n\n- Get SSH access to `pages.18f.gov` via #devops.\n- For convenience, add the following stanza to `$HOME/.ssh/config`, replacing\n  `$HOME` with the full path to your home directory:\n```\nHost 18f-pages\n   Hostname pages.18f.gov\n   User ubuntu\n   IdentityFile $HOME/.ssh/id_rsa\n   IdentitiesOnly yes\n```\n\nIn the sections that follow, each set of command line instructions presumes\nthat you have logged into `pages.18f.gov`. Alternatively, you may execute each\ncommand from your local machine by adding `ssh 18f-pages` as a prefix.\n\n### Cloning the 18F/pages repository and installing the server\n\nShould `18f-pages-server` ever need to be re-installed, or installed on a new\ninstance, log into the host via `ssh 18f-pages` and follow the\n[`18f-pages-server` installation instructions](https://github.com/18F/pages-server/blob/master/README.md#installation).\n\nOnce the server is installed, clone the 18F/pages repository and run the server using [Forever](https://www.npmjs.com/package/forever):\n\n```sh\n$ git clone git@github.com:18F/pages.git /home/ubuntu/pages\n$ forever start -l /var/log/18f-pages-server/pages.log -a /usr/local/bin/18f-pages /home/ubuntu/pages/pages-config.json\n```\n\n### Upgrading the server\n\nRun the following command to upgrade `18f-pages-server` npm, and then follow\nthe [instructions to restart the server](#restart):\n\n```sh\n$ sudo npm upgrade -g 18f-pages-server\n```\n\nYou should see output similar to the following upon success:\n\n```sh\n/usr/local/bin/18f-pages -\u003e /usr/local/lib/node_modules/18f-pages-server/bin/18f-pages\n18f-pages-server@0.0.3 /usr/local/lib/node_modules/18f-pages-server\n├── file-locked-operation@0.0.1 (lockfile@1.0.1)\n└── hookshot@0.1.0 (commander@2.3.0, lockfile@1.0.1, body-parser@1.8.4,\nexpress@4.9.8)\n```\n\n### Updating the configuration\n\nThe [`pages-config.json` configuration file from this\nrepository](./pages-config.json) is the configuration for the\n`18f-pages-server`. The schema is fully-documented in [the \"Generate and\nconfigure `pages-config.json` section of the `18f-pages-server`\nREADME](https://github.com/18F/pages-server/blob/master/README.md#pages-config).\n\nAfter changes to this file have been pushed or merged into the `18f-pages`\nbranch on GitHub, run the following to pull the configuration updates onto\n`pages.18f.gov` then follow the [instructions to restart the server](#restart):\n\n```sh\n$ cd /home/ubuntu/pages \u0026\u0026 git pull\n```\n\n_Note: When running from your local machine using the `ssh 18f-pages`\nprefix, this command must be surrounded by quotation marks._\n\n### \u003ca name=\"restart\"\u003e\u003c/a\u003eRestarting the server\n\nTo restart the server:\n\n```sh\n$ forever restart /usr/local/bin/18f-pages\n```\n\nTo validate that the update succeeded, print the last lines of the log file,\nwhich should look similar to the following:\n\n```sh\n$ tail -n 2 /var/log/18f-pages-server/pages.log\n18f-pages-server v0.0.3\n18F pages: listening on port 5000\n```\n\n### Setting up the `https://pages.18f.gov/` home page\n\n`pages-generated/index.html` is a symlink to\n`pages-generated/pages/index.html`, as explained in the\n[\"Create a symlink to the `index.html` of the generated homepage\" section of\nthe 18F/pages-server\nREADME](https://github.com/18F/pages-server/blob/master/README.md#homepage-symlink).\n\n### System configuration files\n\nUpdating these files in the repository _does not_ update them on the server.\nCurrently, server configurations should be updated directly, verified, then\nupdated within the repository to maintain parity.\n\n#### logrotate.d\n\nThe `/etc/logrotate.d/18f-pages-server` file controls the log rotation\nmechanism, `logrotate(8)`. This file is checked into this repository as\n[`_deploy/etc/logrotate.d/18f-pages-server`](./_deploy/etc/logrotate.d/18f-pages-server).\n\n#### Nginx\n\nThe [Nginx](http://nginx.org/) configuration for both `https://pages.18f.gov/`\nand `https://pages-staging.18f.gov` is in the `/etc/nginx/vhosts/pages.conf`\nfile, checked into this repository as\n[`_deploy/etc/nginx/vhosts/pages.conf`](./_deploy/etc/nginx/vhosts/pages.conf).\n\nThis file is imported into `/etc/nginx/nginx.conf` and includes other files\ncontaining configuration directives for SSL, New Relic, and authentication.\nThe paths to these other files are relative to `/etc/nginx`. These other files\ncan be seen in the [`18F/hub nginx configuration\ndirectory`](https://github.com/18F/hub/tree/master/deploy/etc/nginx), as they\nare served from the same Nginx instance as `hub.18f.gov`.\n\n## Contributing\n\n1. Fork the repo (or just clone it if you're an 18F team member)\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\nFeel free to [file an issue](https://github.com/18F/pages/issues) or to ping\n[@mbland](https://github.com/mbland) with any questions you may have,\nespecially if the current documentation should've addressed your needs, but\ndidn't.\n\n## Public domain\n\nThis project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):\n\n\u003e This project is in the public domain within the United States, and copyright\n\u003e and related rights in the work worldwide are waived through the [CC0 1.0\n\u003e Universal public domain\n\u003e dedication](https://creativecommons.org/publicdomain/zero/1.0/).\n\u003e\n\u003e All contributions to this project will be released under the CC0 dedication.\n\u003e By submitting a pull request, you are agreeing to comply with this waiver of\n\u003e copyright interest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18F%2Fpages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F18F%2Fpages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F18F%2Fpages/lists"}