This repository is used for providing additional information when using SciLifeLab instances of the Data Stewardship Wizard. It is mainly used to host guides for how to use the knowledge models implemented, i.e. how to navigate the funtionality when e.g. using DSW to create a data management plan, but can also host reference pages, linked from one of the knowledge models, with in depth information regarding a certain topic.
- For each topic create a sub-folder, named something appropriate (e.g. dmp-guide), in the content folder
- If there are images, put them in folder static/img (if many images, put them in a subfolder with the same name as for the topic)
- Create a file named
_index.md
in the new folder, and put the content/text there - The url for the page will be
https://dsw-appendix.scilifelab.se/<folder name>
The code is hosted on GitHub, so you'll need an account.
Next, visit the code repository: https://github.com/ScilifelabDataCentre/dsw-appendix
In the top right, you'll see a button that says "Fork". Click this, then select your username. This makes a copy of the repository under your personal account that you can edit.
This is best if you only want to make one or two minor tweaks. If you want to make more substantial edits over a longer time frame, we recommend editing locally (Step 2b).
The easiest way to edit the website files is on the GitHub website.
On the web page of your forked copy of the repository, look in the content/
directory. Go to the markdown file that you want to edit, then click the Pencil icon ✏️ in the top right.
This opens a web-based editor where you can add and edit content. When you're finished, scroll to the bottom and fill in / submit the "Commit changes" form.
You're nearly done - you can now skip to Step 3.
If you prefer, you can edit the website files on your computer in your favourite text editor. Just fork the repository to your machine:
git clone [email protected]:[YOUR-USERNAME]/dsw-appendix
cd dsw-appendix
To make it easier to pull in changes made by others, you can add the main repository as a remote:
git remote add upstream https://github.com/ScilifelabDataCentre/dsw-appendix.git
Then you can fetch changes at any time from this remote:
git pull upstream main
When you have finished editing, commit and push to your fork:
git add .
git commit -m "My changes"
git push
To view your changes as they will appear in the final website, you need to install Hugo. You can find instructions on the Hugo website: getting-started/installing/
If you're using Mac OSX, it's recommended to use Homebrew - if homebrew is already set up, installing Hugo is just a case of:
brew install hugo
For Windows users (additional instructions can be found here):
-
Open Windows Explorer.
-
Create a new folder: C:\Hugo, assuming you want Hugo on your C drive, although this can go anywhere
-
Create a subfolder in the Hugo folder:
C:\Hugo\bin
-
Go to the Hugo Releases page. The latest release is announced on top. Scroll to the bottom of the release announcement to see the downloads. They’re all ZIP files. Find the Windows files near the bottom (they’re in alphabetical order, so Windows is last) – download either the 32-bit or 64-bit file depending on whether you have 32-bit or 64-bit Windows. (If you don’t know, see here.)
-
Move the ZIP file into your
C:\Hugo\bin
folder. -
Double-click on the ZIP file and extract its contents. Be sure to extract the contents into the same
C:\Hugo\bin
folder – Windows will do this by default unless you tell it to extract somewhere else. -
In PowerShell or your preferred CLI, add the hugo.exe executable to your PATH by navigating to
C:\Hugo\bin
(or the location of your hugo.exe file) and use the commandset PATH=%PATH%;C:\Hugo\bin
. If the hugo command does not work after a reboot, you may have to run the command prompt as administrator.
Once Hugo is installed, simply run the following command in the repository root (dsw-appendix) directory:
$ hugo serve
Use the URL printed at the bottom of the message (http://localhost:1313/
) to view the site.
Every time you save a file, the page will automatically refresh in the browser.
Once you're finished with your edits and they are committed and pushed to your forked repository, it's time to open a pull request.
You can find full documentation on the GitHub help website, however in short:
- Visit the main repository: https://github.com/ScilifelabDataCentre/dsw-appendix
- Click the button that reads "New Pull Request"
- Click the text link near the top that says "compare across forks"
- In the right-hand "head repository" drop down, select your username / fork.
- If you're happy with the list of commits shown, and the diff in the "Files Changed" tab, fill in a title and description and click "Create pull request"
Once created, a member of the website team will review your changes. Once approved, they will be merged and deployed.
If in doubt, you can ask for help by emailing [email protected].
The content documents are dedicated to the public domain under a CC-0 license.
The website was built by SciLifeLab Data Centre and NBIS.