Skip to content

Subdomain setup #597

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

Merged
merged 5 commits into from
Mar 28, 2019
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
51 changes: 0 additions & 51 deletions .env.sample

This file was deleted.

12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Questions

This is the issue tracker for [Ember.js API](https://emberjs.com/api/).
This is the issue tracker for [Ember.js API](https://api.emberjs.com/).

# Issue Labeling

Expand All @@ -15,8 +15,8 @@ Think you've found a bug or have a new feature to suggest? Let us know!
1. Search for similar issues. It's possible somebody has encountered
this bug already.

2. Please make sure you provide very specific steps to reproduce the error.
If we cannot reproduce it, we will close the ticket. Screenshots or [recorded gifs](https://www.cockos.com/licecap/) of
2. Please make sure you provide very specific steps to reproduce the error.
If we cannot reproduce it, we will close the ticket. Screenshots or [recorded gifs](https://www.cockos.com/licecap/) of
the issue that you are experiencing will help towards reproducing and solving issues sooner.

4. Your issue will be verified. The provided example will be tested for
Expand Down Expand Up @@ -109,11 +109,11 @@ to know that you have a clean slate: `yarn install && bower install && yarn test

3. Add a test for your change. Only refactoring and documentation changes
require no new tests. If you are adding functionality or fixing a bug, we need
a test!
a test!

4. Make the test pass.

5. Commit your changes. If your pull request fixes an issue specify it in the commit message.
5. Commit your changes. If your pull request fixes an issue specify it in the commit message.

6. Push to your fork and submit a pull request. Please provide us with some
explanation of why you made the changes you made. For new features make sure to
Expand All @@ -123,7 +123,7 @@ We try to be quick about responding to tickets but sometimes we get a bit
backlogged. If the response is slow, try to find someone on slack (#team-learning) to
give the ticket a review.

Including tests that fail without your code, and making it pass will increase the chance
Including tests that fail without your code, and making it pass will increase the chance
that your pull request is accepted.

And in case we didn't emphasize it enough: we love tests!
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# [Ember API Docs](https://emberjs.com/api/) [![Build Status](https://travis-ci.org/ember-learn/ember-api-docs.svg?branch=master)](https://travis-ci.org/ember-learn/ember-api-docs)
# [Ember API Docs](https://api.emberjs.com/) [![Build Status](https://travis-ci.org/ember-learn/ember-api-docs.svg?branch=master)](https://travis-ci.org/ember-learn/ember-api-docs)

This project contains only the [API docs](https://emberjs.com/api) portion of [Emberjs.com](https://emberjs.com/). If you're looking for the rest of the site,
This project contains only the [API docs](https://api.emberjs.com/) portion of [Emberjs.com](https://emberjs.com/). If you're looking for the rest of the site,
see the [website](https://github.com/emberjs/website)
and [guides](https://github.com/emberjs/guides) repositories.

There are many pieces that together create the Ember API docs site:
- The app in this repository, which fetches and displays the API docs data. It is what you see at
[https://emberjs.com/api](https://emberjs.com/api)
- The YUIdoc code comments found in the
- The app in this repository, which fetches and displays the API docs data. It is what you see at
[https://api.emberjs.com/](https://api.emberjs.com/)
- The YUIdoc code comments found in the
[Ember.js codebase](https://github.com/emberjs/ember.js), where the informational content of the API documentation can be edited
- The data generator that serializes code comments into JSONAPI and
deploys the result,
Expand All @@ -18,10 +18,10 @@ a component and styling library shared across apps.

## Contributing

New contributors are welcome! This project is is maintained by an all-volunteer team,
New contributors are welcome! This project is is maintained by an all-volunteer team,
and we are thankful for your help.

The best way to get started is to find issue labeled "good first issue" or "help wanted." If you have questions or want a buddy to pair with, drop by the #-team-learning channel on the
The best way to get started is to find issue labeled "good first issue" or "help wanted." If you have questions or want a buddy to pair with, drop by the #-team-learning channel on the
[Ember Community Slack](https://ember-community-slackin.herokuapp.com/).
Like most open source projects, contributors are encouraged to open an issue
to propose changes and iterate on ideas before investing time in coding.
Expand All @@ -33,7 +33,7 @@ Please also see [CONTRIBUTING.md](CONTRIBUTING.md).
## Quickstart to run semi-locally

Follow these instructions to run the app using publically available online data.
You do not need to run [ember-jsonapi-docs](https://github.com/ember-learn/ember-jsonapi-docs)
You do not need to run [ember-jsonapi-docs](https://github.com/ember-learn/ember-jsonapi-docs)
locally yourself.

```
Expand Down
7 changes: 0 additions & 7 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@
"scripts": {
},
"env": {
"DOCS_SLUG": {
"required": false,
"value": "/api/"
},
"FASTLY_API_KEY": {
"required": false
},
"FASTLY_CDN_URL": {
"required": false
},
"FASTLY_SERVICE_ID": {
"required": false
},
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const links = [{
name: 'Ember.js Guides',
type: 'link'
}, {
href: 'https://emberjs.com/api',
href: 'https://api.emberjs.com',
name: 'API Reference',
type: 'link'
}, {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/project-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default Route.extend({
this.set('headData.urlVersion', projectVersion);
if (!this.get('headData.isRelease')) {
let request = this.get('fastboot.request');
let href = this.get('fastboot.isFastBoot') ? `${request.protocol}//emberjs.com/api${request.path}` : window.location.href;
let href = this.get('fastboot.isFastBoot') ? `https://api.emberjs.com/${request.path}` : window.location.href;
let version = new RegExp(model.get('compactVersion'), 'g')
let canonicalUrl = href.replace(version, 'release');
this.set('headData.canonicalUrl', canonicalUrl);
Expand Down
2 changes: 1 addition & 1 deletion app/services/legacy-module-mappings.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default Service.extend({
},

fetch() {
return fetch(`${config.APP.cdnUrl}/assets/mappings.json`);
return fetch('/assets/mappings.json');
},

getModule(name, documentedModule) {
Expand Down
2 changes: 1 addition & 1 deletion bin/ember-fastboot
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ app.use(function(req, res, next) {
originalLocation = `http:${originalLocation}`;
}

let relativeURL = '/api/ember/2.14/namespaces/Ember';
let relativeURL = '/ember/2.14/namespaces/Ember';

try {
relativeURL = new URL(originalLocation).pathname;
Expand Down
12 changes: 1 addition & 11 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module.exports = function(environment) {
// Here you can pass flags/options to your application instance
// when it is created
scrollContainerSelector: 'body, html',
cdnUrl: process.env.FASTLY_CDN_URL ? `https://${process.env.FASTLY_CDN_URL}` : 'https://ember-api-docs-frontend.global.ssl.fastly.net'
},

fastboot: {
Expand Down Expand Up @@ -96,16 +95,7 @@ module.exports = function(environment) {
"style-src": "'self' 'unsafe-inline' https://fonts.googleapis.com *.fastly.net"
};

if (environment === 'production') {

/**
* Ideally we want this to be only for fast boot. But we have to wait for
* https://github.com/ember-fastboot/ember-cli-fastboot/issues/254 to be
* solved for that
*/
ENV.routerRootURL = process.env.DOCS_SLUG ? process.env.DOCS_SLUG : '/api/';

}
// if (environment === 'production') {}

return ENV;
};
7 changes: 0 additions & 7 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ const Funnel = require('broccoli-funnel');
const mergeTrees = require('broccoli-merge-trees');

module.exports = function(defaults) {
let prepend = '';
if ('FASTLY_CDN_URL' in process.env) {
prepend = `https://${process.env.FASTLY_CDN_URL}/`;
}

let app = new EmberApp(defaults, {
fingerprint: {
extensions: ['js', 'css', 'jpg', 'png', 'gif', 'map', 'svg', 'webmanifest'],
prepend,
generateAssetMap: true
},
sassOptions: {
Expand All @@ -31,7 +25,6 @@ module.exports = function(defaults) {
},
'asset-cache': {
version: '4', //Might have to change this with the app build,
prepend
},
svgJar: {
sourceDirs: ['public/assets/images']
Expand Down