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

Add support for optional local backend #474

Merged
merged 2 commits into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ yarn start
```

Visit http://localhost:4000/design-system/ to view the site.
Editing a page locally will open a real PR against this GitHub repository.
Editing a page locally will change your local files, using
[an experimental Netlify CMS feature](https://www.netlifycms.org/docs/beta-features/#working-with-a-local-git-repository).


## Contributing
Expand Down
4 changes: 4 additions & 0 deletions docs/admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ backend:
update: Update "{{slug}}" page
delete: Delete "{{slug}}" page

# When running locally, try to use a local proxy server instead of GitHub, if
# one is running (yarn start-netlify, which uses netlify-cms-proxy-server).
local_backend: true

logo_url: https://cfpb.github.io/design-system/assets/img/cfpb-netlify-logo.png
publish_mode: editorial_workflow
media_folder: docs/images/uploads
Expand Down
4 changes: 3 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"homepage": "https://cfpb.github.io/design-system/",
"license": "MIT",
"scripts": {
"start": "concurrently --kill-others \"bundle exec jekyll serve --watch --host=localhost\" \"yarn run watch\" \"yarn run watch-css\"",
"start": "concurrently --kill-others \"yarn start-netlify\" \"bundle exec jekyll serve --watch --host=localhost\" \"yarn run watch\" \"yarn run watch-css\"",
"start-netlify": "cd ../ && netlify-cms-proxy-server",
"compile-js": "NODE_ENV=production webpack",
"compile-css": "lessc --include-path=../packages/:../node_modules/normalize-css/normalize-css/ assets/css/main.less dist/css/main.css",
"copy-icons": "cp -r ../packages/cfpb-icons/src/icons assets/",
Expand All @@ -26,6 +27,7 @@
"concurrently": "5.2.0",
"html-loader": "1.1.0",
"less-watch-compiler": "^1.14.1",
"netlify-cms-proxy-server": "^1.2.6",
"webpack": "4.43.0",
"webpack-cli": "3.3.11"
},
Expand Down
Loading