├── .gitignore ├── COPYING ├── PackageInfo.g ├── README.html ├── README.md ├── _config.yml ├── _data └── package.yml ├── _includes └── button-bibtex.html ├── _layouts └── default.html ├── doc ├── chap0.html ├── chap0.txt └── chap0_mj.html ├── images ├── arrow-down.png └── octocat-small.png ├── index.md ├── javascripts └── scale.fix.js ├── setup-gh-pages ├── stylesheets ├── pygment_trac.css └── styles.css └── update.g /.gitignore: -------------------------------------------------------------------------------- 1 | _site -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | The GitHubPagesForGAP package is free software; you can redistribute 2 | and/or modify it under the terms of the GNU General Public License as 3 | published by the Free Software Foundation; either version 2 of the 4 | License, or (at your opinion) any later version. 5 | 6 | The GitHubPagesForGAP package is distributed in the hope that it will 7 | be useful, but WITHOUT ANY WARRANTY; without even the implied warranty 8 | of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9 | General Public License for more details. 10 | 11 | Version 2 of the GNU General Public License follows. 12 | 13 | GNU GENERAL PUBLIC LICENSE 14 | Version 2, June 1991 15 | 16 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 17 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | Everyone is permitted to copy and distribute verbatim copies 19 | of this license document, but changing it is not allowed. 20 | 21 | Preamble 22 | 23 | The licenses for most software are designed to take away your 24 | freedom to share and change it. By contrast, the GNU General Public 25 | License is intended to guarantee your freedom to share and change free 26 | software--to make sure the software is free for all its users. This 27 | General Public License applies to most of the Free Software 28 | Foundation's software and to any other program whose authors commit to 29 | using it. (Some other Free Software Foundation software is covered by 30 | the GNU Lesser General Public License instead.) You can apply it to 31 | your programs, too. 32 | 33 | When we speak of free software, we are referring to freedom, not 34 | price. Our General Public Licenses are designed to make sure that you 35 | have the freedom to distribute copies of free software (and charge for 36 | this service if you wish), that you receive source code or can get it 37 | if you want it, that you can change the software or use pieces of it 38 | in new free programs; and that you know you can do these things. 39 | 40 | To protect your rights, we need to make restrictions that forbid 41 | anyone to deny you these rights or to ask you to surrender the rights. 42 | These restrictions translate to certain responsibilities for you if you 43 | distribute copies of the software, or if you modify it. 44 | 45 | For example, if you distribute copies of such a program, whether 46 | gratis or for a fee, you must give the recipients all the rights that 47 | you have. You must make sure that they, too, receive or can get the 48 | source code. And you must show them these terms so they know their 49 | rights. 50 | 51 | We protect your rights with two steps: (1) copyright the software, and 52 | (2) offer you this license which gives you legal permission to copy, 53 | distribute and/or modify the software. 54 | 55 | Also, for each author's protection and ours, we want to make certain 56 | that everyone understands that there is no warranty for this free 57 | software. If the software is modified by someone else and passed on, we 58 | want its recipients to know that what they have is not the original, so 59 | that any problems introduced by others will not reflect on the original 60 | authors' reputations. 61 | 62 | Finally, any free program is threatened constantly by software 63 | patents. We wish to avoid the danger that redistributors of a free 64 | program will individually obtain patent licenses, in effect making the 65 | program proprietary. To prevent this, we have made it clear that any 66 | patent must be licensed for everyone's free use or not licensed at all. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | GNU GENERAL PUBLIC LICENSE 72 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 73 | 74 | 0. This License applies to any program or other work which contains 75 | a notice placed by the copyright holder saying it may be distributed 76 | under the terms of this General Public License. The "Program", below, 77 | refers to any such program or work, and a "work based on the Program" 78 | means either the Program or any derivative work under copyright law: 79 | that is to say, a work containing the Program or a portion of it, 80 | either verbatim or with modifications and/or translated into another 81 | language. (Hereinafter, translation is included without limitation in 82 | the term "modification".) Each licensee is addressed as "you". 83 | 84 | Activities other than copying, distribution and modification are not 85 | covered by this License; they are outside its scope. The act of 86 | running the Program is not restricted, and the output from the Program 87 | is covered only if its contents constitute a work based on the 88 | Program (independent of having been made by running the Program). 89 | Whether that is true depends on what the Program does. 90 | 91 | 1. You may copy and distribute verbatim copies of the Program's 92 | source code as you receive it, in any medium, provided that you 93 | conspicuously and appropriately publish on each copy an appropriate 94 | copyright notice and disclaimer of warranty; keep intact all the 95 | notices that refer to this License and to the absence of any warranty; 96 | and give any other recipients of the Program a copy of this License 97 | along with the Program. 98 | 99 | You may charge a fee for the physical act of transferring a copy, and 100 | you may at your option offer warranty protection in exchange for a fee. 101 | 102 | 2. You may modify your copy or copies of the Program or any portion 103 | of it, thus forming a work based on the Program, and copy and 104 | distribute such modifications or work under the terms of Section 1 105 | above, provided that you also meet all of these conditions: 106 | 107 | a) You must cause the modified files to carry prominent notices 108 | stating that you changed the files and the date of any change. 109 | 110 | b) You must cause any work that you distribute or publish, that in 111 | whole or in part contains or is derived from the Program or any 112 | part thereof, to be licensed as a whole at no charge to all third 113 | parties under the terms of this License. 114 | 115 | c) If the modified program normally reads commands interactively 116 | when run, you must cause it, when started running for such 117 | interactive use in the most ordinary way, to print or display an 118 | announcement including an appropriate copyright notice and a 119 | notice that there is no warranty (or else, saying that you provide 120 | a warranty) and that users may redistribute the program under 121 | these conditions, and telling the user how to view a copy of this 122 | License. (Exception: if the Program itself is interactive but 123 | does not normally print such an announcement, your work based on 124 | the Program is not required to print an announcement.) 125 | 126 | These requirements apply to the modified work as a whole. If 127 | identifiable sections of that work are not derived from the Program, 128 | and can be reasonably considered independent and separate works in 129 | themselves, then this License, and its terms, do not apply to those 130 | sections when you distribute them as separate works. But when you 131 | distribute the same sections as part of a whole which is a work based 132 | on the Program, the distribution of the whole must be on the terms of 133 | this License, whose permissions for other licensees extend to the 134 | entire whole, and thus to each and every part regardless of who wrote it. 135 | 136 | Thus, it is not the intent of this section to claim rights or contest 137 | your rights to work written entirely by you; rather, the intent is to 138 | exercise the right to control the distribution of derivative or 139 | collective works based on the Program. 140 | 141 | In addition, mere aggregation of another work not based on the Program 142 | with the Program (or with a work based on the Program) on a volume of 143 | a storage or distribution medium does not bring the other work under 144 | the scope of this License. 145 | 146 | 3. You may copy and distribute the Program (or a work based on it, 147 | under Section 2) in object code or executable form under the terms of 148 | Sections 1 and 2 above provided that you also do one of the following: 149 | 150 | a) Accompany it with the complete corresponding machine-readable 151 | source code, which must be distributed under the terms of Sections 152 | 1 and 2 above on a medium customarily used for software interchange; or, 153 | 154 | b) Accompany it with a written offer, valid for at least three 155 | years, to give any third party, for a charge no more than your 156 | cost of physically performing source distribution, a complete 157 | machine-readable copy of the corresponding source code, to be 158 | distributed under the terms of Sections 1 and 2 above on a medium 159 | customarily used for software interchange; or, 160 | 161 | c) Accompany it with the information you received as to the offer 162 | to distribute corresponding source code. (This alternative is 163 | allowed only for noncommercial distribution and only if you 164 | received the program in object code or executable form with such 165 | an offer, in accord with Subsection b above.) 166 | 167 | The source code for a work means the preferred form of the work for 168 | making modifications to it. For an executable work, complete source 169 | code means all the source code for all modules it contains, plus any 170 | associated interface definition files, plus the scripts used to 171 | control compilation and installation of the executable. However, as a 172 | special exception, the source code distributed need not include 173 | anything that is normally distributed (in either source or binary 174 | form) with the major components (compiler, kernel, and so on) of the 175 | operating system on which the executable runs, unless that component 176 | itself accompanies the executable. 177 | 178 | If distribution of executable or object code is made by offering 179 | access to copy from a designated place, then offering equivalent 180 | access to copy the source code from the same place counts as 181 | distribution of the source code, even though third parties are not 182 | compelled to copy the source along with the object code. 183 | 184 | 4. You may not copy, modify, sublicense, or distribute the Program 185 | except as expressly provided under this License. Any attempt 186 | otherwise to copy, modify, sublicense or distribute the Program is 187 | void, and will automatically terminate your rights under this License. 188 | However, parties who have received copies, or rights, from you under 189 | this License will not have their licenses terminated so long as such 190 | parties remain in full compliance. 191 | 192 | 5. You are not required to accept this License, since you have not 193 | signed it. However, nothing else grants you permission to modify or 194 | distribute the Program or its derivative works. These actions are 195 | prohibited by law if you do not accept this License. Therefore, by 196 | modifying or distributing the Program (or any work based on the 197 | Program), you indicate your acceptance of this License to do so, and 198 | all its terms and conditions for copying, distributing or modifying 199 | the Program or works based on it. 200 | 201 | 6. Each time you redistribute the Program (or any work based on the 202 | Program), the recipient automatically receives a license from the 203 | original licensor to copy, distribute or modify the Program subject to 204 | these terms and conditions. You may not impose any further 205 | restrictions on the recipients' exercise of the rights granted herein. 206 | You are not responsible for enforcing compliance by third parties to 207 | this License. 208 | 209 | 7. If, as a consequence of a court judgment or allegation of patent 210 | infringement or for any other reason (not limited to patent issues), 211 | conditions are imposed on you (whether by court order, agreement or 212 | otherwise) that contradict the conditions of this License, they do not 213 | excuse you from the conditions of this License. If you cannot 214 | distribute so as to satisfy simultaneously your obligations under this 215 | License and any other pertinent obligations, then as a consequence you 216 | may not distribute the Program at all. For example, if a patent 217 | license would not permit royalty-free redistribution of the Program by 218 | all those who receive copies directly or indirectly through you, then 219 | the only way you could satisfy both it and this License would be to 220 | refrain entirely from distribution of the Program. 221 | 222 | If any portion of this section is held invalid or unenforceable under 223 | any particular circumstance, the balance of the section is intended to 224 | apply and the section as a whole is intended to apply in other 225 | circumstances. 226 | 227 | It is not the purpose of this section to induce you to infringe any 228 | patents or other property right claims or to contest validity of any 229 | such claims; this section has the sole purpose of protecting the 230 | integrity of the free software distribution system, which is 231 | implemented by public license practices. Many people have made 232 | generous contributions to the wide range of software distributed 233 | through that system in reliance on consistent application of that 234 | system; it is up to the author/donor to decide if he or she is willing 235 | to distribute software through any other system and a licensee cannot 236 | impose that choice. 237 | 238 | This section is intended to make thoroughly clear what is believed to 239 | be a consequence of the rest of this License. 240 | 241 | 8. If the distribution and/or use of the Program is restricted in 242 | certain countries either by patents or by copyrighted interfaces, the 243 | original copyright holder who places the Program under this License 244 | may add an explicit geographical distribution limitation excluding 245 | those countries, so that distribution is permitted only in or among 246 | countries not thus excluded. In such case, this License incorporates 247 | the limitation as if written in the body of this License. 248 | 249 | 9. The Free Software Foundation may publish revised and/or new versions 250 | of the General Public License from time to time. Such new versions will 251 | be similar in spirit to the present version, but may differ in detail to 252 | address new problems or concerns. 253 | 254 | Each version is given a distinguishing version number. If the Program 255 | specifies a version number of this License which applies to it and "any 256 | later version", you have the option of following the terms and conditions 257 | either of that version or of any later version published by the Free 258 | Software Foundation. If the Program does not specify a version number of 259 | this License, you may choose any version ever published by the Free Software 260 | Foundation. 261 | 262 | 10. If you wish to incorporate parts of the Program into other free 263 | programs whose distribution conditions are different, write to the author 264 | to ask for permission. For software which is copyrighted by the Free 265 | Software Foundation, write to the Free Software Foundation; we sometimes 266 | make exceptions for this. Our decision will be guided by the two goals 267 | of preserving the free status of all derivatives of our free software and 268 | of promoting the sharing and reuse of software generally. 269 | 270 | NO WARRANTY 271 | 272 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 273 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 274 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 275 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 276 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 277 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 278 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 279 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 280 | REPAIR OR CORRECTION. 281 | 282 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 283 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 284 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 285 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 286 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 287 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 288 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 289 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 290 | POSSIBILITY OF SUCH DAMAGES. 291 | 292 | END OF TERMS AND CONDITIONS 293 | -------------------------------------------------------------------------------- /PackageInfo.g: -------------------------------------------------------------------------------- 1 | ############################################################################# 2 | ## 3 | ## Demo PackageInfo.g for the GitHubPagesForGAP 4 | ## 5 | 6 | SetPackageInfo( rec( 7 | 8 | PackageName := "GitHubPagesForGAP", 9 | 10 | Subtitle := "A GitHub Pages generator for GAP packages", 11 | Version := "0.4", 12 | Date := "10/04/2025", # dd/mm/yyyy format 13 | License := "0BSD", 14 | 15 | Persons := [ 16 | rec( 17 | LastName := "Horn", 18 | FirstNames := "Max", 19 | IsAuthor := true, 20 | IsMaintainer := true, 21 | Email := "mhorn@rptu.de", 22 | WWWHome := "https://www.quendi.de/math", 23 | GitHubUsername:= "fingolfin", 24 | PostalAddress := Concatenation( 25 | "Fachbereich Mathematik\n", 26 | "RPTU Kaiserslautern-Landau\n", 27 | "Gottlieb-Daimler-Straße 48\n", 28 | "67663 Kaiserslautern\n", 29 | "Germany" ), 30 | Place := "Kaiserslautern, Germany", 31 | Institution := "RPTU Kaiserslautern-Landau" 32 | ), 33 | 34 | rec( 35 | LastName := "Thor", 36 | FirstNames := "A. U.", 37 | IsAuthor := true, 38 | IsMaintainer := false, 39 | #Email := "author@example.com", 40 | ), 41 | 42 | rec( 43 | LastName := "Itor", 44 | FirstNames := "Jan", 45 | IsAuthor := false, 46 | IsMaintainer := true, 47 | #Email := "janitor@example.com", 48 | ), 49 | ], 50 | 51 | Status := "other", 52 | 53 | # The following are not strictly necessary in your own PackageInfo.g 54 | # (in the sense that update.g only looks at the usual fields 55 | # like PackageWWWHome, ArchiveURL etc.). But they are convenient 56 | # if you use exactly the scheme for your package website that we propose. 57 | GithubUser := "gap-system", 58 | GithubRepository := ~.PackageName, 59 | GithubWWW := Concatenation("https://github.com/", ~.GithubUser, "/", ~.GithubRepository), 60 | 61 | PackageWWWHome := Concatenation("https://", ~.GithubUser, ".github.io/", ~.GithubRepository, "/"), 62 | README_URL := Concatenation( ~.PackageWWWHome, "README.md" ), 63 | PackageInfoURL := Concatenation( ~.PackageWWWHome, "PackageInfo.g" ), 64 | # The following assumes you are using the Github releases system. If not, adjust 65 | # it accordingly. 66 | ArchiveURL := Concatenation(~.GithubWWW, 67 | "/releases/download/v", ~.Version, "/", 68 | ~.GithubRepository, "-", ~.Version), 69 | 70 | ArchiveFormats := ".tar.gz .tar.bz2", 71 | 72 | AbstractHTML := 73 | "This is a pseudo package that contains no actual\ 74 | GAP code. Instead, it is a template for other\ 75 | GAP packages that allows to quickly setup GitHub Pages.", 76 | 77 | PackageDoc := rec( 78 | BookName := "GitHubPagesForGAP", 79 | ArchiveURLSubset := ["doc"], 80 | HTMLStart := "doc/chap0.html", 81 | PDFFile := "doc/manual.pdf", 82 | SixFile := "doc/manual.six", 83 | LongTitle := "A GitHub Pages generator for GAP packages", 84 | ), 85 | 86 | # The following dependencies are fake and for testing / demo purposes 87 | Dependencies := rec( 88 | GAP := ">=4.8.1", 89 | NeededOtherPackages := [ 90 | ["GAPDoc", ">= 1.2"], 91 | ["IO", ">= 4.1"], 92 | ], 93 | SuggestedOtherPackages := [["orb", ">= 4.2"]], 94 | ExternalConditions := [] 95 | ), 96 | 97 | AvailabilityTest := ReturnTrue, 98 | 99 | Keywords := ["GitHub Pages", "GAP"] 100 | 101 | )); 102 | 103 | 104 | -------------------------------------------------------------------------------- /README.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | {% capture my_include %}{% include_relative {{ site.data.package.readme }} %}{% endcapture %} 5 | {% if site.data.package.readme == 'README.md' %} 6 | {{ my_include | markdownify }} 7 | {% else %}
{{ my_include }}
{% endif %} 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHubPagesForGAP 2 | 3 | This repository can be used to quickly set up a website hosted by 4 | [GitHub](https://github.com/) for GAP packages using a GitHub repository. 5 | Specifically, this uses [GitHub pages](https://pages.github.com/) 6 | by adding a `gh-pages` branch to your package repository which 7 | contains data generated from the `PackageInfo.g` file of your package. 8 | 9 | ## Initial setup 10 | 11 | The easiest way to do this is to run the `setup-gh-pages` shell script 12 | provided in the [GitHubPagesForGAP]() from within a git clone of your 13 | package's GitHub repository. 14 | 15 | In case this does not work, or if you want to really know what's going 16 | on, you can also follow the manual instructions described after the fold. 17 | 18 | ------ 19 | 20 | The following instructions assume you do not already have a `gh-pages` 21 | branch in your repository. If you do have one, you should delete it before 22 | following these instructions. 23 | 24 | 1. Go into your clone of your package repository. 25 | 26 | 2. Setup a `gh-pages` branch in a `gh-pages` subdirectory. 27 | 28 | Users with a recent enough git version (recommended is >= 2.7.0) 29 | can do this using a "worktree", via the following commands: 30 | 31 | ```sh 32 | # Add a new remote pointing to the GitHubPagesForGAP repository 33 | git remote add -f gh-gap https://github.com/gap-system/GitHubPagesForGAP 34 | 35 | # Create a fresh gh-pages branch from the new remote 36 | git branch gh-pages gh-gap/gh-pages --no-track 37 | 38 | # Create a new worktree and change into it 39 | git worktree add gh-pages gh-pages 40 | cd gh-pages 41 | ``` 42 | 43 | Everybody else should instead do the following, with the URL 44 | in the initial clone command suitably adjusted: 45 | 46 | ```sh 47 | # Create a fresh clone of your repository, and change into it 48 | git clone https://github.com/USERNAME/REPOSITORY gh-pages 49 | cd gh-pages 50 | 51 | # Add a new remote pointing to the GitHubPagesForGAP repository 52 | git remote add gh-gap https://github.com/gap-system/GitHubPagesForGAP 53 | git fetch gh-gap 54 | 55 | # Create a fresh gh-pages branch from the new remote 56 | git checkout -b gh-pages gh-gap/gh-pages --no-track 57 | ``` 58 | 59 | 5. Add in copies of your `PackageInfo.g`, `README` (or `README.md`) and manual: 60 | 61 | ``` 62 | cp -f ../PackageInfo.g ../README* . 63 | cp -f ../doc/*.{css,html,js,txt} doc/ 64 | ``` 65 | 66 | 6. Now run the `update.g` GAP script. This extracts data from your 67 | `PackageInfo.g` file and puts that data into `_data/package.yml`. 68 | From this, the website template can populate the web pages with 69 | some sensible default values. 70 | 71 | ``` 72 | gap update.g 73 | ``` 74 | 75 | 7. Commit and push everything. 76 | 77 | ``` 78 | git add PackageInfo.g README* doc/ _data/package.yml 79 | git commit -m "Setup gh-pages based on GitHubPagesForGAP" 80 | git push --set-upstream origin gh-pages 81 | ``` 82 | 83 | That's it. You can now see your new package website under 84 | https://USERNAME.github.io/REPOSITORY/ (of course after 85 | adjusting USERNAME and REPOSITORY suitably). 86 | 87 | 88 | ## Using an existing gh-pages branch 89 | 90 | If you previously set up [GitHubPagesForGAP]() and thus already have a `gh-pages` 91 | branch, you may on occasion have need to make a fresh clone of your package 92 | repository, and then also would like to recreate the `gh-pages` directory. 93 | 94 | The easiest way to do this is to run the `setup-gh-pages` shell script 95 | provided in the [GitHubPagesForGAP]() from within a git clone of your 96 | package's GitHub repository. 97 | 98 | In case this does not work, or if you want to really know what's going 99 | on, you can also follow the manual instructions described after the fold. 100 | 101 | ------ 102 | 103 | Users with a recent enough git version (recommended is >= 2.7) 104 | can do this using a "worktree", via the following commands: 105 | 106 | ```sh 107 | git branch gh-pages origin/gh-pages 108 | git worktree add gh-pages gh-pages 109 | ``` 110 | 111 | If you are using an older version of git, you can instead use a second clone 112 | of your repository instead: 113 | 114 | ```sh 115 | git clone -b gh-pages https://github.com/USERNAME/REPOSITORY gh-pages 116 | ``` 117 | 118 | 119 | ## Adjusting the content and layout 120 | 121 | [GitHubPagesForGAP]() tries to automatically provide good defaults for 122 | most packages. However, you can tweak everything about it: 123 | 124 | * To adjust the page layout, edit the files `stylesheets/styles.css` 125 | and `_layouts/default.html`. 126 | 127 | * To adjust the content of the front page, edit `index.md` (resp. 128 | for the content of the sidebar, edit `_layouts/default.html` 129 | 130 | * You can also add additional pages, in various formats (HTML, 131 | Markdown, Textile, ...). 132 | 133 | For details, please consult the [Jekyll](http://jekyllrb.com/) 134 | manual. 135 | 136 | 137 | ## Testing the site locally 138 | 139 | If you would like to test your site on your own machine, without 140 | uploading it to GitHub (where it is visible to the public), you can do 141 | so by installing [Jekyll](http://jekyllrb.com/), the static web site 142 | generator used by GitHub to power GitHub Pages. 143 | 144 | Once you have installed Jekyll as described on its homepage, you can 145 | test the website locally as follows: 146 | 147 | 1. Go to the `gh-pages` directory we created above. 148 | 149 | 2. Run jekyll (this launches a tiny web server on your machine): 150 | 151 | ``` 152 | jekyll serve -w 153 | ``` 154 | 155 | 3. Visit the URL http://localhost:4000 in a web browser. 156 | 157 | 158 | ## Updating after you made a release 159 | 160 | Whenever you make a release of your package (and perhaps more often than 161 | that), you will want to update your website. The easiest way is to use 162 | the `release` script from the [ReleaseTools][], which performs all 163 | the necessary steps for you, except for the very last of actually 164 | publishing the package (and it can do even that for you, if you 165 | pass the `-p` option to it). 166 | 167 | However, you can also do it manually. The steps for doing it are quite 168 | similar to the above: 169 | 170 | 1. Go to the `gh-pages` directory we created above. 171 | 172 | 2. Add in copies of your `PackageInfo.g`, `README` (or `README.md`) and manual: 173 | 174 | ``` 175 | cp -f ../PackageInfo.g ../README* . 176 | cp -f ../doc/*.{css,html,js,txt} doc/ 177 | ``` 178 | 179 | 3. Now run the `update.g` GAP script. 180 | 181 | 4. Commit and push the work we have just done. 182 | 183 | ``` 184 | git add PackageInfo.g README* doc/ _data/package.yml 185 | git commit -m "Update web pages" 186 | git push 187 | ``` 188 | 189 | A few seconds after you have done this, your changes will be online 190 | under https://USERNAME.github.io/REPOSITORY/ . 191 | 192 | 193 | ## Updating to a newer version of GitHubPagesForGAP 194 | 195 | Normally you should not have to ever do this. However, if you really want to, 196 | you can attempt to update to the most recent version of [GitHubPagesForGAP]() via 197 | the following instructions. The difficulty of such an update depends on how 198 | much you tweaked the site after initially cloning [GitHubPagesForGAP](). 199 | 200 | 1. Go to the `gh-pages` directory we created above. 201 | Make sure that there are no uncommitted changes, as they will be lost 202 | when following these instructions. 203 | 204 | 2. Make sure the `gh-gap` remote exists and has the correct URL. If in doubt, 205 | just re-add it: 206 | ``` 207 | git remote remove gh-gap 208 | git remote add gh-gap https://github.com/gap-system/GitHubPagesForGAP 209 | ``` 210 | 211 | 3. Attempt to merge the latest GitHubPagesForGAP. 212 | ``` 213 | git pull gh-gap gh-pages 214 | ``` 215 | 216 | 4. If this produced no errors and just worked, skip to the next step. 217 | But it is quite likely that you will have conflicts in the file 218 | `_data/package.yml`, or in your `README` or `PackageInfo.g` files. 219 | These can usually be resolved by entering this: 220 | ``` 221 | cp ../PackageInfo.g ../README* . 222 | gap update.g 223 | git add PackageInfo.g README* _data/package.yml 224 | ``` 225 | If you are lucky, these were the only conflicts (check with `git status`). 226 | If no merge conflicts remain, finish with this command: 227 | ``` 228 | git commit -m "Merge gh-gap/gh-pages" 229 | ``` 230 | If you still have merge conflicts, and don't know how to resolve them, or 231 | get stuck some other way, you can abort the merge process and revert to the 232 | original state by issuing this command: 233 | ``` 234 | git merge --abort 235 | ``` 236 | 237 | 5. You should be done now. Don't forget to push your changes if you want them 238 | to become public. 239 | 240 | 241 | ## Packages using GitHubPagesForGAP 242 | 243 | The majority of packages listed on use 244 | [GitHubPagesForGAP](). If you want some specific examples, here are some: 245 | 246 | * 247 | * 248 | * 249 | * 250 | * 251 | * 252 | * 253 | * 254 | * 255 | 256 | 257 | ## Contact 258 | 259 | Please submit bug reports, suggestions for improvements and patches via 260 | the [issue tracker](https://github.com/gap-system/GitHubPagesForGAP/issues). 261 | 262 | You can also contact me directly via [email](max@quendi.de). 263 | 264 | Copyright (c) 2013-2025 Max Horn 265 | 266 | [GitHubPagesForGAP]: https://github.com/gap-system/GitHubPagesForGAP 267 | [ReleaseTools]: https://github.com/gap-system/ReleaseTools 268 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | markdown: kramdown 2 | highlighter: rouge 3 | -------------------------------------------------------------------------------- /_data/package.yml: -------------------------------------------------------------------------------- 1 | name: GitHubPagesForGAP 2 | version: "0.2" 3 | license: "0BSD" 4 | date: 2017-02-04 5 | description: | 6 | A GitHub Pages generator for GAP packages 7 | 8 | authors: 9 | - name: Max Horn 10 | url: http://www.quendi.de/math 11 | - name: A. U. Thor 12 | 13 | maintainers: 14 | - name: Max Horn 15 | url: http://www.quendi.de/math 16 | - name: Jan Itor 17 | 18 | GAP: ">=4.8.1" 19 | 20 | needed-pkgs: 21 | - name: "GAPDoc" 22 | version: ">= 1.2" 23 | url: "http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc" 24 | - name: "IO" 25 | version: ">= 4.1" 26 | url: "https://gap-packages.github.io/io" 27 | 28 | suggested-pkgs: 29 | - name: "orb" 30 | version: ">= 4.2" 31 | url: "https://gap-packages.github.io/orb" 32 | 33 | www: https://gap-system.github.io/GitHubPagesForGAP/ 34 | readme: README.md 35 | packageinfo: https://gap-system.github.io/GitHubPagesForGAP/PackageInfo.g 36 | github: https://github.com/gap-system/GitHubPagesForGAP 37 | 38 | downloads: 39 | - name: .tar.gz 40 | url: https://github.com/gap-system/GitHubPagesForGAP/releases/download/v0.2/GitHubPagesForGAP-0.2.tar.gz 41 | - name: .tar.bz2 42 | url: https://github.com/gap-system/GitHubPagesForGAP/releases/download/v0.2/GitHubPagesForGAP-0.2.tar.bz2 43 | 44 | abstract: | 45 | This is a pseudo package that contains no actual GAP code. Instead, it is a template for other GAP packages that allows to quickly setup GitHub Pages. 46 | 47 | status: other 48 | doc-html: doc/chap0.html 49 | doc-pdf: doc/manual.pdf 50 | keywords: | 51 | GitHub Pages, GAP. 52 | citeas: | 53 |

54 | [HTI17] Horn, M., Thor, A. U. and Itor, J., 55 | GitHubPagesForGAP, A GitHub Pages generator for GAP packages, 56 | Version 0.2 57 | (2017)
58 | (GAP package), 59 | https://gap-system.github.io/GitHubPagesForGAP/. 60 |

61 | 62 | 63 | bibtex: | 64 | @misc{ GitHubPagesForGAP0.2, 65 | author = {Horn, M. and Thor, A. U. and Itor, J.}, 66 | title = {{GitHubPagesForGAP}, A GitHub Pages generator for GAP packages, {V}ersion 0.2}, 67 | month = {Feb}, 68 | year = {2017}, 69 | note = {GAP package}, 70 | howpublished = {\href {https://gap-system.github.io/GitHubPagesForGAP/} 71 | {\texttt{https://gap-system.github.io/}\discretionary 72 | {}{}{}\texttt{GitHubPagesForGAP/}}}, 73 | keywords = {GitHub Pages; GAP}, 74 | printedkey = {HTI17} 75 | } 76 | 77 | -------------------------------------------------------------------------------- /_includes/button-bibtex.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | GAP package {{ site.data.package.name }} 6 | 7 | {% if site.data.package.keywords and site.data.package.keywords.size > 0 %} 8 | 9 | {% endif %} 10 | 11 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 |
28 |
29 |

{{ site.data.package.name }}

30 |

{{ site.data.package.description }}

31 |

Version {{site.data.package.version}}
32 | Released {{site.data.package.date}}

33 | 34 | 44 | 45 |

This project is maintained by 46 | {% for person in site.data.package.maintainers %} 47 | {% if person.url %} 48 | {{ person.name }}{% else %} 49 | {{ person.name }} 50 | {% endif %} 51 | {%- unless forloop.last -%}, {%- endunless -%} 52 | {% endfor %} 53 |

54 | 55 | 56 |
57 |
58 | 59 | {{ content }} 60 | 61 |
62 |
63 |

Hosted on GitHub Pages, 64 | based on GitHubPagesForGAP 65 | using the Dinky theme

66 |

Last updated: {{ 'now' | date: "%Y-%m-%d %H:%M" }}

67 |
68 |
69 | 70 | 71 | 72 | 73 | -------------------------------------------------------------------------------- /doc/chap0.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Placeholder 6 | 7 | 8 |

Placeholder!

9 | Back 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/chap0.txt: -------------------------------------------------------------------------------- 1 | Placeholder 2 | -------------------------------------------------------------------------------- /doc/chap0_mj.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Placeholder 6 | 7 | 8 |

Placeholder!

9 | Back 10 | 11 | 12 | -------------------------------------------------------------------------------- /images/arrow-down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gap-system/GitHubPagesForGAP/a46714bbc0f715b129fba1356a6200e21ae9e30c/images/arrow-down.png -------------------------------------------------------------------------------- /images/octocat-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gap-system/GitHubPagesForGAP/a46714bbc0f715b129fba1356a6200e21ae9e30c/images/octocat-small.png -------------------------------------------------------------------------------- /index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | # GAP Package {{site.data.package.name}} 6 | 7 | {{site.data.package.abstract}} 8 | 9 | The current version of this package is version {{site.data.package.version}}, released on {{site.data.package.date}}. 10 | For more information, please refer to [the package manual]({{site.data.package.doc-html}}). 11 | There is also a [README](README.html) file. 12 | 13 | {% if site.data.package.license %} 14 | License: [{{ site.data.package.license }}](https://spdx.org/licenses/{{ site.data.package.license }}) 15 | {% endif %} 16 | 17 | ## Dependencies 18 | 19 | This package requires GAP version {{site.data.package.GAP}} 20 | {% if site.data.package.needed-pkgs %} 21 | The following other GAP packages are needed: 22 | {% for pkg in site.data.package.needed-pkgs %} 23 | - {% if pkg.url %}{{ pkg.name }} {% else %}{{ pkg.name }} {% endif %} 24 | {{- pkg.version -}} 25 | {% endfor %} 26 | {% endif %} 27 | {% if site.data.package.suggested-pkgs %} 28 | The following additional GAP packages are not required, but suggested: 29 | {% for pkg in site.data.package.suggested-pkgs %} 30 | - {% if pkg.url %}{{ pkg.name }} {% else %}{{ pkg.name }} {% endif %} 31 | {{- pkg.version -}} 32 | {% endfor %} 33 | {% endif %} 34 | 35 | 36 | ## Author{% if site.data.package.authors.size != 1 %}s{% endif %} 37 | {% for person in site.data.package.authors %} 38 | {% if person.url %}{{ person.name }}{% else %}{{ person.name }}{% endif %} 39 | {%- if forloop.last -%}.{% else %}, {%- endif -%} 40 | {% endfor %} 41 | 42 | {% if site.data.package.contributors and site.data.package.contributors.size > 0 %} 43 | ## Contributor{% if site.data.package.contributors.size != 1 %}s{% endif %} 44 | {% for person in site.data.package.contributors %} 45 | {% if person.url %}{{ person.name }}{% else %}{{ person.name }}{% endif %} 46 | {%- if forloop.last -%}.{% else %}, {%- endif -%} 47 | {% endfor %} 48 | {% endif %} 49 | 50 | {% if site.data.package.citeas %} 51 | ## Citing 52 | 53 | Please, cite this package as 54 | 55 | {{site.data.package.citeas}} 56 | 57 | You can get more info by typing `Cite("{{ site.data.package.name }}");` in the gap prompt. 58 | 59 | {% include button-bibtex.html %} 60 | 61 | {% endif %} 62 | 63 | 64 | {% if site.github.issues_url %} 65 | ## Feedback 66 | 67 | For bug reports, feature requests and suggestions, please use the 68 | [issue tracker]({{site.github.issues_url}}). 69 | {% endif %} 70 | -------------------------------------------------------------------------------- /javascripts/scale.fix.js: -------------------------------------------------------------------------------- 1 | fixScale = function(doc) { 2 | 3 | var addEvent = 'addEventListener', 4 | type = 'gesturestart', 5 | qsa = 'querySelectorAll', 6 | scales = [1, 1], 7 | meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; 8 | 9 | function fix() { 10 | meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; 11 | doc.removeEventListener(type, fix, true); 12 | } 13 | 14 | if ((meta = meta[meta.length - 1]) && addEvent in doc) { 15 | fix(); 16 | scales = [.25, 1.6]; 17 | doc[addEvent](type, fix, true); 18 | } 19 | 20 | }; -------------------------------------------------------------------------------- /setup-gh-pages: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Run this script from within the root directory of the git clone of 4 | # your package in order to create a gh-pages subdirectory, containing a 5 | # checkout of your gh-pages branch. If no gh-pages branch exists, it 6 | # also creates one. 7 | # 8 | # Copyright (c) 2018-2024 Max Horn 9 | # 10 | # This program is free software; you can redistribute it and/or 11 | # modify it under the terms of the GNU General Public License 12 | # as published by the Free Software Foundation; either version 2 13 | # of the License, or (at your option) any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public 21 | # License along with this program; if not, write to the Free 22 | # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 23 | # Boston, MA 02110-1301, USA. 24 | # 25 | 26 | set -e 27 | 28 | ###################################################################### 29 | # 30 | # Various little helper functions 31 | 32 | 33 | # print notices in green 34 | notice() { 35 | printf '\033[32m%s\033[0m\n' "$*" 36 | } 37 | 38 | # print warnings in yellow 39 | warning() { 40 | printf '\033[33mWARNING: %s\033[0m\n' "$*" 41 | } 42 | 43 | # print error in red and exit 44 | error() { 45 | printf '\033[31mERROR: %s\033[0m\n' "$*" 46 | exit 1 47 | } 48 | 49 | ###################################################################### 50 | 51 | # error early on if there already is a gh-pages dir 52 | [[ -d gh-pages ]] && error "You already have a gh-pages directory" 53 | 54 | # TODO: make it configurable which remote is used (default: origin) 55 | remote=${remote:-origin} 56 | 57 | # TODO: make it configurable how/which gap is used 58 | GAP=${GAP:-gap} 59 | 60 | # Based on the git documentation and some experiments, `git worktree add` 61 | # in git 2.7 and newer works as desired. It is possible that 2.6 also 62 | # did, but since I can't easily test that right now, I'll err on the 63 | # safe 64 | git_major=$(git --version | sed -E 's/[^0-9]+([0-9]+).*/\1/') 65 | git_minor=$(git --version | sed -E 's/[^0-9]+[0-9]+\.([0-9]+).*/\1/') 66 | if [[ $git_major -gt 2 || ($git_major -eq 2 && $git_minor -ge 7) ]] 67 | then 68 | UseWorktree=Yes 69 | else 70 | UseWorktree=No 71 | fi 72 | notice "Detected git ${git_major}.${git_minor}, using git worktree: ${UseWorktree}" 73 | 74 | # TODO: add /gh-pages/ to .gitignore if it is not already in there 75 | 76 | if [[ ${UseWorktree} = No ]] 77 | then 78 | # Create a fresh clone of your repository, and change into it 79 | url=$(git config --get remote.${remote}.url) 80 | git clone ${url} gh-pages 81 | cd gh-pages 82 | fi 83 | 84 | # Add a new remote pointing to the GitHubPagesForGAP repository 85 | git remote add -f gh-gap https://github.com/gap-system/GitHubPagesForGAP 2>/dev/null || : 86 | 87 | 88 | # if there is already a gh-pages branch, do nothing; otherwise, if 89 | # there is a ${remote}/gh-pages branch, create `gh-pages` tracking 90 | # the remote; otherwise, create a fresh `gh-pages` branch 91 | IsNewBranch=No 92 | if git rev-parse -q --verify gh-pages 93 | then 94 | notice "Using existing gh-pages branch" 95 | else 96 | # fetch remote changes, so that we can see if there 97 | # is a remote gh-pages branch 98 | git fetch ${remote} 99 | 100 | if git rev-parse -q --verify ${remote}/gh-pages 101 | then 102 | notice "Track existing remote gh-pages branch" 103 | git branch --track gh-pages ${remote}/gh-pages 104 | else 105 | notice "Create a fresh gh-pages branch" 106 | git branch --no-track gh-pages gh-gap/gh-pages 107 | 108 | # ... then push it and set up tracking 109 | git push --set-upstream ${remote} gh-pages 110 | 111 | # remember that this is a new branch 112 | IsNewBranch=Yes 113 | fi 114 | fi 115 | 116 | if [[ ${UseWorktree} = Yes ]] 117 | then 118 | # create a new worktree and change into it 119 | git worktree add gh-pages gh-pages 120 | cd gh-pages 121 | fi 122 | 123 | if [[ ${IsNewBranch} = Yes ]] 124 | then 125 | notice "Updating new gh-pages branch" 126 | 127 | cp -f ../PackageInfo.g ../README* . 128 | 129 | [[ -d doc ]] && git rm -rf doc 130 | mkdir -p doc/ 131 | cp -f ../doc/*.{css,html,js,txt} doc/ || : 132 | 133 | [[ -d ../htm ]] && cp -r ../htm . 134 | 135 | ${GAP} update.g 136 | 137 | git add . 138 | git commit -m "Setup gh-pages based on GitHubPagesForGAP" 139 | git push --set-upstream ${remote} gh-pages 140 | fi 141 | -------------------------------------------------------------------------------- /stylesheets/pygment_trac.css: -------------------------------------------------------------------------------- 1 | .highlight { background: #ffffff; } 2 | .highlight .c { color: #999988; font-style: italic } /* Comment */ 3 | .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ 4 | .highlight .k { font-weight: bold } /* Keyword */ 5 | .highlight .o { font-weight: bold } /* Operator */ 6 | .highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ 7 | .highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ 8 | .highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ 9 | .highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ 10 | .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ 11 | .highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #aa0000 } /* Generic.Error */ 14 | .highlight .gh { color: #999999 } /* Generic.Heading */ 15 | .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ 16 | .highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ 17 | .highlight .go { color: #888888 } /* Generic.Output */ 18 | .highlight .gp { color: #555555 } /* Generic.Prompt */ 19 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 20 | .highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */ 21 | .highlight .gt { color: #aa0000 } /* Generic.Traceback */ 22 | .highlight .kc { font-weight: bold } /* Keyword.Constant */ 23 | .highlight .kd { font-weight: bold } /* Keyword.Declaration */ 24 | .highlight .kn { font-weight: bold } /* Keyword.Namespace */ 25 | .highlight .kp { font-weight: bold } /* Keyword.Pseudo */ 26 | .highlight .kr { font-weight: bold } /* Keyword.Reserved */ 27 | .highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ 28 | .highlight .m { color: #009999 } /* Literal.Number */ 29 | .highlight .s { color: #d14 } /* Literal.String */ 30 | .highlight .na { color: #008080 } /* Name.Attribute */ 31 | .highlight .nb { color: #0086B3 } /* Name.Builtin */ 32 | .highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ 33 | .highlight .no { color: #008080 } /* Name.Constant */ 34 | .highlight .ni { color: #800080 } /* Name.Entity */ 35 | .highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ 36 | .highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ 37 | .highlight .nn { color: #555555 } /* Name.Namespace */ 38 | .highlight .nt { color: #000080 } /* Name.Tag */ 39 | .highlight .nv { color: #008080 } /* Name.Variable */ 40 | .highlight .ow { font-weight: bold } /* Operator.Word */ 41 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 42 | .highlight .mf { color: #009999 } /* Literal.Number.Float */ 43 | .highlight .mh { color: #009999 } /* Literal.Number.Hex */ 44 | .highlight .mi { color: #009999 } /* Literal.Number.Integer */ 45 | .highlight .mo { color: #009999 } /* Literal.Number.Oct */ 46 | .highlight .sb { color: #d14 } /* Literal.String.Backtick */ 47 | .highlight .sc { color: #d14 } /* Literal.String.Char */ 48 | .highlight .sd { color: #d14 } /* Literal.String.Doc */ 49 | .highlight .s2 { color: #d14 } /* Literal.String.Double */ 50 | .highlight .se { color: #d14 } /* Literal.String.Escape */ 51 | .highlight .sh { color: #d14 } /* Literal.String.Heredoc */ 52 | .highlight .si { color: #d14 } /* Literal.String.Interpol */ 53 | .highlight .sx { color: #d14 } /* Literal.String.Other */ 54 | .highlight .sr { color: #009926 } /* Literal.String.Regex */ 55 | .highlight .s1 { color: #d14 } /* Literal.String.Single */ 56 | .highlight .ss { color: #990073 } /* Literal.String.Symbol */ 57 | .highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ 58 | .highlight .vc { color: #008080 } /* Name.Variable.Class */ 59 | .highlight .vg { color: #008080 } /* Name.Variable.Global */ 60 | .highlight .vi { color: #008080 } /* Name.Variable.Instance */ 61 | .highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ 62 | 63 | .type-csharp .highlight .k { color: #0000FF } 64 | .type-csharp .highlight .kt { color: #0000FF } 65 | .type-csharp .highlight .nf { color: #000000; font-weight: normal } 66 | .type-csharp .highlight .nc { color: #2B91AF } 67 | .type-csharp .highlight .nn { color: #000000 } 68 | .type-csharp .highlight .s { color: #A31515 } 69 | .type-csharp .highlight .sc { color: #A31515 } 70 | -------------------------------------------------------------------------------- /stylesheets/styles.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Arvo:400,700,400italic); 2 | 3 | /* MeyerWeb Reset */ 4 | 5 | html, body, div, span, applet, object, iframe, 6 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 7 | a, abbr, acronym, address, big, cite, code, 8 | del, dfn, em, img, ins, kbd, q, s, samp, 9 | small, strike, strong, sub, sup, tt, var, 10 | b, u, i, center, 11 | dl, dt, dd, ol, ul, li, 12 | fieldset, form, label, legend, 13 | table, caption, tbody, tfoot, thead, tr, th, td, 14 | article, aside, canvas, details, embed, 15 | figure, figcaption, footer, header, hgroup, 16 | menu, nav, output, ruby, section, summary, 17 | time, mark, audio, video { 18 | margin: 0; 19 | padding: 0; 20 | border: 0; 21 | font: inherit; 22 | vertical-align: baseline; 23 | } 24 | 25 | 26 | /* Base text styles */ 27 | 28 | body { 29 | padding:10px 50px 0 0; 30 | font-family:"Helvetica Neue", Helvetica, Arial, sans-serif; 31 | font-size: 14px; 32 | color: #232323; 33 | background-color: #FBFAF7; 34 | margin: 0; 35 | line-height: 1.8em; 36 | -webkit-font-smoothing: antialiased; 37 | 38 | } 39 | 40 | h1, h2, h3, h4, h5, h6 { 41 | color:#232323; 42 | margin:36px 0 10px; 43 | } 44 | 45 | p, ul, ol, table, dl { 46 | margin:0 0 22px; 47 | } 48 | 49 | h1, h2, h3 { 50 | font-family: Arvo, Monaco, serif; 51 | line-height:1.3; 52 | font-weight: normal; 53 | } 54 | 55 | h1,h2, h3 { 56 | display: block; 57 | border-bottom: 1px solid #ccc; 58 | padding-bottom: 5px; 59 | } 60 | 61 | h1 { 62 | font-size: 30px; 63 | } 64 | 65 | h2 { 66 | font-size: 24px; 67 | } 68 | 69 | h3 { 70 | font-size: 18px; 71 | } 72 | 73 | h4, h5, h6 { 74 | font-family: Arvo, Monaco, serif; 75 | font-weight: 700; 76 | } 77 | 78 | a { 79 | color:#C30000; 80 | font-weight:200; 81 | text-decoration:none; 82 | } 83 | 84 | a:hover { 85 | text-decoration: underline; 86 | } 87 | 88 | a small { 89 | font-size: 12px; 90 | } 91 | 92 | em { 93 | font-style: italic; 94 | } 95 | 96 | strong { 97 | font-weight:700; 98 | } 99 | 100 | ul { 101 | list-style: inside; 102 | padding-left: 25px; 103 | } 104 | 105 | ol { 106 | list-style: decimal inside; 107 | padding-left: 20px; 108 | } 109 | 110 | blockquote { 111 | margin: 0; 112 | padding: 0 0 0 20px; 113 | font-style: italic; 114 | } 115 | 116 | dl, dt, dd, dl p { 117 | font-color: #444; 118 | } 119 | 120 | dl dt { 121 | font-weight: bold; 122 | } 123 | 124 | dl dd { 125 | padding-left: 20px; 126 | font-style: italic; 127 | } 128 | 129 | dl p { 130 | padding-left: 20px; 131 | font-style: italic; 132 | } 133 | 134 | hr { 135 | border:0; 136 | background:#ccc; 137 | height:1px; 138 | margin:0 0 24px; 139 | } 140 | 141 | /* Images */ 142 | 143 | img { 144 | position: relative; 145 | margin: 0 auto; 146 | max-width: 560px; 147 | padding: 5px; 148 | margin: 10px 0 32px 0; 149 | border: 1px solid #ccc; 150 | } 151 | 152 | p img { 153 | display: inline; 154 | margin: 0; 155 | padding: 0; 156 | vertical-align: middle; 157 | text-align: center; 158 | border: none; 159 | } 160 | 161 | /* Code blocks */ 162 | 163 | code, pre { 164 | font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; 165 | color:#000; 166 | font-size:14px; 167 | } 168 | 169 | pre { 170 | padding: 4px 12px; 171 | background: #FDFEFB; 172 | border-radius:4px; 173 | border:1px solid #D7D8C8; 174 | overflow: auto; 175 | overflow-y: hidden; 176 | margin-bottom: 32px; 177 | } 178 | 179 | 180 | /* Tables */ 181 | 182 | table { 183 | width:100%; 184 | } 185 | 186 | table { 187 | border: 1px solid #ccc; 188 | margin-bottom: 32px; 189 | text-align: left; 190 | } 191 | 192 | th { 193 | font-family: 'Arvo', Helvetica, Arial, sans-serif; 194 | font-size: 18px; 195 | font-weight: normal; 196 | padding: 10px; 197 | background: #232323; 198 | color: #FDFEFB; 199 | } 200 | 201 | td { 202 | padding: 10px; 203 | background: #ccc; 204 | } 205 | 206 | 207 | /* Wrapper */ 208 | .wrapper { 209 | width:960px; 210 | } 211 | 212 | 213 | /* Header */ 214 | 215 | header { 216 | background-color: #171717; 217 | color: #FDFDFB; 218 | width:260px; 219 | float:left; 220 | position:fixed; 221 | border: 1px solid #000; 222 | -webkit-border-top-right-radius: 4px; 223 | -webkit-border-bottom-right-radius: 4px; 224 | -moz-border-radius-topright: 4px; 225 | -moz-border-radius-bottomright: 4px; 226 | border-top-right-radius: 4px; 227 | border-bottom-right-radius: 4px; 228 | padding: 34px 25px 22px 50px; 229 | margin: 30px 25px 0 0; 230 | -webkit-font-smoothing: antialiased; 231 | } 232 | 233 | p.header { 234 | font-size: 16px; 235 | } 236 | 237 | h1.header { 238 | font-family: Arvo, sans-serif; 239 | font-size: 30px; 240 | font-weight: 300; 241 | line-height: 1.3em; 242 | border-bottom: none; 243 | margin-top: 0; 244 | } 245 | 246 | 247 | h1.header, a.header, a.name, header a{ 248 | color: #fff; 249 | } 250 | 251 | a.header { 252 | text-decoration: underline; 253 | } 254 | 255 | a.name { 256 | white-space: nowrap; 257 | } 258 | 259 | header ul { 260 | list-style:none; 261 | padding:0; 262 | } 263 | 264 | header li { 265 | list-style-type: none; 266 | width:148px; 267 | height:15px; 268 | margin-bottom: 12px; 269 | line-height: 1em; 270 | padding: 6px 6px 6px 7px; 271 | 272 | background: #AF0011; 273 | background: -moz-linear-gradient(top, #AF0011 0%, #820011 100%); 274 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); 275 | background: -webkit-linear-gradient(top, #AF0011 0%,#820011 100%); 276 | background: -o-linear-gradient(top, #AF0011 0%,#820011 100%); 277 | background: -ms-linear-gradient(top, #AF0011 0%,#820011 100%); 278 | background: linear-gradient(top, #AF0011 0%,#820011 100%); 279 | 280 | border-radius:4px; 281 | border:1px solid #0D0D0D; 282 | 283 | -webkit-box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1); 284 | box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1); 285 | 286 | } 287 | 288 | header li:hover { 289 | background: #C3001D; 290 | background: -moz-linear-gradient(top, #C3001D 0%, #950119 100%); 291 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd)); 292 | background: -webkit-linear-gradient(top, #C3001D 0%,#950119 100%); 293 | background: -o-linear-gradient(top, #C3001D 0%,#950119 100%); 294 | background: -ms-linear-gradient(top, #C3001D 0%,#950119 100%); 295 | background: linear-gradient(top, #C3001D 0%,#950119 100%); 296 | } 297 | 298 | a.buttons { 299 | -webkit-font-smoothing: antialiased; 300 | background: url(../images/arrow-down.png) no-repeat; 301 | font-weight: normal; 302 | text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0; 303 | padding: 2px 2px 2px 22px; 304 | height: 30px; 305 | } 306 | 307 | a.github { 308 | background: url(../images/octocat-small.png) no-repeat 1px; 309 | } 310 | 311 | a.buttons:hover { 312 | color: #fff; 313 | text-decoration: none; 314 | } 315 | 316 | 317 | /* Section - for main page content */ 318 | 319 | section { 320 | width:560px; 321 | float:right; 322 | padding-bottom:50px; 323 | } 324 | 325 | 326 | /* Footer */ 327 | 328 | footer { 329 | width:260px; 330 | float:left; 331 | position:fixed; 332 | bottom:10px; 333 | padding-left: 50px; 334 | } 335 | 336 | @media print, screen and (max-width: 960px) { 337 | 338 | div.wrapper { 339 | width:auto; 340 | margin:0; 341 | } 342 | 343 | header, section, footer { 344 | float:none; 345 | position:static; 346 | width:auto; 347 | } 348 | 349 | footer { 350 | border-top: 1px solid #ccc; 351 | margin:0 84px 0 50px; 352 | padding:0; 353 | } 354 | 355 | header { 356 | padding-right:320px; 357 | } 358 | 359 | section { 360 | padding:20px 84px 20px 50px; 361 | margin:0 0 20px; 362 | } 363 | 364 | header a small { 365 | display:inline; 366 | } 367 | 368 | header ul { 369 | position:absolute; 370 | right:130px; 371 | top:84px; 372 | } 373 | } 374 | 375 | @media print, screen and (max-width: 720px) { 376 | body { 377 | word-wrap:break-word; 378 | } 379 | 380 | header { 381 | padding:10px 20px 0; 382 | margin-right: 0; 383 | } 384 | 385 | section { 386 | padding:10px 0 10px 20px; 387 | margin:0 0 30px; 388 | } 389 | 390 | footer { 391 | margin: 0 0 0 30px; 392 | } 393 | 394 | header ul, header p.view { 395 | position:static; 396 | } 397 | } 398 | 399 | @media print, screen and (max-width: 480px) { 400 | 401 | header ul li.download { 402 | display:none; 403 | } 404 | 405 | footer { 406 | margin: 0 0 0 20px; 407 | } 408 | 409 | footer a{ 410 | display:block; 411 | } 412 | 413 | } 414 | 415 | @media print { 416 | body { 417 | padding:0.4in; 418 | font-size:12pt; 419 | color:#444; 420 | } 421 | } -------------------------------------------------------------------------------- /update.g: -------------------------------------------------------------------------------- 1 | # 2 | # GitHubPagesForGAP - a template for using GitHub Pages within GAP packages 3 | # 4 | # Copyright (c) 2013-2024 Max Horn 5 | # 6 | # This program is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU General Public License 8 | # as published by the Free Software Foundation; either version 2 9 | # of the License, or (at your option) any later version. 10 | # 11 | # This program is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program; if not, write to the Free Software 18 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | # 20 | 21 | # Parse PackageInfo.g and regenerate _data/package.yml from it. 22 | 23 | PrintPeopleList := function(stream, people) 24 | local p; 25 | for p in people do 26 | AppendTo(stream, " - name: ", p.FirstNames, " ", p.LastName, "\n"); 27 | if IsBound(p.WWWHome) then 28 | AppendTo(stream, " url: ", p.WWWHome, "\n"); 29 | elif IsBound(p.Email) then 30 | AppendTo(stream, " url: mailto:", p.Email, "\n"); 31 | fi; 32 | od; 33 | AppendTo(stream, "\n"); 34 | end; 35 | 36 | PrintPackageList := function(stream, pkgs) 37 | local p, pkginfo; 38 | for p in pkgs do 39 | AppendTo(stream, " - name: \"", p[1], "\"\n"); 40 | AppendTo(stream, " version: \"", p[2], "\"\n"); 41 | pkginfo := PackageInfo(p[1]); 42 | if Length(pkginfo) > 0 and IsBound(pkginfo[1].PackageWWWHome) then 43 | AppendTo(stream, " url: \"", pkginfo[1].PackageWWWHome, "\"\n"); 44 | fi; 45 | od; 46 | AppendTo(stream, "\n"); 47 | end; 48 | 49 | # verify date is of the form YYYY-MM-DD 50 | IsValidISO8601Date := function(date) 51 | local day, month, year; 52 | if Length(date) <> 10 then return false; fi; 53 | if date[5] <> '-' or date[8] <> '-' then return false; fi; 54 | if not ForAll(date{[1,2,3,4,6,7,9,10]}, IsDigitChar) then 55 | return false; 56 | fi; 57 | date := List(SplitString(date, "-"), Int); 58 | day := date[3]; 59 | month := date[2]; 60 | year := date[1]; 61 | return month in [1..12] and day in [1..DaysInMonth(month, year)]; 62 | end; 63 | 64 | GeneratePackageYML:=function(pkg) 65 | local stream, date, authors, maintainers, contributors, formats, f, tmp; 66 | 67 | stream := OutputTextFile("_data/package.yml", false); 68 | SetPrintFormattingStatus(stream, false); 69 | 70 | AppendTo(stream, "name: ", pkg.PackageName, "\n"); 71 | AppendTo(stream, "version: \"", pkg.Version, "\"\n"); 72 | if IsBound(pkg.License) then 73 | AppendTo(stream, "license: \"", pkg.License, "\"\n"); 74 | fi; 75 | 76 | # convert date from DD/MM/YYYY to ISO 8601, i.e. YYYY-MM-DD 77 | # 78 | # in the future, GAP might support ISO 8601 dates in PackageInfo.g, 79 | # so be prepared to accept that 80 | date := pkg.Date; 81 | tmp := SplitString(pkg.Date, "/"); 82 | if Length(tmp) = 3 then 83 | # pad month and date if necessary 84 | if Length(tmp[1]) = 1 then 85 | tmp[1] := Concatenation("0", tmp[1]); 86 | fi; 87 | if Length(tmp[2]) = 1 then 88 | tmp[2] := Concatenation("0", tmp[2]); 89 | fi; 90 | date := Concatenation(tmp[3], "-", tmp[2], "-", tmp[1]); 91 | fi; 92 | if not IsValidISO8601Date(date) then 93 | Error("malformed release date ", pkg.Date); 94 | fi; 95 | 96 | AppendTo(stream, "date: ", date, "\n"); 97 | AppendTo(stream, "description: |\n"); 98 | AppendTo(stream, " ", pkg.Subtitle, "\n"); 99 | AppendTo(stream, "\n"); 100 | 101 | authors := Filtered(pkg.Persons, p -> p.IsAuthor); 102 | if Length(authors) > 0 then 103 | AppendTo(stream, "authors:\n"); 104 | PrintPeopleList(stream, authors); 105 | fi; 106 | 107 | maintainers := Filtered(pkg.Persons, p -> p.IsMaintainer); 108 | if Length(maintainers) > 0 then 109 | AppendTo(stream, "maintainers:\n"); 110 | PrintPeopleList(stream, maintainers); 111 | fi; 112 | 113 | contributors := Filtered(pkg.Persons, p -> not p.IsMaintainer and not p.IsAuthor); 114 | if Length(contributors) > 0 then 115 | AppendTo(stream, "contributors:\n"); 116 | PrintPeopleList(stream, contributors); 117 | fi; 118 | 119 | if IsBound(pkg.Dependencies.GAP) then 120 | AppendTo(stream, "GAP: \"", pkg.Dependencies.GAP, "\"\n\n"); 121 | fi; 122 | 123 | if IsBound(pkg.Dependencies.NeededOtherPackages) and 124 | Length(pkg.Dependencies.NeededOtherPackages) > 0 then 125 | AppendTo(stream, "needed-pkgs:\n"); 126 | PrintPackageList(stream, pkg.Dependencies.NeededOtherPackages); 127 | fi; 128 | 129 | if IsBound(pkg.Dependencies.SuggestedOtherPackages) and 130 | Length(pkg.Dependencies.SuggestedOtherPackages) > 0 then 131 | AppendTo(stream, "suggested-pkgs:\n"); 132 | PrintPackageList(stream, pkg.Dependencies.SuggestedOtherPackages); 133 | fi; 134 | 135 | AppendTo(stream, "www: ", pkg.PackageWWWHome, "\n"); 136 | tmp := SplitString(pkg.README_URL,"/"); 137 | tmp := tmp[Length(tmp)]; # extract README filename (typically "README" or "README.md") 138 | AppendTo(stream, "readme: ", tmp, "\n"); 139 | AppendTo(stream, "packageinfo: ", pkg.PackageInfoURL, "\n"); 140 | if IsBound(pkg.GithubWWW) then 141 | AppendTo(stream, "github: ", pkg.GithubWWW, "\n"); 142 | fi; 143 | AppendTo(stream, "\n"); 144 | 145 | formats := SplitString(pkg.ArchiveFormats, " "); 146 | if Length(formats) > 0 then 147 | AppendTo(stream, "downloads:\n"); 148 | for f in formats do 149 | AppendTo(stream, " - name: ", f, "\n"); 150 | AppendTo(stream, " url: ", pkg.ArchiveURL, f, "\n"); 151 | od; 152 | AppendTo(stream, "\n"); 153 | fi; 154 | 155 | AppendTo(stream, "abstract: |\n"); 156 | for tmp in SplitString(pkg.AbstractHTML,"\n") do 157 | AppendTo(stream, " ", tmp, "\n"); 158 | od; 159 | AppendTo(stream, "\n"); 160 | 161 | if IsBound(pkg.Status) then 162 | AppendTo(stream, "status: ", pkg.Status, "\n"); 163 | fi; 164 | if IsRecord(pkg.PackageDoc) then 165 | AppendTo(stream, "doc-html: ", pkg.PackageDoc.HTMLStart, "\n"); 166 | AppendTo(stream, "doc-pdf: ", pkg.PackageDoc.PDFFile, "\n"); 167 | else 168 | Assert(0, IsList(pkg.PackageDoc)); 169 | AppendTo(stream, "doc-html: ", pkg.PackageDoc[1].HTMLStart, "\n"); 170 | AppendTo(stream, "doc-pdf: ", pkg.PackageDoc[1].PDFFile, "\n"); 171 | if Length(pkg.PackageDoc) > 1 then 172 | Print("Warning, this package has more than one help book!\n"); 173 | fi; 174 | fi; 175 | 176 | if IsBound(pkg.Keywords) and 177 | Length(pkg.Keywords) > 0 then 178 | AppendTo(stream, "keywords: |\n"); 179 | AppendTo(stream, " ", JoinStringsWithSeparator(pkg.Keywords,", "),".\n"); 180 | fi; 181 | 182 | AppendTo(stream, "citeas: |\n"); 183 | for tmp in SplitString(StringBibXMLEntry(ParseBibXMLextString(BibEntry(pkg)).entries[1],"HTML"),"\n") do 184 | AppendTo(stream, " ", tmp, "\n"); 185 | od; 186 | AppendTo(stream, "\n"); 187 | 188 | AppendTo(stream, "bibtex: |\n"); 189 | for tmp in SplitString(StringBibXMLEntry(ParseBibXMLextString(BibEntry(pkg)).entries[1],"BibTeX"),"\n") do 190 | AppendTo(stream, " ", tmp, "\n"); 191 | od; 192 | AppendTo(stream, "\n"); 193 | 194 | CloseStream(stream); 195 | end; 196 | Read("PackageInfo.g"); 197 | GeneratePackageYML(GAPInfo.PackageInfoCurrent); 198 | QUIT; 199 | --------------------------------------------------------------------------------