{"id":20722492,"url":"https://github.com/toomanybees/river-site","last_synced_at":"2025-03-11T08:20:52.665Z","repository":{"id":74388706,"uuid":"165176712","full_name":"TooManyBees/river-site","owner":"TooManyBees","description":null,"archived":false,"fork":false,"pushed_at":"2019-02-03T07:02:25.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T23:15:31.261Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/TooManyBees.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":"2019-01-11T04:01:38.000Z","updated_at":"2019-02-03T07:02:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"5af9d1d8-aa44-4da3-a548-c446275aa8a0","html_url":"https://github.com/TooManyBees/river-site","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/TooManyBees%2Friver-site","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TooManyBees%2Friver-site/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TooManyBees%2Friver-site/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TooManyBees%2Friver-site/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TooManyBees","download_url":"https://codeload.github.com/TooManyBees/river-site/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242996883,"owners_count":20219036,"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":[],"created_at":"2024-11-17T03:36:04.231Z","updated_at":"2025-03-11T08:20:52.639Z","avatar_url":"https://github.com/TooManyBees.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netlify + Dropbox client site\n\nBased almost completely on jimniels's [netlibox](https://github.com/jimniels/netlibox/) template, with modifications:\n\n* lambda function verifies the Dropbox signature before triggering build (were we... were we just gonna go on honor system here???)\n* no NPM or Babel needed\n    * the lambda function, is valid Node 8 LTS\n    * fetching dropbox content is done in ruby, since we're using it for Jekyll anyway\n    * thank heavens\n* downloaded pages will clobber duplicate files that already exist in the repo, even if they have different extensions like `.md` and `.markdown`. (The list of extensions is defined in `dropbox.rb`'s `POST_EXTNAMES` constant.)\n\n# Setup\n\nFirstly, there is nothing special happening in `./app`. It contains a Jekyll new site boilerplate, with the exception of `_config.yml`, `Gemfile`, and `Gemfile.lock` that remain in the top level directory.\n\nThe only change of consequence in `_config.yml` is the line\n```yaml\nsource: \"./app\"\n```\n\nIn Dropbox:\n\n1. https://www.dropbox.com/developers/apps → **Create App**\n2. Pick Dropbox API, limit to App Folder\n3. **App secret** → **Show**, save for later as `DROPBOX_APP_SECRET`\n4. **OAuth2** → **Allow Implicit Grants** → **Disallow**\n5. **OAuth2** → **Generate access token**, save for later as `DROPBOX_ACCESS_TOKEN`\n\nIn source code:\n\n1. Consider renaming `functions/dropbox-webhook.js` because Netlify will mount it at a predictable path based on its file name, and that would allow someone to maliciously use up your monthly Function quota.\n\nIn Netlify:\n\n1. Create a Git-based app (otherwise it will not support build hooks)\n2. Go to (on top nav) **Settings** → **Build \u0026 Deploy** → **Continuous Deployment**\n3. **Build hooks** → **Add Build Hook**, name it anything (`dropbox-webhook` is good), save generated url for later as `NETLIFY_BUILD_HOOK_URL`\n4. In **Build environment variables** → **Edit variables**, create these variables with the values saved from earlier\n    1. `DROPBOX_APP_SECRET`\n    2. `DROPBOX_ACCESS_TOKEN`\n    3. `NETLIFY_BUILD_HOOK_URL`\n5. Go to (on top nav) **Functions**. It may take a while to populate the list of functions after initial deploy.\n6. Go to function `dropbox-webhook.js` (unless you renamed it), copy the **Endpoint** url, save for later\n\nBack in Dropbox app settings:\n\n1. **Webhooks** → **Add**, with the function url you just saved. Its status should quickly change to *Enabled*. If not, look in the Netlify function log (on the page that lists its URL) and check if the function is being invoked at all. It should look like:\n    ```\n    8:07:43 AM: dropbox-webhook invoked\n    8:07:43 AM: Echoing challenge 2_mLAgJwloCKup6nTktFXFA131c2ycyJmjtzd_Rc9HY\n    ```\n\n# Usage\n\nIn Dropbox, upload files to the app folder using the same directory structure that Jekyll expects (remembering to put posts in a `_posts` folder). You can overwrite `index.md`, `about.md`, `404.html`, or any other page in the repo, even if the extensions differ.\n\nThe app will rebuild on changes to the Dropbox app folder or the source repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoomanybees%2Friver-site","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoomanybees%2Friver-site","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoomanybees%2Friver-site/lists"}