update dev instructions #98
49
README.md
49
README.md
|
@ -3,46 +3,38 @@
|
||||||
[![Build Status](https://drone.gitea.com/api/badges/gitea/theme/status.svg)](https://drone.gitea.com/gitea/theme)
|
[![Build Status](https://drone.gitea.com/api/badges/gitea/theme/status.svg)](https://drone.gitea.com/gitea/theme)
|
||||||
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ)
|
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ)
|
||||||
|
|
||||||
This is a Hugo theme that gets used within all of our websites like our blog,
|
This is a Hugo theme that gets used within all of our websites like our blog, documentation and also the redirects.
|
||||||
documentation and also the redirects. If you commit any changes to the `master`
|
If you commit any changes to the `master` branch it will trigger rebuilds of all the related websites.
|
||||||
branch it will trigger rebuilds of all the related websites.
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
You need an existing [Hugo](https://github.com/spf13/hugo) website, than you can
|
You need an existing [Hugo](https://github.com/spf13/hugo) website, than you can just download our prebuilt [theme](https://dl.gitea.io/theme/master.tar.gz), put it into your `themes/gitea` folder and enable the theme with the `theme = "gitea"` option of your website.
|
||||||
just download our prebuilt [theme](https://dl.gitea.io/theme/master.tar.gz), put
|
|
||||||
it into your `themes/gitea` folder and enable the theme with the
|
|
||||||
`theme = "gitea"` option of your website.
|
|
||||||
|
|
||||||
|
|||||||
## Development
|
## Development
|
||||||
|
|
||||||
We choose [npm](https://npmjs.org) to fetch our dependencies and
|
We choose [npm](https://npmjs.org) to fetch our dependencies and [gulp](https://gulpjs.com/) for the pipeline.
|
||||||
[gulp](https://gulpjs.com/) for the pipeline. We won't cover the installation of
|
We won't cover the installation of nodejs or npm, for that you can find enough guides depending on your operating system.
|
||||||
nodejs or npm, for that you can find enough guides depending on your operating
|
First of all you have to install the required dependencies:
|
||||||
system. First of all you have to install the required dependencies:
|
|
||||||
|
|
||||||
```
|
```sh
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
|
|
||||||
After you have successfully installed the required dependencies you should be
|
If you want to do theme development we suggest to use the `watch` task we have defined to get the changes directly built after saving changes to a file:
|
||||||
able to use these commands to just clean and build generated sources of the
|
|
||||||
theme:
|
|
||||||
|
|
||||||
```
|
```sh
|
||||||
npm run clean
|
|
||||||
npm run build
|
|
||||||
npm run release
|
|
||||||
```
|
|
||||||
|
|
||||||
If you want to do more development on the theme we suggest to use the `watch`
|
|
||||||
task we have defined to get the changes directly built after saving changes to
|
|
||||||
a file:
|
|
||||||
|
|
||||||
```
|
|
||||||
npm run watch
|
npm run watch
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Whenever you make a change to `src/main.scss` and save the file, this will trigger a rebuild of `static/styles/main.css`.
|
||||||
|
To see a preview of your changes on the website, do the following:
|
||||||
|
|
||||||
|
1. Go to gitea.io
|
||||||
|
2. Open the developer tools
|
||||||
|
3. Click the "Sources" tab
|
||||||
|
4. Open the `gitea.io/styles/main.css` file
|
||||||
|
5. Paste the entire `main.css` file from your local `gitea/theme` repo where `npm run watch` is running on
|
||||||
|
|
||||||
When you are done with your changes just create a pull request, after merging
|
When you are done with your changes just create a pull request, after merging
|
||||||
the pull request the theme will be published to our [download page](https://dl.gitea.io/theme) automatically.
|
the pull request the theme will be published to our [download page](https://dl.gitea.io/theme) automatically.
|
||||||
|
|
||||||
|
@ -57,11 +49,10 @@ Fork -> Patch -> Push -> Pull Request
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is under the Apache-2.0 License. See the [LICENSE](LICENSE) file
|
This project is under the Apache-2.0 License. See the [LICENSE](LICENSE) file for the full license text.
|
||||||
for the full license text.
|
|
||||||
|
|
||||||
## Copyright
|
## Copyright
|
||||||
|
|
||||||
```
|
```none
|
||||||
Copyright (c) 2019 The Gitea Authors <https://gitea.io>
|
Copyright (c) 2019 The Gitea Authors <https://gitea.io>
|
||||||
6543 marked this conversation as resolved
Outdated
6543
commented
```diff
-sh
+none
```
|
|||||||
```
|
```
|
||||||
|
|
Reference in New Issue
Block a user
We need new lines by ourselves.
What do you mean with "we need need lines"?
I mean you have to add new line characters on the article.
? Sorry, I still don't understand what you mean.
I think he revers to
(two space) at the end of the line to enforce line break in markdown
Two spaces also have an effect even if there is a line break.
The "one sentence per line" thing is somewhat unrelated to this and simplifies reading and review purposes.
No strong opinion though, this should not become a long discussion :)