|
1 | 1 | [](https://github.com/themantra108/staticPlutoTemplate/actions/workflows/ExportPluto.yaml)
|
2 |
| - |
3 |
| -# static-export-template |
4 |
| - |
5 |
| -This is a demo repository containing two [Pluto](https://github.com/fonsp/Pluto.jl) notebooks that are **automatically converted to HTML** by a github action, and published to github pages! 🌝 |
6 |
| - |
7 |
| -See the github pages deployment of this repository: |
8 |
| -https://juliapluto.github.io/static-export-template/ |
9 |
| - |
10 |
| -# How to use the template |
11 |
| - |
12 |
| -### 👉 Step 1 |
13 |
| - |
14 |
| -Create a GitHub account, and click on ["Use this template"](https://github.com/JuliaPluto/static-export-template/generate). Choose a new name! |
15 |
| - |
16 |
| -<img width="400" alt="screenshot of clicking the Use-this-template button" src="https://user-images.githubusercontent.com/6933510/103711531-f7cdc800-4fb7-11eb-98b7-6ebd070a337b.png"> |
17 |
| - |
18 |
| -You now have your own repository (take a look at the URL), containing a copy of the template files, including the file you are currently reading (`README.md`)! |
19 |
| - |
20 |
| -### 👉 Step 2 |
21 |
| - |
22 |
| -Click on **Add files** (or **+**), and then **Upload files**. In the next page, upload your `.jl` notebook files. |
23 |
| - |
24 |
| -<img width="400" alt="screenshot of clicking the Upload-files button" src="https://user-images.githubusercontent.com/6933510/103710071-67da4f00-4fb4-11eb-9943-b66f26119d36.png"> |
25 |
| - |
26 |
| -Your notebooks will run on github every time that you update the files in this repository. To check the progress, go to the ["Actions" page](./actions) of your repository, you will find the _workflow_ for the last commit. |
27 |
| - |
28 |
| -<img width="400" alt="screenshot of the actions page, showing a currently running workflow" src="https://user-images.githubusercontent.com/6933510/103711844-978b5600-4fb8-11eb-8b1b-1e5bdacc1c85.png"> |
29 |
| - |
30 |
| -Wait for the Action to finish running your notebook. |
31 |
| - |
32 |
| -### 👉 Step 3 |
33 |
| - |
34 |
| -Go to the ["Settings" page](./settings) of your repository, and go to [the "Pages" section](./settings/pages). For the "Source", choose `gh-pages`. Wait a minute for everything to initialize, and the URL to your web page will be shown! |
35 |
| - |
36 |
| -<img width="400" alt="screenshot of the Pages settings, displaying the URL after the web page is ready" src="https://user-images.githubusercontent.com/6933510/103711695-43807180-4fb8-11eb-9ba8-a96a70612177.png"> |
37 |
| - |
38 |
| -Don't worry if it doesn't work immediately! It can take a while for the web page to be ready, even after your settings page says it's done. (Github pages says 20 minutes, but it can take even longer.) |
39 |
| - |
40 |
| -## Update notebook files |
41 |
| - |
42 |
| -To update an existing notebook file, simply repeat Step 2 above! (You can also use **Add files** `>` **Upload files** to _update_ upload a file that already exists on the repository.) |
43 |
| - |
44 |
| -# Alternative setup: add web pages to an existing repository |
45 |
| - |
46 |
| -If you already have a github repository with some pluto notebooks in it, you may want to add a web view like the one for this repository. In that case, the steps are slightly different. In this case, I assume that you are familiar with adding files to a repository. If not, follow the steps above. |
47 |
| - |
48 |
| -### 👉 Step 1 |
49 |
| - |
50 |
| -From this repository, download [ExportPluto.yaml](./.github/workflows/ExportPluto.yaml). |
51 |
| - |
52 |
| -Save the file in your own repository, in the same location: make a folder `.github` in the main directory, within that a folder `workflows`, and add the file there, with the name `ExportPluto.yaml`. Commit the new file to your repository. |
53 |
| - |
54 |
| -*Note: The yaml file states that github should use the github notebooks in the `main` branch or `master` branch of your repository. If you changed the name of your default branch, or you want to use a different branch, change `main` in [line 5](https://github.com/JuliaPluto/static-export-template/blob/main/.github/workflows/ExportPluto.yaml#L5) in the yaml file to the name of your favourite branch.* |
55 |
| - |
56 |
| -Your notebooks will run on github every time that you update the files in this repository. To check the progress, click on ["Actions"](./actions), you will find the _workflow_ for the last commit. |
57 |
| - |
58 |
| -<img width="400" alt="Schermafbeelding 2021-01-06 om 00 45 25" src="https://user-images.githubusercontent.com/6933510/103711844-978b5600-4fb8-11eb-8b1b-1e5bdacc1c85.png"> |
59 |
| - |
60 |
| -### 👉 Step 2 |
61 |
| - |
62 |
| -Go to the ["Settings" page](./settings) of your repository, and go to [the "Pages" section](./settings/pages). For the "Source", choose `gh-pages`. Wait a minute for everything to initialize, and the URL to your web page will be shown! |
63 |
| - |
64 |
| -<img width="400" alt="Schermafbeelding 2021-01-06 om 00 43 00" src="https://user-images.githubusercontent.com/6933510/103711695-43807180-4fb8-11eb-9ba8-a96a70612177.png"> |
65 |
| - |
66 |
| -Don't worry if it doesn't work immediately! It can take a while for the web page to be ready, even after your settings page says it's done. (Github pages says 20 minutes, but it can take even longer.) |
67 |
| - |
68 |
| - |
69 |
| -# 💡Tips |
70 |
| - |
71 |
| -### Julia Packages |
72 |
| - |
73 |
| -Because Pluto has a [built-in package manager](https://github.com/fonsp/Pluto.jl/wiki/%F0%9F%8E%81-Package-management), packages will automatically work on the website! |
74 |
| - |
75 |
| -### Default files |
76 |
| - |
77 |
| -This files `README.md` and `My cool notebook.jl` are example files, and you can safely edit or delete them! After you have set up your repository, you can remove these setup instructions from the `README.md` file, and write a description of your project. |
78 |
| - |
79 |
| -### Not working? |
80 |
| - |
81 |
| -If your website is not automatically updating, then go to the **"Actions"** page of your repository, and take a look at the latest logs. If they show a ❌ symbol, then something went wrong. Click on it, and carefully read the error message. If you get stuck, be sure to ask for help: open an issue at https://github.com/JuliaPluto/static-export-template/issues/new and send us a link to your repository. |
82 |
| - |
83 |
| -### Homepage |
84 |
| - |
85 |
| -If you go to the (GitHub Pages) URL of repository, you will see a small index of the notebooks in this repository. You can customize this page, two options are: |
86 |
| - |
87 |
| -- Create your own `index.html` or `index.md` file, it will be used as the homepage. |
88 |
| -- Rename one of your notebooks to `index.jl`, and it will be the default notebook! |
89 |
| - |
90 |
| -# License |
91 |
| - |
92 |
| -This *template* repository is [Unlicensed](https://unlicense.org), which means that you can do anything you want with it! When you use this template, you are also free to remove this license message. |
93 |
| - |
94 |
| -<details> |
95 |
| -<summary>View license text</summary> |
96 |
| -(This license applies to the template https://github.com/JuliaPluto/static-export-template, not necessarily to the user of the template.) |
97 |
| - |
98 |
| -``` |
99 |
| -This is free and unencumbered software released into the public domain. |
100 |
| -
|
101 |
| -Anyone is free to copy, modify, publish, use, compile, sell, or |
102 |
| -distribute this software, either in source code form or as a compiled |
103 |
| -binary, for any purpose, commercial or non-commercial, and by any |
104 |
| -means. |
105 |
| -
|
106 |
| -In jurisdictions that recognize copyright laws, the author or authors |
107 |
| -of this software dedicate any and all copyright interest in the |
108 |
| -software to the public domain. We make this dedication for the benefit |
109 |
| -of the public at large and to the detriment of our heirs and |
110 |
| -successors. We intend this dedication to be an overt act of |
111 |
| -relinquishment in perpetuity of all present and future rights to this |
112 |
| -software under copyright law. |
113 |
| -
|
114 |
| -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
115 |
| -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
116 |
| -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
117 |
| -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR |
118 |
| -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
119 |
| -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
120 |
| -OTHER DEALINGS IN THE SOFTWARE. |
121 |
| -
|
122 |
| -For more information, please refer to <https://unlicense.org> |
123 |
| -``` |
124 |
| -</details> |
0 commit comments