# Discourse yUML

**URL:** https://meta.discourse.org/t/discourse-yuml/30448
**Category:** Plugin
**Created:** [June 25, 2015, 10:33am UTC](https://meta.discourse.org/t/discourse-yuml/30448 "2015-06-25T10:33:30Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [June 25, 2015, 10:33am UTC](https://meta.discourse.org/t/discourse-yuml/30448/1 "2015-06-25T10:33:30Z")

</div>

[discourse-yuml](https://github.com/sekhat/discourse-yuml) adds yUML support to discourse.

From the [readme](https://github.com/sekhat/discourse-yuml/blob/master/README.md)

* * *

# discourse-yuml

Add the ability to write yUML class diagrams directly into a discourse post.

 ![Example of yUML diagram in discourse](https://global.discourse-cdn.com/meta/original/3X/a/d/ad789498de9790cb4ceb4aa3529b6a3cabec123c.png)

## Installation

### Docker

To install in docker, add the following to your app.yml in the plugins section:

```plaintext
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/sekhat/discourse-yuml.git

```

and rebuild docker via

```plaintext
cd /var/discourse
./launcher rebuild app

```

### Manual

From your main discourse do:

```
cd plugins
git clone https://github.com/sekhat/discourse-yuml.git
cd ..

```

## Limitations

Currently, it only supports yUML class diagrams.

## Usage

A yUML diagram can be specified as so

```
[yuml]
[Class] -> [AnotherClass]
[/yuml]

```

Which should give you a diagram like so

 ![Picture of post editor with example](https://global.discourse-cdn.com/meta/original/3X/1/a/1a49fa91556fc485200ebf4121615c39c38c5fca.png)

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [November 16, 2016, 8:34am UTC](https://meta.discourse.org/t/discourse-yuml/30448/2 "2016-11-16T08:34:02Z")

</div>

I’ve now updated this to work with the latest versions of Discourse.

Sorry it’s taken so long for anybody using it.

---

<div class="post-metadata">

### Author: ![modius](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/modius/32/108600_2.png) [@modius](https://meta.discourse.org/u/modius)
#### Post date: [March 7, 2017, 2:01am UTC](https://meta.discourse.org/t/discourse-yuml/30448/3 "2017-03-07T02:01:06Z")

</div>

Is it possible to have multiple yUML diagrams per post? I seem to be only able to get a single YUML diagram per post to work.

PS. love the plugin 🙂

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [July 4, 2017, 3:38pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/4 "2017-07-04T15:38:30Z")

</div>

How to config link of pictures diagrams in post use to https only?

Because it makes my links not work.

 ![](https://global.discourse-cdn.com/meta/original/3X/d/2/d2180fa5580627dd428c828cc93e35ee00f4eef2.jpg)

I try config to discourse-yuml.js.es6 at “var uri = “[http://yuml.me/diagram/scruffy/class/](http://yuml.me/diagram/scruffy/class/)”” is “var uri = “[https://yuml.me/diagram/scruffy/class/](https://yuml.me/diagram/scruffy/class/)”” It does not work

But i open link at my post it is https

 ![](https://global.discourse-cdn.com/meta/original/3X/5/9/591dacc86a8f207e5d4783a3d990a363721e56bc.jpg)

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [July 19, 2017, 2:57pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/5 "2017-07-19T14:57:13Z")

</div>

At the moment there’s no such configuration.

### Immediate quick fix patch to get you up and running:

You can change the source code for the plugin directly to change the link to https, Which the line you want to change is line 9 of `assets/javascripts/lib/discourse-markdown/discourse-yuml.js.es6` [github link](https://github.com/sekhat/discourse-yuml/blob/master/assets/javascripts/lib/discourse-markdown/discourse-yuml.js.es6#L9).

Of course this means it isn’t really configurable, but it’ll get you up and running.

### Longer term

On top of that, If you are pretty comfortable with writing discourse plugins, you can add a configuration option yourself, that alters the url and submit a pull request. That’ll always be muchly appreciated.

Though, If you aren’t comfortable doing that, you can open an issue in the github project, and I’ll get round to making it configurable option once I’ve got some spare time.

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [July 19, 2017, 3:00pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/6 "2017-07-19T15:00:05Z")

</div>

Sorry, I’ve only just spotted this. Latest update now allows you to have multiple diagrams per post. It was something I spotted myself, and fixed it a few weeks ago.

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [July 19, 2017, 3:03pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/7 "2017-07-19T15:03:28Z")

</div>

Now my website. Can not show drigram 😓

 ![](https://global.discourse-cdn.com/meta/original/3X/4/b/4b6d5744d335d5a0054760c5f5111b9d3488fdee.jpg)

 ![](https://global.discourse-cdn.com/meta/original/3X/8/a/8a3398f24afefed2e038f86637a4ef3bcc5610f6.jpg)

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [July 19, 2017, 3:06pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/8 "2017-07-19T15:06:34Z")

</div>

I assume you just went and changed line 9?

Can you post the modified code? Just so I can double check it?

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [July 19, 2017, 3:09pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/9 "2017-07-19T15:09:41Z")

</div>

Yes i tried, Not change to https://  
And now diagram not show.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [July 19, 2017, 3:10pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/10 "2017-07-19T15:10:12Z")

</div>

It likely broke due to the new Commonmark Engine.

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [July 19, 2017, 3:14pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/11 "2017-07-19T15:14:37Z")

</div>

You changed the code but the link didn’t change to https? Have you tried force refreshing the page. I don’t think the plugin code would get cached by the browser, but it might be.

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [July 19, 2017, 3:16pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/12 "2017-07-19T15:16:20Z")

</div>

When did this change? as I’m running an up to date discourse, though not over https (as it’s an internal network) and the plugin still works for me.

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [July 19, 2017, 3:19pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/13 "2017-07-19T15:19:06Z")

</div>

Are you following tests-passed? As it happened this week, the new markdown engine, CommonMark, was set as the default.

[https://github.com/discourse/discourse/commit/d0c5205a52e850fe97313ed05c3e637792547841](https://github.com/discourse/discourse/commit/d0c5205a52e850fe97313ed05c3e637792547841)

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [July 19, 2017, 3:21pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/14 "2017-07-19T15:21:06Z")

</div>

I’m not sure. Will update the post or not

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [July 19, 2017, 3:22pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/15 "2017-07-19T15:22:12Z")

</div>

Now plugin not works my website.

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [July 19, 2017, 3:33pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/16 "2017-07-19T15:33:44Z")

</div>

In that case, just remove the plugin and reinstall it, if you can log an issue on the github project, and I’ll get round to adding a HTTPs option (or auto detect which would be best) when I get some time.

---

<div class="post-metadata">

### Author: ![Bank\_Live](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bank_live/32/75893_2.png) [@Bank\_Live](https://meta.discourse.org/u/Bank_Live)
#### Post date: [July 19, 2017, 3:48pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/17 "2017-07-19T15:48:25Z")

</div>

1.Case add https i know.  
2.But the case a diagrams not show i tried remove the plugin and reinstall it old problem diagrams not show

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [July 19, 2017, 3:57pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/18 "2017-07-19T15:57:22Z")

</div>

Log issues for both at github, and supply me with your version of discourse and I’ll try to replicate and fix.

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [August 9, 2017, 5:52pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/19 "2017-08-09T17:52:40Z")

</div>

Version 0.2.0 released:

Now supports the new Markdown-It engine.  
All Image URL’s are to the https endpoint for [yuml.me](http://yuml.me)

Caveats:

- No backwards compatability with the old engine. Do not upgrade unless you are on a version of Discourse using Markdown-It

Don’t forget to rebake your posts `rake posts:rebake`

---

<div class="post-metadata">

### Author: ![sekhat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sekhat/32/116310_2.png) [@sekhat](https://meta.discourse.org/u/sekhat)
#### Post date: [August 9, 2017, 6:12pm UTC](https://meta.discourse.org/t/discourse-yuml/30448/20 "2017-08-09T18:12:43Z")

</div>

Cheers for pointing that out for me. 🙂

[Next page](https://meta.discourse.org/t/discourse-yuml/30448.md?page=2)
