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

Adapter-static documentation: Github pages #2135

Merged
merged 5 commits into from
Aug 17, 2021

Conversation

ecstrema
Copy link
Contributor

@ecstrema ecstrema commented Aug 8, 2021

Add documentation for publishing to Github pages with adapter-static.
Would an adapter-gh-pages be possible?

@changeset-bot
Copy link

changeset-bot bot commented Aug 8, 2021

⚠️ No Changeset found

Latest commit: fdd5043

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@benmccann benmccann added the documentation Improvements or additions to documentation label Aug 8, 2021
@ecstrema
Copy link
Contributor Author

ecstrema commented Aug 9, 2021

Example added

...
// Since your Github Pages' default url will be https://your-username.github.io/your-repo-name,
// you'll have the change the basepaths.
// Note that you may have to comment these in dev mode.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like quite the caveat. I don't know if we'd want to promote this solution without making it a bit nicer to use first

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

paths are currently broken in dev mode. i'll try to review #2145 and then we can see if that changes the situation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other option is to detect the dev environment:

const isProduction = process.env.NODE_ENV === 'production';

...
    paths: {
        base: isProduction ? "project_name" : "",
    }
...

@benmccann benmccann linked an issue Aug 9, 2021 that may be closed by this pull request
packages/adapter-static/README.md Outdated Show resolved Hide resolved
packages/adapter-static/README.md Outdated Show resolved Hide resolved
packages/adapter-static/README.md Outdated Show resolved Hide resolved
packages/adapter-static/README.md Outdated Show resolved Hide resolved
packages/adapter-static/README.md Outdated Show resolved Hide resolved
packages/adapter-static/README.md Outdated Show resolved Hide resolved
ecstrema and others added 2 commits August 13, 2021 04:59
documentation concerning GitHub Pages.
@Rich-Harris
Copy link
Member

I tweaked the language to remove that caveat — we can merge this once #2189 is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Default appDir "_app" incompatible with some file managers
4 participants