Skip to content

Commit 1631977

Browse files
george-gcachertianser
authored andcommitted
Moved information about creating your repo to front (alshedivat#1298)
Moved information about using this template to the beginning of the installation part, added a few more documentation links in it, fixed some typos. --------- Signed-off-by: George Araújo <[email protected]>
1 parent 1cd69c0 commit 1631977

File tree

1 file changed

+52
-38
lines changed

1 file changed

+52
-38
lines changed

README.md

+52-38
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ If you like the theme, give it a star!
2121

2222
[![Preview](https://raw.githubusercontent.com/alshedivat/al-folio/master/assets/img/al-folio-preview.png)](https://alshedivat.github.io/al-folio/)
2323

24-
2524
## User community
2625

2726
The vibrant community of **al-folio** users is growing!
@@ -133,12 +132,10 @@ Images2Symbols (CogSci: <a href="https://images2symbols.github.io/" target="_bla
133132
</tr>
134133
</table>
135134

136-
137135
## Lighthouse PageSpeed Insights
138136

139137
[![Google PageSpeeg](https://raw.githubusercontent.com/alshedivat/al-folio/master/assets/img/pagespeed.svg)](https://pagespeed.web.dev/report?url=https%3A%2F%2Falshedivat.github.io%2Fal-folio%2F&form_factor=desktop)
140138

141-
142139
## Table Of Contents
143140

144141
* [User community](#user-community)
@@ -172,26 +169,28 @@ Images2Symbols (CogSci: <a href="https://images2symbols.github.io/" target="_bla
172169
Want to learn more about Jekyll? Check out [this tutorial](https://www.taniarascia.com/make-a-static-website-with-jekyll/).
173170
Why Jekyll? Read [Andrej Karpathy's blog post](https://karpathy.github.io/2014/07/01/switching-to-jekyll/)!
174171

175-
176172
### Installation
177173

178174
For a hands-on walkthrough of al-folio installation, check out [this cool video tutorial](https://www.youtube.com/watch?v=g6AJ9qPPoyc) by one of the community members! 🎬 🍿
179175

176+
The preferred way of using this template is by clicking in [Use this template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template#creating-a-repository-from-a-template) above the file list.
177+
Then, create a new repository at `github.com:<your-username>/<your-repo-name>`. If you plan to upload your site to `<your-github-username>.github.io`,
178+
note that the name of your repository must be `<your-github-username>.github.io` or `<your-github-orgname>.github.io`, as stated in the [GitHub pages docs](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites).
179+
For more information on how to deploy your site, check the [Deployment](#deployment) section below. After you created your new repository, just download it to your machine:
180+
181+
```bash
182+
$ git clone [email protected]:<your-username>/<your-repo-name>.git
183+
$ cd <your-repo-name>
184+
```
185+
180186
---
181187

182188
#### Local setup using Docker (Recommended on Windows)
183189

184190
You need to take the following steps to get `al-folio` up and running in your local machine:
185191

186192
- First, install [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/).
187-
- Then, clone this repository to your machine:
188-
189-
```bash
190-
$ git clone [email protected]:<your-username>/<your-repo-name>.git
191-
$ cd <your-repo-name>
192-
```
193-
194-
Finally, run the following command that will pull a pre-built image from DockerHub and will run your website.
193+
- Finally, run the following command that will pull a pre-built image from DockerHub and will run your website.
195194

196195
```bash
197196
$ docker-compose up
@@ -208,9 +207,11 @@ Now, feel free to customize the theme however you like (don't forget to change t
208207
> Note: this approach is only necessary if you would like to build an older or very custom version of al-folio.
209208
210209
Build and run a new docker image using:
210+
211211
```bash
212212
$ docker-compose -f docker-local.yml up
213213
```
214+
214215
> If you want to update jekyll, install new ruby packages, etc., all you have to do is build the image again using `--force-recreate` argument at the end of previous command! It will download ruby and jekyll and install all ruby packages again from scratch.
215216
216217
</details>
@@ -219,11 +220,9 @@ $ docker-compose -f docker-local.yml up
219220

220221
#### Local Setup (Standard)
221222

222-
Assuming you have [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](https://bundler.io/) installed on your system (*hint: for ease of managing ruby gems, consider using [rbenv](https://github.com/rbenv/rbenv)*), first click [Use this template](https://docs.github.com/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template) above the file list, create a new repository at `github.com:<your-username>/<your-repo-name>` from `github.com:alshedivat/al-folio` and do the following:
223+
Assuming you have [Ruby](https://www.ruby-lang.org/en/downloads/) and [Bundler](https://bundler.io/) installed on your system (*hint: for ease of managing ruby gems, consider using [rbenv](https://github.com/rbenv/rbenv)*).
223224

224225
```bash
225-
$ git clone [email protected]:<your-username>/<your-repo-name>.git
226-
$ cd <your-repo-name>
227226
$ bundle install
228227
$ bundle exec jekyll serve --lsi
229228
```
@@ -239,19 +238,22 @@ Deploying your website to [GitHub Pages](https://pages.github.com/) is the most
239238
Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0.3.5), **al-folio** will automatically re-deploy your webpage each time you push new changes to your repository! :sparkles:
240239

241240
**For personal and organization webpages:**
242-
1. Rename your repository to `<your-github-username>.github.io` or `<your-github-orgname>.github.io`.
241+
242+
1. The name of your repository **MUST BE** `<your-github-username>.github.io` or `<your-github-orgname>.github.io`.
243243
2. In `_config.yml`, set `url` to `https://<your-github-username>.github.io` and leave `baseurl` empty.
244244
3. Set up automatic deployment of your webpage (see instructions below).
245245
4. Make changes, commit, and push!
246246
5. After deployment, the webpage will become available at `<your-github-username>.github.io`.
247247

248248
**For project pages:**
249+
249250
1. In `_config.yml`, set `url` to `https://<your-github-username>.github.io` and `baseurl` to `/<your-repository-name>/`.
250251
2. Set up automatic deployment of your webpage (see instructions below).
251252
3. Make changes, commit, and push!
252253
4. After deployment, the webpage will become available at `<your-github-username>.github.io/<your-repository-name>/`.
253254

254255
**To enable automatic deployment:**
256+
255257
1. Click on **Actions** tab and **Enable GitHub Actions**; do not worry about creating any workflows as everything has already been set for you.
256258
2. Go to Settings -> Actions -> General -> Workflow permissions, and give **Read and write permissions** to GitHub Actions
257259
3. Make any other changes to your webpage, commit, and push. This will automatically trigger the **Deploy** action.
@@ -268,26 +270,29 @@ If you need to manually re-deploy your website to GitHub pages, go to Actions, c
268270
<details><summary>(click to expand) <strong>Deployment to another hosting server (non GitHub Pages):</strong></summary>
269271

270272
If you decide to not use GitHub Pages and host your page elsewhere, simply run:
273+
271274
```bash
272275
$ bundle exec jekyll build --lsi
273276
```
277+
274278
which will (re-)generate the static webpage in the `_site/` folder.
275-
Then simply copy the contents of the `_site/` foder to your hosting server.
279+
Then simply copy the contents of the `_site/` directory to your hosting server.
276280

277-
**Note:** Make sure to correctly set the `url` and `baseurl` fields in `_config.yml` before building the webpage. If you are deploying your webpage to `your-domain.com/your-project/`, you must set `url: your-domain.com` and `baseurl: /your-project/`. If you are deploing directly to `your-domain.com`, leave `baseurl` blank.
281+
**Note:** Make sure to correctly set the `url` and `baseurl` fields in `_config.yml` before building the webpage. If you are deploying your webpage to `your-domain.com/your-project/`, you must set `url: your-domain.com` and `baseurl: /your-project/`. If you are deploying directly to `your-domain.com`, leave `baseurl` blank.
278282

279283
</details>
280284

281285
<details><summary>(click to expand) <strong>Deployment to a separate repository (advanced users only):</strong></summary>
282286

283287
**Note:** Do not try using this method unless you know what you are doing (make sure you are familiar with [publishing sources](https://help.github.com/en/github/working-with-github-pages/about-github-pages#publishing-sources-for-github-pages-sites)). This approach allows to have the website's source code in one repository and the deployment version in a different repository.
284288

285-
Let's assume that your website's publishing source is a `publishing-source` sub-directory of a git-versioned repository cloned under `$HOME/repo/`.
289+
Let's assume that your website's publishing source is a `publishing-source` subdirectory of a git-versioned repository cloned under `$HOME/repo/`.
286290
For a user site this could well be something like `$HOME/<user>.github.io`.
287291

288292
Firstly, from the deployment repo dir, checkout the git branch hosting your publishing source.
289293

290294
Then from the website sources dir (commonly your al-folio fork's clone):
295+
291296
```bash
292297
$ bundle exec jekyll build --lsi --destination $HOME/repo/publishing-source
293298
```
@@ -305,7 +310,7 @@ The quote below is taken directly from the [jekyll configuration docs](https://j
305310
> Do not use an important location for `<destination>`; instead, use it as a staging area and copy files from there to your web server.
306311
307312
If `$HOME/repo/publishing-source` contains files that you want jekyll to leave untouched, specify them under `keep_files` in `_config.yml`.
308-
In its default configuration, al-folio will copy the top-level `README.md` to the publishing source. If you want to change this behaviour, add `README.md` under `exclude` in `_config.yml`.
313+
In its default configuration, al-folio will copy the top-level `README.md` to the publishing source. If you want to change this behavior, add `README.md` under `exclude` in `_config.yml`.
309314

310315
**Note:** Do _not_ run `jekyll clean` on your publishing source repo as this will result in the entire directory getting deleted, irrespective of the content of `keep_files` in `_config.yml`.
311316

@@ -315,7 +320,7 @@ In its default configuration, al-folio will copy the top-level `README.md` to th
315320

316321
#### Upgrading from a previous version
317322

318-
If you installed **al-folio** as described above, you can configure a [github action](https://github.com/AndreasAugustin/actions-template-sync) to automatically sync your repository with the latest version of the theme:
323+
If you installed **al-folio** as described above, you can configure a [GitHub action](https://github.com/AndreasAugustin/actions-template-sync) to automatically sync your repository with the latest version of the theme:
319324

320325
```yaml
321326
name: Sync from template
@@ -348,13 +353,13 @@ Another option is to manually update your code by following the steps below:
348353
# Assuming the current directory is <your-repo-name>
349354
$ git remote add upstream https://github.com/alshedivat/al-folio.git
350355
$ git fetch upstream
351-
$ git rebase v0.8.0
356+
$ git rebase v0.9.0
352357
```
353358

354359
If you have extensively customized a previous version, it might be trickier to upgrade.
355360
You can still follow the steps above, but `git rebase` may result in merge conflicts that must be resolved.
356361
See [git rebase manual](https://help.github.com/en/github/using-git/about-git-rebase) and how to [resolve conflicts](https://help.github.com/en/github/using-git/resolving-merge-conflicts-after-a-git-rebase) for more information.
357-
If rebasing is too complicated, we recommend to re-install the new version of the theme from scratch and port over your content and changes from the previous version manually.
362+
If rebasing is too complicated, we recommend re-installing the new version of the theme from scratch and port over your content and changes from the previous version manually.
358363

359364
---
360365

@@ -394,18 +399,17 @@ If you have a different question, please ask using [Discussions](https://github.
394399
5. **Q:** My site doesn't work when I enable `related_blog_posts`. Why? <br>
395400
**A:** This is probably due to the [classifier reborn](https://github.com/jekyll/classifier-reborn) plugin, which is used to calculate
396401
related posts. If the error states `Liquid Exception: Zero vectors can not be normalized...`, it means that it could not calculate related
397-
posts for a specific post. This is usually caused by [empty or really small blog posts](https://github.com/jekyll/classifier-reborn/issues/64)
398-
without meaningful words (i.e. only [stop words](https://en.wikipedia.org/wiki/Stop_words)) or even
402+
posts for a specific post. This is usually caused by [empty or minimal blog posts](https://github.com/jekyll/classifier-reborn/issues/64)
403+
without meaningful words (i.e. only [stop words](https://en.wikipedia.org/wiki/Stop_words)) or even
399404
[specific characters](https://github.com/jekyll/classifier-reborn/issues/194) you used in your posts. Also, the calculus for similar posts are
400405
made for every `post`, which means every page that uses `layout: post`, including the announcements. To change this behavior, simply add
401406
`related_posts: false` to the front matter of the page you don't want to display related posts on.
402-
403407

404408
## Features
405409

406410
### Publications
407411

408-
Your publications page is generated automatically from your BibTex bibliography.
412+
Your publications' page is generated automatically from your BibTex bibliography.
409413
Simply edit `_bibliography/papers.bib`.
410414
You can also add new `*.bib` files and customize the look of your publications however you like by editing `_pages/publications.md`.
411415

@@ -414,15 +418,18 @@ You can also add new `*.bib` files and customize the look of your publications h
414418
<details><summary>(click to expand) <strong>Author annotation:</strong></summary>
415419

416420
In publications, the author entry for yourself is identified by string array `scholar:last_name` and string array `scholar:first_name` in `_config.yml`:
417-
```
421+
422+
```yaml
418423
scholar:
419424
last_name: [Einstein]
420425
first_name: [Albert, A.]
421426
```
427+
422428
If the entry matches one form of the last names and the first names, it will be underlined.
423429
Keep meta-information about your co-authors in `_data/coauthors.yml` and Jekyll will insert links to their webpages automatically.
424-
The coauthor data format in `_data/coauthors.yml` is as follows,
425-
```
430+
The co-author data format in `_data/coauthors.yml` is as follows,
431+
432+
```yaml
426433
"Adams":
427434
- firstname: ["Edwin", "E.", "E. P.", "Edwin Plimpton"]
428435
url: https://en.wikipedia.org/wiki/Edwin_Plimpton_Adams
@@ -442,6 +449,7 @@ The coauthor data format in `_data/coauthors.yml` is as follows,
442449
- firstname: ["Carl Philipp Emanuel", "C. P. E."]
443450
url: https://en.wikipedia.org/wiki/Carl_Philipp_Emanuel_Bach
444451
```
452+
445453
If the entry matches one of the combinations of the last names and the first names, it will be highlighted and linked to the url provided.
446454

447455
</details>
@@ -454,7 +462,7 @@ There are several custom bibtex keywords that you can use to affect how the entr
454462
- `abstract`: Adds an "Abs" button that expands a hidden text field when clicked to show the abstract text
455463
- `arxiv`: Adds a link to the Arxiv website (Note: only add the arxiv identifier here - the link is generated automatically)
456464
- `bibtex_show`: Adds a "Bib" button that expands a hidden text field with the full bibliography entry
457-
- `html`: Inserts a "HTML" button redirecting to the user-specified link
465+
- `html`: Inserts an "HTML" button redirecting to the user-specified link
458466
- `pdf`: Adds a "PDF" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory)
459467
- `supp`: Adds a "Supp" button to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory)
460468
- `blog`: Adds a "Blog" button redirecting to the specified link
@@ -463,7 +471,7 @@ There are several custom bibtex keywords that you can use to affect how the entr
463471
- `slides`: Adds a "Slides" button redirecting to a specified file (if a full link is not specified, the file will be assumed to be placed in the /assets/pdf/ directory)
464472
- `website`: Adds a "Website" button redirecting to the specified link
465473
- `altmetric`: Adds an [Altmetric](https://www.altmetric.com/) badge (Note: if DOI is provided just use `true`, otherwise only add the altmetric identifier here - the link is generated automatically)
466-
- `dimensions`: Adds an [Dimensions](https://www.dimensions.ai/) badge (Note: if DOI or PMID is provided just use `true`, otherwise only add the dimensions identifier here - the link is generated automatically)
474+
- `dimensions`: Adds a [Dimensions](https://www.dimensions.ai/) badge (Note: if DOI or PMID is provided just use `true`, otherwise only add the Dimensions' identifier here - the link is generated automatically)
467475

468476
You can implement your own buttons by editing the bib.html file.
469477

@@ -521,14 +529,16 @@ Easily create beautiful grids within your blog posts and project pages:
521529

522530
### Other features
523531

524-
#### GitHub repositories and user stats
532+
#### GitHub's repositories and user stats
533+
525534
**al-folio** uses [github-readme-stats](https://github.com/anuraghazra/github-readme-stats) and [github-profile-trophy](https://github.com/ryo-ma/github-profile-trophy)
526-
to display GitHub repositories and user stats on the the `/repositories/` page.
535+
to display GitHub repositories and user stats on the `/repositories/` page.
527536

528-
Edit the `_data/repositories.yml` and change the `github_users` and `github_repos` lists to include your own GitHub profile and repositories to the the `/repositories/` page.
537+
Edit the `_data/repositories.yml` and change the `github_users` and `github_repos` lists to include your own GitHub profile and repositories to the `/repositories/` page.
529538

530539
You may also use the following codes for displaying this in any other pages.
531-
```
540+
541+
```html
532542
<!-- code for GitHub users -->
533543
{% if site.data.repositories.github_users %}
534544
<div class="repositories d-flex flex-wrap flex-md-row flex-column justify-content-between align-items-center">
@@ -538,7 +548,7 @@ You may also use the following codes for displaying this in any other pages.
538548
</div>
539549
{% endif %}
540550
541-
<!-- code for Github trophies -->
551+
<!-- code for GitHub trophies -->
542552
{% if site.repo_trophies.enabled %}
543553
{% for user in site.data.repositories.github_users %}
544554
{% if site.data.repositories.github_users.size > 1 %}
@@ -561,6 +571,7 @@ You may also use the following codes for displaying this in any other pages.
561571
```
562572

563573
#### Theming
574+
564575
A variety of beautiful theme colors have been selected for you to choose from.
565576
The default is purple, but you can quickly change it by editing the
566577
`--global-theme-color` variable in the `_sass/_themes.scss` file.
@@ -570,6 +581,7 @@ You can also add your own colors to this file assigning each a name for ease of
570581
use across the template.
571582

572583
#### Social media previews
584+
573585
**al-folio** supports preview images on social media.
574586
To enable this functionality you will need to set `serve_og_meta` to `true` in your `_config.yml`.
575587
Once you have done so, all your site's pages will include Open Graph data in the HTML head element.
@@ -580,12 +592,14 @@ If for an individual page this variable is not set, then the theme will fall bac
580592
In both the page-specific and site-wide cases, the `og_image` variable needs to hold the URL for the image you wish to display in social media previews.
581593

582594
#### Atom (RSS-like) Feed
595+
583596
It generates an Atom (RSS-like) feed of your posts, useful for Atom and RSS readers.
584597
The feed is reachable simply by typing after your homepage `/feed.xml`.
585598
E.g. assuming your website mountpoint is the main folder, you can type `yourusername.github.io/feed.xml`
586599

587600
#### Related posts
588-
By default, there will be a related posts section on the bottom of the blog posts.
601+
602+
By default, there will be a related posts section on the bottom of the blog posts.
589603
These are generated by selecting the `max_related` most recent posts that share at least `min_common_tags` tags with the current post.
590604
If you do not want to display related posts on a specific post, simply add `related_posts: false` to the front matter of the post.
591605
If you want to disable it for all posts, simply set `enabled` to false in the `related_blog_posts` section in `_config.yml`.

0 commit comments

Comments
 (0)