# Generate static file in discourse

**URL:** https://meta.discourse.org/t/generate-static-file-in-discourse/180970
**Category:** Support
**Created:** [February 24, 2021, 5:42am UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970 "2021-02-24T05:42:09Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Caesar\_Chi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/caesar_chi/32/205606_2.png) [@Caesar\_Chi](https://meta.discourse.org/u/Caesar_Chi)
#### Post date: [February 24, 2021, 5:42am UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/1 "2021-02-24T05:42:09Z")

</div>

Hi,

I want to know how to upload a static file, and make this file public for all guest download.  
Do I need the admin permission? or normal user can upload it ?

Please give us the feedback,  
Thanks,  
Caesar

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 24, 2021, 1:59pm UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/2 "2021-02-24T13:59:28Z")

</div>

There isn’t an easy way.

What problem is that solving?

You might check out [Page Publishing](https://meta.discourse.org/t/page-publishing/151971).

---

<div class="post-metadata">

### Author: ![Caesar\_Chi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/caesar_chi/32/205606_2.png) [@Caesar\_Chi](https://meta.discourse.org/u/Caesar_Chi)
#### Post date: [February 25, 2021, 4:12am UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/3 "2021-02-25T04:12:39Z")

</div>

Thanks for the reply, but in my hope, I want to write down or upload a CSS or pure text in the discourse without any style.

It seems the publish post with the default styling, not pure text.

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [February 25, 2021, 4:36am UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/4 "2021-02-25T04:36:01Z")

</div>

> [@Caesar\_Chi](#):
>
> It seems the publish post with the default styling, not pure text.

I might be misunderstanding, but do you want it formatted as code and not standard text?

```css
html {
  background: red;
}

```

You can do that by surrounding your CSS with backticks like this:

```css  
html {  
background: red;  
}  
```

---

<div class="post-metadata">

### Author: ![Caesar\_Chi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/caesar_chi/32/205606_2.png) [@Caesar\_Chi](https://meta.discourse.org/u/Caesar_Chi)
#### Post date: [February 26, 2021, 1:08am UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/5 "2021-02-26T01:08:03Z")

</div>

Maybe there is a little misunderstanding, my expectation like user enter the public link can see totally pure text, for example,

[https://raw.githubusercontent.com/hakimel/css/master/device-loop/style.css](https://raw.githubusercontent.com/hakimel/css/master/device-loop/style.css)

How can I do this by publishing post or any suggestion?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 26, 2021, 4:21pm UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/6 "2021-02-26T16:21:23Z")

</div>

I’m still not clear just what you want, but perhaps you want to allow users to upload other file types? To do that you’d add to the `authorized extensions` site setting.

But if you want Discourse to serve a file like the github link that you linked to, I’m not aware of a way to have a user do that. (I’m not quite sure what happens if you make css an `authorized extension`–I think that the browser will download rather than render the page).

---

<div class="post-metadata">

### Author: ![Caesar\_Chi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/caesar_chi/32/205606_2.png) [@Caesar\_Chi](https://meta.discourse.org/u/Caesar_Chi)
#### Post date: [March 8, 2021, 3:48am UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/7 "2021-03-08T03:48:57Z")

</div>

thanks everyone reply, seem that can not reach, i still need to install the [https://www.discourse.org/plugins/sitemap.html](https://www.discourse.org/plugins/sitemap.html)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [March 8, 2021, 4:41am UTC](https://meta.discourse.org/t/generate-static-file-in-discourse/180970/8 "2021-03-08T04:41:17Z")

</div>

If you are on our hosting, sitemap is a business level plugin – it’s not offered on the standard tier.
