|
| 1 | +# Publishing with Markdown |
| 2 | + |
| 3 | +This repository is pre-configured to act as a simple, powerful, and free website publishing platform using GitHub Pages. This guide walks you through how to use it to create and manage your own site. |
| 4 | + |
| 5 | +## Part 1: Choosing Your Website's Design |
| 6 | + |
| 7 | +Your website's look and feel is controlled by a "theme". This repository uses Jekyll, a static site generator, which has great support for themes. |
| 8 | + |
| 9 | +### How to Change Your Theme |
| 10 | + |
| 11 | +You can change your website's theme with a single line of code. |
| 12 | + |
| 13 | +1. Open the `_config.yml` file in the root of your repository. |
| 14 | +2. You will see a line: `theme: jekyll-theme-primer`. |
| 15 | +3. To change the theme, simply replace `jekyll-theme-primer` with the name of another supported theme. For example: `theme: jekyll-theme-minimal`. |
| 16 | +4. Commit the change, and your site will be rebuilt with the new theme. |
| 17 | + |
| 18 | +### Supported Themes |
| 19 | + |
| 20 | +GitHub Pages officially supports a number of themes. You can preview them by visiting their repositories. |
| 21 | + |
| 22 | +| Theme Name | How to Use It (`_config.yml`) | Preview Link | |
| 23 | +| :----------- | :---------------------------------------------- | :------------------------------------------------------------- | |
| 24 | +| Architect | `theme: jekyll-theme-architect` | [View on GitHub](https://github.com/pages-themes/architect) | |
| 25 | +| Cayman | `theme: jekyll-theme-cayman` | [View on GitHub](https://github.com/pages-themes/cayman) | |
| 26 | +| Dinky | `theme: jekyll-theme-dinky` | [View on GitHub](https://github.com/pages-themes/dinky) | |
| 27 | +| Hacker | `theme: jekyll-theme-hacker` | [View on GitHub](https://github.com/pages-themes/hacker) | |
| 28 | +| Leap Day | `theme: jekyll-theme-leap-day` | [View on GitHub](https://github.com/pages-themes/leap-day) | |
| 29 | +| Merlot | `theme: jekyll-theme-merlot` | [View on GitHub](https://github.com/pages-themes/merlot) | |
| 30 | +| Midnight | `theme: jekyll-theme-midnight` | [View on GitHub](https://github.com/pages-themes/midnight) | |
| 31 | +| Minimal | `theme: jekyll-theme-minimal` | [View on GitHub](https://github.com/pages-themes/minimal) | |
| 32 | +| Modernist | `theme: jekyll-theme-modernist` | [View on GitHub](https://github.com/pages-themes/modernist) | |
| 33 | +| Primer | `theme: jekyll-theme-primer` | [View on GitHub](https://github.com/pages-themes/primer) | |
| 34 | +| Slate | `theme: jekyll-theme-slate` | [View on GitHub](https://github.com/pages-themes/slate) | |
| 35 | +| Tactile | `theme: jekyll-theme-tactile` | [View on GitHub](https://github.com/pages-themes/tactile) | |
| 36 | +| Time Machine | `theme: jekyll-theme-time-machine` | [View on GitHub](https://github.com/pages-themes/time-machine) | |
| 37 | + |
| 38 | +## Part 2: Creating and Editing Content |
| 39 | + |
| 40 | +### The Publishing Workflow |
| 41 | + |
| 42 | +Publishing is as simple as editing text files. |
| 43 | + |
| 44 | +1. **Edit or Create Files:** Edit an existing Markdown (`.md`) file or create a new one. |
| 45 | +2. **Commit and Push:** Save and push your changes to the `main` branch. |
| 46 | +3. **Done!** The website will automatically rebuild and your changes will be live in a minute or two. |
| 47 | + |
| 48 | +### Homepage and Other Pages |
| 49 | + |
| 50 | +- **Homepage:** The content of your site's homepage is the `README.md` file in the root of the repository. |
| 51 | +- **Other Pages:** Any other `.md` file in your repository becomes a page on your site. For example, `contact.md` will be available at `your-site.com/contact`. |
| 52 | + |
| 53 | +### Organizing Your Site |
| 54 | + |
| 55 | +You can create folders to organize your content. A file at `docs/about.md` will be available at `your-site.com/docs/about`. |
| 56 | + |
| 57 | +To link between pages, use relative links in your Markdown. It's best to use paths relative to the current file (e.g., starting with `./` or `../`). |
| 58 | + |
| 59 | +For example, from your root `README.md`, you could link to a file in `docs` like this: |
| 60 | + |
| 61 | +```markdown |
| 62 | +[Read our About page](./docs/about.md) |
| 63 | +``` |
| 64 | + |
| 65 | +## Part 3: Advanced Formatting |
| 66 | + |
| 67 | +Markdown is designed to be simple, but it has powerful features for creating rich content. |
| 68 | + |
| 69 | +### Code Blocks with Syntax Highlighting |
| 70 | + |
| 71 | +````markdown |
| 72 | +```javascript |
| 73 | +function helloWorld() { |
| 74 | + console.log("Hello, world!"); |
| 75 | +} |
| 76 | +``` |
| 77 | +```` |
| 78 | + |
| 79 | +### Tables |
| 80 | + |
| 81 | +```markdown |
| 82 | +| Feature | Support Level | Notes | |
| 83 | +| :-------------- | :-----------: | :---------------------------------- | |
| 84 | +| Themes | Good | Several supported themes available. | |
| 85 | +| Markdown Tables | Excellent | Full support for GFM tables. | |
| 86 | +``` |
| 87 | + |
| 88 | +### Task Lists |
| 89 | + |
| 90 | +```markdown |
| 91 | +- [x] Draft the documentation. |
| 92 | +- [ ] Add more examples. |
| 93 | +- [ ] Request a review. |
| 94 | +``` |
| 95 | + |
| 96 | +### Alerts and Blockquotes |
| 97 | + |
| 98 | +```markdown |
| 99 | +> [!NOTE] |
| 100 | +> This is a note. It contains useful information users should know. |
| 101 | +
|
| 102 | +> [!WARNING] |
| 103 | +> This is a warning. It advises about risks or negative outcomes. |
| 104 | +``` |
| 105 | + |
| 106 | +### Working with Images and Videos |
| 107 | + |
| 108 | +#### Images |
| 109 | + |
| 110 | +The standard Markdown syntax for an image is ``. |
| 111 | + |
| 112 | +- **Local Images:** `` |
| 113 | +- **Remote Images:** `` |
| 114 | + |
| 115 | +#### Embedding Videos |
| 116 | + |
| 117 | +You can't embed a video player directly, but you can create a clickable thumbnail that links to the video. Replace `YOUTUBE_VIDEO_ID_HERE` with your video's ID. |
| 118 | + |
| 119 | +```markdown |
| 120 | +[](https://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE) |
| 121 | +``` |
| 122 | + |
| 123 | +### Page Titles and SEO |
| 124 | + |
| 125 | +To set a custom title and description for a specific page, add a "front matter" block to the very top of your `.md` file. |
| 126 | + |
| 127 | +```yaml |
| 128 | +--- |
| 129 | +title: About Our Company |
| 130 | +description: Learn about our history, our team, and our mission. |
| 131 | +image: /assets/our-team-photo.jpg |
| 132 | +--- |
| 133 | +# About Us |
| 134 | + |
| 135 | +This is the rest of your page content... |
| 136 | +``` |
| 137 | + |
| 138 | +You can also set a site-wide title and description in the `_config.yml` file. |
0 commit comments