You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _posts/2019-08-09-getting-started.md
+11-35Lines changed: 11 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,17 @@ Follow the instructions in the [Jekyll Docs](https://jekyllrb.com/docs/installat
18
18
There are two ways to create a new repository for this theme:
19
19
20
20
-[**Using the Chirpy Starter**](#option-1-using-the-chirpy-starter) - Easy to upgrade, isolates irrelevant project files so you can focus on writing.
21
-
-[**Forking on GitHub**](#option-2-forking-on-github) - Convenient for custom development, but difficult to upgrade. Unless you are familiar with Jekyll and are determined to tweak or contribute to this project, this approach is not recommended.
21
+
-[**GitHub Fork**](#option-2-github-fork) - Convenient for custom development, but difficult to upgrade. Unless you are familiar with Jekyll and are determined to tweak or contribute to this project, this approach is not recommended.
22
22
23
23
#### Option 1. Using the Chirpy Starter
24
24
25
-
Sign in to GitHub and browse to [**Chirpy Starter**](https://github.com/cotes2020/chirpy-starter/), click the button <kbd>Use this template</kbd> > <kbd>Create a new repository</kbd>, and name the new repository `USERNAME.github.io`, where `USERNAME` represents your GitHub username.
25
+
Sign in to GitHub and browse to [**Chirpy Starter**][starter], click the button <kbd>Use this template</kbd> > <kbd>Create a new repository</kbd>, and name the new repository `USERNAME.github.io`, where `USERNAME` represents your GitHub username.
26
26
27
-
#### Option 2. Forking on GitHub
27
+
#### Option 2. GitHub Fork
28
28
29
-
[Fork**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork) on GitHub and rename it to `USERNAME.github.io`. Note that the default branch code is under development. To ensure the stability of your site, please switch to the [latest tag][latest-tag] and start writing.
29
+
Sign in to GitHub to [fork**Chirpy**](https://github.com/cotes2020/jekyll-theme-chirpy/fork), and then rename it to `USERNAME.github.io` (`USERNAME` means your username).
30
30
31
-
And then execute:
31
+
Next, clone your site to local machine. In order to build JavaScript files later, we need to install [Node.js][nodejs], and then run the tool:
32
32
33
33
```console
34
34
$ bash tools/init
@@ -39,15 +39,14 @@ $ bash tools/init
39
39
40
40
The above command will:
41
41
42
-
1. Remove the files in `_posts`{: .filepath} from your repository.
43
-
44
-
2. If the option `--no-gh` is provided, the directory `.github`{: .filepath} will be deleted. Otherwise, set up the GitHub Action workflow by removing the extension `.hook`{: .filepath} of `.github/workflows/pages-deploy.yml.hook`{: .filepath}, and then remove the other files and directories in the folder `.github`{: .filepath}.
45
-
46
-
3. Create a new commit to save the changes automatically.
42
+
1. Check out the code to the [latest tag][latest-tag] (to ensure the stability of your site: as the code for the default branch is under development).
43
+
2. Remove non-essential sample files and take care of GitHub-related files.
44
+
3. Build JavaScript files and export to `assets/js/dist/`{: .filepath }, then make them tracked by Git.
45
+
4. Automatically create a new commit to save the changes above.
47
46
48
47
### Installing Dependencies
49
48
50
-
Before running for the first time, go to the root directory of your site, and install dependencies as follows:
49
+
Before running local server for the first time, go to the root directory of your site and run:
51
50
52
51
```console
53
52
$ bundle
@@ -142,30 +141,7 @@ $ docker run -it --rm \
142
141
143
142
Unless you specified the output path, the generated site files will be placed in folder `_site`{: .filepath} of the project's root directory. Now you should upload those files to the target server.
144
143
145
-
## Upgrading
146
-
147
-
It depends on how you use the theme:
148
-
149
-
- If you are using the theme gem (there will be `gem "jekyll-theme-chirpy"` in the `Gemfile`{: .filepath}), editing the `Gemfile`{: .filepath} and update the version number of the theme gem, for example:
150
-
151
-
```diff
152
-
- gem "jekyll-theme-chirpy", "~> 3.2", ">= 3.2.1"
153
-
+ gem "jekyll-theme-chirpy", "~> 4.3", ">= 4.3.2"
154
-
```
155
-
{: .nolineno file="Gemfile" }
156
-
157
-
And then execute the following command:
158
-
159
-
```console
160
-
$ bundle update jekyll-theme-chirpy
161
-
```
162
-
163
-
As the version upgrades, the critical files (for details, see the [Startup Template][starter]) and configuration options will change. Please refer to the [Upgrade Guide](https://github.com/cotes2020/jekyll-theme-chirpy/wiki/Upgrade-Guide) to keep your repo's files in sync with the latest version of the theme.
164
-
165
-
- If you forked from the source project (there will be `gemspec` in the `Gemfile`{: .filepath} of your site), then merge the [latest upstream tags][latest-tag] into your Jekyll site to complete the upgrade.
166
-
The merge is likely to conflict with your local modifications. Please be patient and careful to resolve these conflicts.
0 commit comments