Skip to content

Commit

Permalink
Merge pull request #64 from rudyrigot/patch-1
Browse files Browse the repository at this point in the history
Clarifying doc for the pathprefix option
  • Loading branch information
nhoizey committed Jan 12, 2023
2 parents 7dfcdbf + 41aa5ca commit d03e289
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Take ownership of your Twitter data. First talked about at [Jamstack Conf 2019](
### Build the web site

1. Edit the `_data/metadata.js` file to add metadata information.
1. _Optional:_ If you want the web site to live in a subdirectory (e.g. `/twitter/`), use [Eleventy’s Path Prefix feature](https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix) via the command line `--pathprefix=twitter` or via a return object in your configuration file.
1. Run `npm run build` or `npm start`
1. Run `npm run build` (will just create the proper files) or `npm start` (will run a server to look at them in your browser).
* _Optional:_ If you want the web site to live in a subdirectory (e.g. `/twitter/`), use [Eleventy’s Path Prefix feature](https://www.11ty.dev/docs/config/#deploy-to-a-subdirectory-with-a-path-prefix) via the command line `--pathprefix=twitter` or via a return object in your configuration file. Careful: this is an option to Eleventy and not npm, so it needs to live after a `--` separator (for instance, `npm run build -- --pathprefix=twitter`).

⚠️ _Warning_: the first build may take quite a long time (depending on the size of your archive), as remote media is fetched/downloaded into your project locally. Repeat builds will be much faster.

Expand Down
4 changes: 2 additions & 2 deletions docs/deploy-with-github-pages.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Use the following steps to deploy the generated archive to [GitHub pages](https:
0. After creation, navigate to the Settings tab of your new GitHub repository
0. Navigate to the "Pages" page
0. Enable GitHub pages by selecting your `main` branch
0. Follow the [instructions to Build the web site](https://github.com/tweetback/tweetback#build-the-web-site)
0. Follow the [instructions to Build the web site](https://github.com/tweetback/tweetback#build-the-web-site). Note: unless you use a custom domain, you will need to pass your repo's name as your `--pathprefix` option.
0. Using a terminal, navigate into the `_site` folder
0. Run `git init`
0. Add the new repository as the origin: `git remote add origin git@github.com:USERNAME/REPO.git`
0. Add and commit all generates files in that folder to the new git repository with `git commit -am "Add Twitter archive"`
0. Push your commit: `git branch -M main` and `git push -u origin main`
0. Your web site will now be serving at the URL `https://USERNAME.github.io/REPO/`
0. Optionally, [use a custom domain](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site)
0. Optionally, [use a custom domain](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site)

0 comments on commit d03e289

Please sign in to comment.