Answers.Body: <p>My guess is that just saving the HTML, Javascript, etc. didn't work because the Lichess site also has a server component. If you want to go down that road (which seems like a lot of work!), Lichess is open source; see <a href="https://github.com/ornicar/lila" rel="nofollow noreferrer">https://github.com/ornicar/lila</a> .</p>
  
  <p>But maybe you could let lichess.org do the hard work and embed the Lichess view of the games in your website. That is supported: see "Embed a chess analysis in your site" and "Embed a chess game in your site" at <a href="https://lichess.org/developers" rel="nofollow noreferrer">https://lichess.org/developers</a> . Unfortunately, I don't think it supports Stockfish and analysis within the embedded widget itself, but it does have a link to go to the full version on lichess.org.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-09T11:35:15.547Z
Answers.LastActivityDate: 2018-08-09T11:35:15.547Z
Answers.UserDisplayName: itub
Answers.Body: <p>I was able to scrap the Lichess analysis page into independent components, and then recycled the Javascript code for other use.</p>
  
  <p>Unfortunately, it was not simple. You will need to be a competent programmer, able to read HTML/avaScript code say on Google Chrome debugger. The process took me a week of hard works to compete.</p>
  
  <p>I'm not aware of any easy way to achieve what you want to do. Saving a page certainly won't work. Good news to you is that the source code for lichess is open, I recommend you take it a look on Github.</p>
  
  <p>My recommendation is that unless you have strong incentive for the efforts, why not just put a Lichess link on your website?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-10T10:46:22.910Z
Answers.Text: I have looked into ChessGround, the underlying layout engine of Lichess. That is written in TypeScript that is then compiled into JS. I am familiar with a few languages but Javascript and its derivatives aren't among them. JS seems to positively delight in making things obscure. Unless you are willing to share your efforts, I might have to dive right in. I have been tweaking PgnViewerJS which is also based on ChessGround. PgnViewerJS is very readable but the development is nowhere as matured as Lichess.
Answers.UserDisplayName: Spinor8
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-10T03:24:05.910Z
Answers.LastActivityDate: 2018-08-10T03:24:05.910Z
Answers.UserDisplayName: SmallChess
Body: <p>I am trying to bundle together a couple of games on my own website. I would love to have an interface like <a href="https://lichess.org/ofWXRFGy" rel="nofollow noreferrer">Lichess's analysis page</a>:</p>
  
  <p><a href="https://i.sstatic.net/qXGqk.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qXGqk.png" alt="enter image description here"></a></p>
  
  <p>You can turn on the Stockfish engine, try out different moves and then save it.</p>
  
  <p>Since everything is written in Javascript and HTML, I tried downloading the complete HTML of Lichess's analysis page. Opening the saved page again shows missing board background, Stockfish not working, buttons not showing up. I just can't get it to work. I know Lichess uses chessground.js for their layout engine but that is even more obscure with hardly any examples that show how to even display a full pgn. Does anyone know where I can get a Lichess-analysis-page quality package to display some PGNs while allowing for move exploration and Stockfish integration? </p>
  
Tags: <analysis><pgn><lichess>
Title: How to package PGN in Lichess analysis page format
ThreadText: # How to package PGN in Lichess analysis page format
  
  (Asked by: username_0 on 2018-08-09)
  
  I am trying to bundle together a couple of games on my own website. I would love to have an interface like [Lichess's analysis page](https://lichess.org/ofWXRFGy):
  
  [![enter image description here](https://i.sstatic.net/qXGqk.png)](https://i.sstatic.net/qXGqk.png)
  
  You can turn on the Stockfish engine, try out different moves and then save it.
  
  Since everything is written in Javascript and HTML, I tried downloading the complete HTML of Lichess's analysis page. Opening the saved page again shows missing board background, Stockfish not working, buttons not showing up. I just can't get it to work. I know Lichess uses chessground.js for their layout engine but that is even more obscure with hardly any examples that show how to even display a full pgn. Does anyone know where I can get a Lichess-analysis-page quality package to display some PGNs while allowing for move exploration and Stockfish integration?
  
  **Tags:** analysis, pgn, lichess
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2018-08-09. Score: 1
  
  My guess is that just saving the HTML, Javascript, etc. didn't work because the Lichess site also has a server component. If you want to go down that road (which seems like a lot of work!), Lichess is open source; see <https://github.com/ornicar/lila> .
  
  But maybe you could let lichess.org do the hard work and embed the Lichess view of the games in your website. That is supported: see "Embed a chess analysis in your site" and "Embed a chess game in your site" at <https://lichess.org/developers> . Unfortunately, I don't think it supports Stockfish and analysis within the embedded widget itself, but it does have a link to go to the full version on lichess.org.
  
  
  ---
  
  ### Answer by username_2 on 2018-08-10. Score: 1
  
  I was able to scrap the Lichess analysis page into independent components, and then recycled the Javascript code for other use.
  
  Unfortunately, it was not simple. You will need to be a competent programmer, able to read HTML/avaScript code say on Google Chrome debugger. The process took me a week of hard works to compete.
  
  I'm not aware of any easy way to achieve what you want to do. Saving a page certainly won't work. Good news to you is that the source code for lichess is open, I recommend you take it a look on Github.
  
  My recommendation is that unless you have strong incentive for the efforts, why not just put a Lichess link on your website?
  
  > **Comments:**
  > **username_0**: I have looked into ChessGround, the underlying layout engine of Lichess. That is written in TypeScript that is then compiled into JS. I am familiar with a few languages but Javascript and its derivatives aren't among them. JS seems to positively delight in making things obscure. Unless you are willing to share your efforts, I might have to dive right in. I have been tweaking PgnViewerJS which is also based on ChessGround. PgnViewerJS is very readable but the development is nowhere as matured as Lichess.  
  
  ---
  
  