-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from ScilifelabDataCentre/hugo-style
Make the site Hugo
- Loading branch information
Showing
171 changed files
with
1,892 additions
and
100,457 deletions.
There are no files selected for viewing
This file contains 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 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 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,6 +1,8 @@ | ||
FROM nginxinc/nginx-unprivileged:alpine | ||
FROM klakegg/hugo:0.104.3-ubuntu-onbuild AS build | ||
|
||
FROM nginxinc/nginx-unprivileged:alpine | ||
RUN sed -i '3 a\ absolute_redirect off;' /etc/nginx/conf.d/default.conf | ||
COPY . /usr/share/nginx/html/ | ||
RUN sed -i 's/#error_page 404/error_page 404/' /etc/nginx/conf.d/default.conf | ||
COPY --from=build /target /usr/share/nginx/html | ||
|
||
EXPOSE 8080 |
This file contains 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,46 @@ | ||
## Content Documents | ||
The content documents of dsw-appendix is dedicated to the public domain under [CC-0 1.0](https://creativecommons.org/publicdomain/zero/1.0/) unless otherwise noted. | ||
|
||
The following is a human-readable summary of (and not a substitute for) the [full legal text of the CC 0 1.0 | ||
license](https://creativecommons.org/publicdomain/zero/1.0/legalcode): | ||
|
||
This work has been dedicated to the public domain by waiving all rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. | ||
|
||
You are free: | ||
|
||
* to **Share**---copy and redistribute the material in any medium or format | ||
* to **Adapt**---remix, transform, and build upon the material | ||
|
||
for any purpose, even commercially without asking permission. | ||
|
||
Notices: | ||
* In no way are the patent or trademark rights of any person affected by CC0, nor are the rights that other persons may have in the work or in how the work is used, such as publicity or privacy rights. | ||
* Unless expressly stated otherwise, the person who associated a work with this deed makes no warranties about the work, and disclaims liability for all uses of the work, to the fullest extent permitted by applicable law. | ||
* When using or citing the work, you should not imply endorsement by the author or the affirmer. | ||
|
||
## Terms of Service of SciLifeLab Data Stewardship Wizard | ||
|
||
### Introduction | ||
Data Stewardship Wizard (DS Wizard, DSW) is a tool developed, maintained, and hosted by a team [we] from SciLifeLab Data Centre at Uppsala University for research community and [you] as its user. | ||
|
||
### Personal Data and Consent Notice | ||
To identify and manage users within DSW, we need to store unique identifier, name, affiliation (optional), and email address gathered upon registration or login via OpenID identity provider. We may also use it to contact you to obtain feedback on your use of the tool, or to inform you of the latest developments or releases. We will not sell, rent, or trade any personal information you provide to us. By using this system, you consent to the collection, retention, and use of your personal information in accordance with the above. You have the right to ask us not to process your personal details for marketing purposes. | ||
|
||
### Privacy Policy | ||
The information you enter into DSW is visible to you and others according to used privacy settings set by you. Moreover, for the purposes of service maintenance, statistics, and development, administrators have access to all data. We may compile anonymized, automated, and aggregated information from your data, but we will not directly access, make use of, or share its content with other subject without your permission. | ||
|
||
With respect to the [GÉANT Data Protection Code of Conduct](https://geant3plus.archive.geant.net/uri/dataprotection-code-of-conduct/v1), | ||
we can be recognized as a service provider committed to this code of conduct. More information can be found in our [Privacy Policy](/privacy/) <!-- check if this works -->. | ||
|
||
### Freedom of Information | ||
All questionnaires, knowledge models, documents and other such entities created and stored in DSW are under your own responsibility. Although we store those data, we are not liable in any aspect for the content. | ||
|
||
### Passwords | ||
All user passwords entered in DSW are stored in encrypted form and cannot be retrieved. The forgotten password mechanism therefore requires verified email for resetting the password. | ||
|
||
### Third party APIs | ||
Certain features on this website utilize third party services and APIs, e.g., for type-hint integrations, OpenID authentication, or document submission. Information used by an external service is governed by the privacy policy of that service. | ||
|
||
### Revisions | ||
This statement was last revised on October 07, 2020 and may be revised at any time. Use of the tool indicates that you understand and fully agree to these terms and conditions. Getting acquainted with current version of these terms as well as checking for its updates is the responsibility of every user. | ||
|
This file contains 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,11 +1,128 @@ | ||
# dsw-appendix | ||
# SciLifeLab Data Stewardship Wizard (DSW) appendix | ||
|
||
Repository for appendicies with more in depth information about topics in the SciLifeLab Data Management Plan Knowledge Model for SciLifeLab instances of the Data Stewardship Wizard | ||
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. | ||
|
||
## Instruction | ||
|
||
1. For each topic create a folder named something appropriate | ||
2. Copy the `template_index.html` file to the new folder, and rename it to `index.html` | ||
3. Copy the `template_choose_css.js` file to the new folder, and rename it to `choose_css.js` | ||
4. Edit the content of the `index.html` | ||
5. The url for the page will be `https://<dsw-instance-url>/appendix/<folder name>` | ||
1. For each topic create a sub-folder, named something appropriate (e.g. dmp-guide), in the content folder | ||
2. 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) | ||
3. Create a file named `_index.md` in the new folder, and put the content/text there | ||
4. The url for the page will be `https://dsw-appendix.scilifelab.se/<folder name>` | ||
|
||
### Step 1: Access the code | ||
|
||
The code is hosted on [GitHub](http://github.com/), so you'll need an account. | ||
|
||
Next, visit the code repository: [https://github.com/ScilifelabDataCentre/dsw-appendix](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. | ||
|
||
### Step 2a: Edit the files (online) | ||
|
||
> 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 :pencil2: 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_. | ||
|
||
### Step 2b: Edit the files (locally) | ||
|
||
#### Git setup | ||
|
||
If you prefer, you can edit the website files on your computer in your favourite text editor. | ||
Just fork the repository to your machine: | ||
|
||
```bash | ||
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: | ||
|
||
```bash | ||
git remote add upstream https://github.com/ScilifelabDataCentre/dsw-appendix.git | ||
``` | ||
|
||
Then you can fetch changes at any time from this remote: | ||
|
||
```bash | ||
git pull upstream main | ||
``` | ||
|
||
When you have finished editing, commit and push to your fork: | ||
|
||
```bash | ||
git add . | ||
git commit -m "My changes" | ||
git push | ||
``` | ||
|
||
#### Testing locally | ||
|
||
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/](https://gohugo.io/getting-started/installing/) | ||
|
||
If you're using Mac OSX, it's recommended to use [Homebrew](https://brew.sh/) - | ||
if homebrew is already set up, installing Hugo is just a case of: | ||
|
||
```bash | ||
brew install hugo | ||
``` | ||
|
||
For Windows users (additional instructions can be found [here](https://gohugo.io/getting-started/installing/#windows)): | ||
|
||
1. Open Windows Explorer. | ||
|
||
2. Create a new folder: C:\Hugo, assuming you want Hugo on your C drive, although this can go anywhere | ||
|
||
3. Create a subfolder in the Hugo folder: `C:\Hugo\bin` | ||
|
||
4. Go to the [Hugo Releases](https://github.com/gohugoio/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](https://esupport.trendmicro.com/en-us/home/pages/technical-support/1038680.aspx).) | ||
|
||
5. Move the ZIP file into your `C:\Hugo\bin` folder. | ||
|
||
6. 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. | ||
|
||
7. 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 command `set 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: | ||
|
||
```console | ||
$ 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. | ||
|
||
### Step 3: Make a pull request | ||
|
||
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](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests), however in short: | ||
|
||
- Visit the main repository: [https://github.com/ScilifelabDataCentre/dsw-appendix](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. | ||
|
||
## How to get help | ||
|
||
If in doubt, you can ask for help by emailing [[email protected]](mailto:[email protected]). | ||
|
||
## License | ||
|
||
The content documents are dedicated to the public domain under a CC-0 license. | ||
|
||
## Credits | ||
|
||
The website was built by [SciLifeLab Data Centre](https://www.scilifelab.se/data/) and [NBIS](https://nbis.se/). |
Oops, something went wrong.