-
Notifications
You must be signed in to change notification settings - Fork 2
CRMap #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
CRMap #4
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
b272fcb
dynamic landing page
stm2 b179b53
created an example faction
stm2 32f5097
page title
stm2 003636e
working cr to svg conversion
stm2 e2ddb4a
multiple crs per page
stm2 ccebd36
separate shortcodes; more options; refactored report logic
stm2 8ff7498
display commands
stm2 16bc5c7
refactored event handlers
stm2 b8f255a
refactored showDetails
stm2 cc7d5a9
cleaning up; refactoring debug; safer captions
stm2 1b1413f
moving things around ...
stm2 8e3e64b
moving css
stm2 891cf58
remember last crid; allow specifying placeholder
stm2 7b82d75
updated README
stm2 38e0471
include css/js only if used
stm2 6c595ce
resolved code-review issues:
stm2 b4241c4
added version number
stm2 30dfd75
add all reports to reports directory for easier inclusion in tutorials
stm2 f1372cf
added orderfile shortcode for rendering an orderfile with comments
stm2 50cadb6
refactored: moved things around in module.exports
stm2 4e3c512
sorting out path usage
stm2 3bcd5fc
feature: show NRs; select sections, line ranges
stm2 e5e02e7
amend debug output
stm2 8c566d4
updated version to 0.2.0
stm2 87e57c4
inserted prev/next links in post layout
stm2 72a54a3
set default layout to de; fixed dates
stm2 54d1079
fixed elevent-plugin-page-assets in directory mode with patch-package
stm2 27f9b6c
changed page-assets options to include .cr/.nr/.txt
stm2 b02b6b1
got rid of deprecated | url filter in favor of HTMLBase
stm2 beb368f
fallback to site.locale in dateReadable
stm2 3650707
created overview-layout for race landing pages
stm2 dd3b0f3
bumped version and updated README
stm2 bc1499d
transform links to relative paths (works with files and path prefixes)
stm2 56624c9
unified warnings
stm2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| # We don't want Eleventy to include the README.md as a website content file | ||
| README.md | ||
|
|
||
| # template directory: help for authors | ||
| # template/ | ||
|
|
||
| # Unit tests should be ignored by Eleventy | ||
| tests/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,139 @@ | ||
| # eleventy-blog | ||
| An example blog site using Eleventy that covers fundamental functionality. | ||
| # Eressea Tutorial 2024 | ||
|
|
||
| The following article accompanies this repo. | ||
| These are the diaries for the 2024 Eressea Tutorial. | ||
|
|
||
| ## Creating A Blog With Eleventy | ||
| ## How to add your diary | ||
|
|
||
| ### Create your own fork of the repository | ||
|
|
||
| - Create a github account. | ||
|
|
||
| - Fork this repository by clicking on the [Fork Link in Github](https://github.com/eressea/tutorials/fork). This will create your private copy of the whole thing. | ||
|
|
||
| ### Editing your content | ||
|
|
||
| - You can edit it directly on github or *clone* it to your computer and edit it there. Cloning requires more steps, but is ultimately more flexible. It requires you to learn a bit about version control with [git](https://git-scm.com/docs/gittutorial) and [github](https://docs.github.com/en/get-started/start-your-journey/hello-world) | ||
|
|
||
| - Create a subdirectory for your faction, for example 'dragonborns' (replace dragonborns below with the name of your directory). | ||
|
|
||
| - Copy the file called 'index.njk' from the 'template' directory into your subdirectory: | ||
|
|
||
| ``` | ||
| --- | ||
| layout: overview-layout.njk | ||
| title: Not Goblins! | ||
| override:tags: ["race"] | ||
| pagination: | ||
| data: collections.nogoblin | ||
| size: 8 | ||
| reverse: false | ||
| alias: posts | ||
| --- | ||
| ... | ||
| ``` | ||
|
|
||
| Change the title as you wish and 'nogoblin' to 'dragonborns'. | ||
|
|
||
| - If you want to create just one big file, replace everything below the second '---' with your content. This is not recommended if you want to add a lot of text. The content is [Markdown](https://www.markdownguide.org/), a text file format that let's you add basic formatting like headings, links, images. You could also use html directly. Then you would create an index.html file instead. HTML is less recommended. | ||
|
|
||
| - If you have more to say, you should split your diary into multiple files. In that case, just add a short intro below the '---'. Also copy 'Auswertung_XX.md' from the template directory into your subdirectory. You may rename them as you wish, for example to week_01.md, week_02.md, ... and so forth. | ||
|
|
||
| - Also copy the file template.json to your directory and rename it to dragonborns.json. | ||
| ``` | ||
| { | ||
| "author": "enno", | ||
| "layout": "post-layout.njk", | ||
| "tags": "nogoblin", | ||
| "locale": "de" | ||
| } | ||
| ``` | ||
| - Change the author to your name and "nogoblin" to "dragonborns". | ||
|
|
||
| - Change the locale to en if you want to write in English. | ||
|
|
||
| - Edit every Auswertung_XX.md: | ||
| ``` | ||
| --- | ||
| title: "Dragonborn: Round 1" | ||
| date: 2024-03-17 | ||
| --- | ||
| ## Was passiert ist | ||
| ... | ||
| ## Unser Plan | ||
| ... | ||
| ``` | ||
|
|
||
| This file consists of the 'front matter' between the lines starting with '---'. It contains some meta data that will be used for presenting your files nicely. | ||
|
|
||
| - Change the title | ||
| - Change the date line. The files will be ordered by the 'date' field, so make sure to get that right. | ||
| - Write your text below the second '---' line | ||
|
|
||
| - If you're editing directly in github, 'commit' your changes using the github interface. You can commit directly to your 'main' branch. | ||
|
|
||
| ### Including links to files | ||
|
|
||
| If you use images, .cr, .nr, or .txt files in your text they should be automatically handled. | ||
|
|
||
| If this does not work, it may help to instead create a subdirectory `/reports/dragonborns` (at the project root, not inside your dragonborns directory) and copy them there. Now they get copied to the site and you can link to them as `[my first report](/reports/dragonborns/1-drag.cr)`. | ||
|
|
||
| ### Including cr maps | ||
|
|
||
| With the 'shortcode' crmap, readnr, showorders etc. you can include a cr directly into your file like so: | ||
|
|
||
| {% crmap './reports/dragonborns/123-drag.cr' %} | ||
|
|
||
| {% orderfile '/reports/template/befehle-42.txt' %} | ||
|
|
||
| {% readnr '/reports/template/334-42.nr' %} | ||
| {% shownr 'intro' %} | ||
|
|
||
| See template/Auswertung_01.md for more details and examples. | ||
|
|
||
| ### Seeing your content | ||
|
|
||
| - If you have cloned your repository and are using a Linux system, you can run | ||
| ``` | ||
| npm install | ||
| npm run serve | ||
| ``` | ||
| in a terminal. Watch the terminal for error messages. If all went well, you can then see the generated pages at [http://localhost:8080/](http://localhost:8080/) (your port may vary). | ||
|
|
||
|
|
||
| ### Uploading your content | ||
|
|
||
| - If you have cloned the repository to your computer, you must ['add'](https://git-scm.com/docs/gittutorial) and ['commit'](https://git-scm.com/docs/gittutorial) your changes, then 'push' them to your repository. | ||
|
|
||
| - Optional: Activate github actions and github-pages. TODO | ||
|
|
||
| - If you have pushed your changes or commited them on github and you are happy with them, create a ['pull request'](https://github.blog/developer-skills/github/beginners-guide-to-github-creating-a-pull-request/) for the actual eressea repository (sometimes called the 'upstream repository'). If you have changes, you should see a line like "This branch is 1 commit ahead of eressea/tutorials:main' on github. Use the 'contribute' button to 'Open a pull request'. Write a short comment explaining your changes and 'Create pull request'. This will notifiy the owners of the upstream repo to review your changes. If they like them, they will 'merge' them and they can be watched online. They may also have comments or questions or ask you for changes before actually merging them. | ||
|
|
||
|
|
||
|
|
||
| ### Done! | ||
|
|
||
| You can see the current state of the tutorial on https://eressea.github.io/tutorials/. | ||
|
|
||
|
|
||
| ## eleventy-blog | ||
|
|
||
| We use [11ty](https://www.11ty.dev/) for creating the documentation. | ||
|
|
||
| See here for an example using eleventy: | ||
|
|
||
| ### Creating A Blog With Eleventy | ||
| [https://keepinguptodate.com/pages/2019/06/creating-blog-with-eleventy/](https://keepinguptodate.com/pages/2019/06/creating-blog-with-eleventy/) | ||
|
|
||
| A demo of the blog is hosted on Netlify: | ||
| [https://dazzling-almeida-ca0492.netlify.com/](https://dazzling-almeida-ca0492.netlify.com/) | ||
|
|
||
| ## Branches | ||
| ### Branches | ||
| This repo contains several branches that allow you to checkout the code at various stages of development. | ||
|
|
||
| ## How do I run the site? | ||
| ### How do I run the site? | ||
| ``` | ||
| npm install | ||
| npm run serve | ||
| ``` | ||
|
|
||
| Then access the site with the URL [http://localhost:8080/](http://localhost:8080/) (your port may vary). | ||
| Then access the site with the URL [http://localhost:8080/](http://localhost:8080/) (your port may vary). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "locale": "de" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| --- | ||
| layout: base-layout.njk | ||
| --- | ||
| {{ content | safe }} | ||
|
|
||
| {% for post in posts %} | ||
| <section> | ||
|
|
||
| <h2> | ||
| <a href="{{ post.url }}">{{ post.data.title }}</a> | ||
| </h2> | ||
|
|
||
| <time datetime="{{ post.date | dateIso }}">{{ post.date | dateReadable(locale) }}</time> | ||
|
|
||
| {% excerpt post %} | ||
|
|
||
| <a href="{{ post.url }}">Read more</a> | ||
|
|
||
| </section> | ||
| {% endfor %} | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.